1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 00:27:45 +02:00

Glyph supported added to FAQs and Pages/Menus

This commit is contained in:
Cameron
2013-07-12 09:07:56 -07:00
parent 9d0f6ed3cf
commit 63deda350d
6 changed files with 1511 additions and 5 deletions

View File

@@ -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)
{