| @@ 764-789 (lines=26) @@ | ||
| 761 | * @param string $article |
|
| 762 | * @param string $topic |
|
| 763 | */ |
|
| 764 | public static function createPageTitle($article = '', $topic = '') |
|
| 765 | { |
|
| 766 | global $xoopsModule, $xoopsTpl; |
|
| 767 | $myts = MyTextSanitizer::getInstance(); |
|
| 768 | $content = ''; |
|
| 769 | if (!empty($article)) { |
|
| 770 | $content .= strip_tags($myts->displayTarea($article)); |
|
| 771 | } |
|
| 772 | if (!empty($topic)) { |
|
| 773 | if (xoops_trim($content) != '') { |
|
| 774 | $content .= ' - ' . strip_tags($myts->displayTarea($topic)); |
|
| 775 | } else { |
|
| 776 | $content .= strip_tags($myts->displayTarea($topic)); |
|
| 777 | } |
|
| 778 | } |
|
| 779 | if (is_object($xoopsModule) && xoops_trim($xoopsModule->name()) != '') { |
|
| 780 | if (xoops_trim($content) != '') { |
|
| 781 | $content .= ' - ' . strip_tags($myts->displayTarea($xoopsModule->name())); |
|
| 782 | } else { |
|
| 783 | $content .= strip_tags($myts->displayTarea($xoopsModule->name())); |
|
| 784 | } |
|
| 785 | } |
|
| 786 | if ($content != '') { |
|
| 787 | $xoopsTpl->assign('xoops_pagetitle', $content); |
|
| 788 | } |
|
| 789 | } |
|
| 790 | ||
| 791 | // clear descriptions |
|
| 792 | /** |
|
| @@ 376-398 (lines=23) @@ | ||
| 373 | } |
|
| 374 | ||
| 375 | // Create pagetitles |
|
| 376 | function lx_create_pagetitle($article='', $topic='') { |
|
| 377 | global $xoopsModule, $xoopsTpl; |
|
| 378 | $myts = MyTextSanitizer::getInstance(); |
|
| 379 | $content=''; |
|
| 380 | if (!empty($article)) $content .= strip_tags($myts->displayTarea($article)); |
|
| 381 | if (!empty($topic)) { |
|
| 382 | if (xoops_trim($content)!='') { |
|
| 383 | $content .= ' - '.strip_tags($myts->displayTarea($topic)); |
|
| 384 | } else { |
|
| 385 | $content .= strip_tags($myts->displayTarea($topic)); |
|
| 386 | } |
|
| 387 | } |
|
| 388 | if (is_object($xoopsModule) && xoops_trim($xoopsModule->name())!='') { |
|
| 389 | if (xoops_trim($content)!='') { |
|
| 390 | $content.=' - '.strip_tags($myts->displayTarea($xoopsModule->name())); |
|
| 391 | } else { |
|
| 392 | $content.=strip_tags($myts->displayTarea($xoopsModule->name())); |
|
| 393 | } |
|
| 394 | } |
|
| 395 | if ($content!='') { |
|
| 396 | $xoopsTpl->assign('xoops_pagetitle', $content); |
|
| 397 | } |
|
| 398 | } |
|
| 399 | ||
| 400 | // clear descriptions |
|
| 401 | function lx_html2text($document) { |
|