| @@ 743-753 (lines=11) @@ | ||
| 740 | /** |
|
| 741 | * @param $content |
|
| 742 | */ |
|
| 743 | public static function getMetaDescription($content) |
|
| 744 | { |
|
| 745 | global $xoopsTpl, $xoTheme; |
|
| 746 | $myts = MyTextSanitizer::getInstance(); |
|
| 747 | $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 748 | if (isset($xoTheme) && is_object($xoTheme)) { |
|
| 749 | $xoTheme->addMeta('meta', 'description', strip_tags($content)); |
|
| 750 | } else { // Compatibility for old Xoops versions |
|
| 751 | $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); |
|
| 752 | } |
|
| 753 | } |
|
| 754 | ||
| 755 | // Create pagetitles |
|
| 756 | /** |
|
| @@ 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='') { |
|