mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Glyph supported added to FAQs and Pages/Menus
This commit is contained in:
parent
9d0f6ed3cf
commit
63deda350d
@ -128,7 +128,7 @@ class page_chapters_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'chapter_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE, 'readonly'=>TRUE),
|
||||
'chapter_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>FALSE, 'batch' => FALSE, 'filter'=>FALSE),
|
||||
'chapter_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'writeParms'=> 'glyphs=1', 'readonly'=>FALSE, 'batch' => FALSE, 'filter'=>FALSE),
|
||||
'chapter_parent' => array('title'=> "Book", 'type' => 'dropdown', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'filter'=>true),
|
||||
'chapter_name' => array('title'=> "Book or Chapter Title", 'type' => 'method', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE),
|
||||
'chapter_template' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''),
|
||||
|
@ -65,7 +65,7 @@ class faq_cat_ui extends e_admin_ui
|
||||
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'faq_info_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'left' ),
|
||||
'faq_info_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'left', 'writeParms'=>'glyphs=1' ),
|
||||
'faq_info_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE),
|
||||
'faq_info_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readParms'=>'editable=1'),
|
||||
'faq_info_about' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name
|
||||
|
@ -55,7 +55,7 @@ class faqs_sitelink // include plugin-folder in the name.
|
||||
'link_name' => $tp->toHtml($row['faq_info_title'],'','TITLE'),
|
||||
'link_url' => e107::getUrl()->sc('faqs/list/all', array('category' => $row['faq_info_id'])),
|
||||
'link_description' => $row['faq_info_about'],
|
||||
'link_button' => '',
|
||||
'link_button' => $row['faq_info_icon'],
|
||||
'link_category' => '',
|
||||
'link_order' => '',
|
||||
'link_parent' => '',
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['docs']['listChapters']['start'] = '';
|
||||
$CHAPTER_TEMPLATE['docs']['listChapters']['item'] = "<section id='{CHAPTER_ANCHOR}'><a href='{CHAPTER_URL}'><h1>{CHAPTER_NAME}</h1></a>
|
||||
$CHAPTER_TEMPLATE['docs']['listChapters']['item'] = "<section id='{CHAPTER_ANCHOR}'><a href='{CHAPTER_URL}'><h1>{CHAPTER_ICON}{CHAPTER_NAME}</h1></a>
|
||||
{CHAPTER_DESCRIPTION}
|
||||
</section>
|
||||
";
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
$CHAPTER_TEMPLATE['docs']['listBooks']['caption'] = '';
|
||||
$CHAPTER_TEMPLATE['docs']['listBooks']['start'] = '';
|
||||
$CHAPTER_TEMPLATE['docs']['listBooks']['item'] = "<section id='{BOOK_ANCHOR}'><a href='{BOOK_URL}'><h1>{BOOK_NAME}</h1></a>
|
||||
$CHAPTER_TEMPLATE['docs']['listBooks']['item'] = "<section id='{BOOK_ANCHOR}'><a href='{BOOK_URL}'><h1>{BOOK_ICON}{BOOK_NAME}</h1></a>
|
||||
{BOOK_DESCRIPTION}
|
||||
</section>
|
||||
";
|
||||
|
1479
e107_web/js/font-awesome/css/font-awesome.css
vendored
Normal file
1479
e107_web/js/font-awesome/css/font-awesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
27
page.php
27
page.php
@ -192,6 +192,7 @@ class pageClass
|
||||
$var = array(
|
||||
'BOOK_NAME' => $tp->toHtml($row['chapter_name']),
|
||||
'BOOK_ANCHOR' => $frm->name2id($row['chapter_name']),
|
||||
'BOOK_ICON' => $this->chapterIcon($row['chapter_icon']),
|
||||
'BOOK_DESCRIPTION' => $tp->toHtml($row['chapter_meta_description'],true,'BODY'),
|
||||
'CHAPTERS' => $this->listChapters(intval($row['chapter_id'])),
|
||||
'BOOK_URL' => e_BASE."page.php?bk=".intval($row['chapter_id']) // FIXME SEF-URL
|
||||
@ -255,6 +256,7 @@ class pageClass
|
||||
$var = array(
|
||||
'CHAPTER_NAME' => $tp->toHtml($row['chapter_name']),
|
||||
'CHAPTER_ANCHOR' => $frm->name2id($row['chapter_name']),
|
||||
'CHAPTER_ICON' => $this->chapterIcon($row['chapter_icon']),
|
||||
'CHAPTER_DESCRIPTION' => $tp->toHtml($row['chapter_meta_description'],true,'BODY'),
|
||||
'PAGES' => $this->listPages(intval($row['chapter_id'])),
|
||||
'CHAPTER_URL' => e_BASE."page.php?ch=".intval($row['chapter_id']) // FIXME SEF-URL
|
||||
@ -276,6 +278,31 @@ class pageClass
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle Chapter Icon Glyphs.
|
||||
*/
|
||||
private function chapterIcon($icon)
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
if(!vartrue($icon))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if($glyph = $tp->glyph($icon))
|
||||
{
|
||||
return $glyph;
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = $tp->replaceConstants($icon,'full');
|
||||
|
||||
return "<img class='icon' src='".$path."' alt=\"icon\" />";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function listPages($chapt=0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user