| @@ 488-497 (lines=10) @@ | ||
| 485 | } |
|
| 486 | ||
| 487 | // Create meta description based on content |
|
| 488 | function lx_get_metadescription($content) { |
|
| 489 | global $xoopsTpl, $xoTheme; |
|
| 490 | $myts = MyTextSanitizer::getInstance(); |
|
| 491 | $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 492 | if (isset($xoTheme) && is_object($xoTheme)) { |
|
| 493 | $xoTheme->addMeta( 'meta', 'description', strip_tags($content)); |
|
| 494 | } else { // Compatibility for old Xoops versions |
|
| 495 | $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); |
|
| 496 | } |
|
| 497 | } |
|
| 498 | ||
| 499 | // Create pagetitles |
|
| 500 | function lx_create_pagetitle($article='', $topic='') { |
|
| @@ 759-769 (lines=11) @@ | ||
| 756 | /** |
|
| 757 | * @param $content |
|
| 758 | */ |
|
| 759 | public static function getMetaDescription($content) |
|
| 760 | { |
|
| 761 | global $xoopsTpl, $xoTheme; |
|
| 762 | $myts = MyTextSanitizer::getInstance(); |
|
| 763 | $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 764 | if (isset($xoTheme) && is_object($xoTheme)) { |
|
| 765 | $xoTheme->addMeta('meta', 'description', strip_tags($content)); |
|
| 766 | } else { // Compatibility for old Xoops versions |
|
| 767 | $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); |
|
| 768 | } |
|
| 769 | } |
|
| 770 | ||
| 771 | // Create pagetitles |
|
| 772 | /** |
|