| @@ 747-757 (lines=11) @@ | ||
| 744 | /** |
|
| 745 | * @param $content |
|
| 746 | */ |
|
| 747 | public static function getMetaDescription($content) |
|
| 748 | { |
|
| 749 | global $xoopsTpl, $xoTheme; |
|
| 750 | $myts = MyTextSanitizer::getInstance(); |
|
| 751 | $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 752 | if (isset($xoTheme) && is_object($xoTheme)) { |
|
| 753 | $xoTheme->addMeta('meta', 'description', strip_tags($content)); |
|
| 754 | } else { // Compatibility for old Xoops versions |
|
| 755 | $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); |
|
| 756 | } |
|
| 757 | } |
|
| 758 | ||
| 759 | // Create pagetitles |
|
| 760 | /** |
|
| @@ 364-373 (lines=10) @@ | ||
| 361 | } |
|
| 362 | ||
| 363 | // Create meta description based on content |
|
| 364 | function lx_get_metadescription($content) { |
|
| 365 | global $xoopsTpl, $xoTheme; |
|
| 366 | $myts = MyTextSanitizer::getInstance(); |
|
| 367 | $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 368 | if (isset($xoTheme) && is_object($xoTheme)) { |
|
| 369 | $xoTheme->addMeta( 'meta', 'description', strip_tags($content)); |
|
| 370 | } else { // Compatibility for old Xoops versions |
|
| 371 | $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); |
|
| 372 | } |
|
| 373 | } |
|
| 374 | ||
| 375 | // Create pagetitles |
|
| 376 | function lx_create_pagetitle($article='', $topic='') { |
|