1 | <?php |
||
2 | /** |
||
3 | * Module: Lexikon |
||
4 | * Author: Yerres |
||
5 | * Licence: GNU |
||
6 | */ |
||
7 | |||
8 | use XoopsModules\Lexikon\{ |
||
9 | Helper, |
||
10 | Utility |
||
11 | }; |
||
12 | /** @var Helper $helper */ |
||
13 | |||
14 | $GLOBALS['xoopsOption']['template_main'] = 'lx_content.tpl'; |
||
15 | |||
16 | require __DIR__ . '/header.php'; |
||
17 | require_once XOOPS_ROOT_PATH . '/header.php'; |
||
18 | |||
19 | |||
20 | $helper = Helper::getInstance(); |
||
21 | |||
22 | global $xoTheme, $xoopsUser; |
||
23 | $myts = \MyTextSanitizer::getInstance(); |
||
24 | if (!is_object($xoopsUser) && 0 === $helper->getConfig('contentsyndication')) { |
||
25 | redirect_header(XOOPS_URL . '/user.php?xoops_redirect=' . parse_url($_SERVER['SCRIPT_NAME']), 5, _NOPERM); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
26 | } |
||
27 | |||
28 | require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
||
29 | |||
30 | require __DIR__ . '/include/syndication.inc.php'; |
||
31 | $yform->assign($xoopsTpl); |
||
32 | |||
33 | // Various strings |
||
34 | $xoopsTpl->assign('introcontentsyn', sprintf(_MD_LEXIKON_INTROCONTENTSYN, $xoopsConfig['sitename'])); |
||
35 | $xoopsTpl->assign('modulename', $xoopsModule->dirname()); |
||
36 | $xoopsTpl->assign('lang_modulename', $xoopsModule->name()); |
||
37 | $xoopsTpl->assign('lang_moduledirname', $xoopsModule->getVar('dirname')); |
||
38 | |||
39 | $xoopsTpl->assign('xoops_pagetitle', _MD_LEXIKON_SYNDICATION . ' - ' . htmlspecialchars($xoopsModule->name(), ENT_QUOTES | ENT_HTML5)); |
||
40 | $xoopsTpl->assign('xoops_module_header', '<link rel="stylesheet" type="text/css" href="assets/css/style.css" >'); |
||
41 | |||
42 | // Meta data |
||
43 | $meta_description = _MD_LEXIKON_SYNDICATION . ' - ' . htmlspecialchars($xoopsModule->name(), ENT_QUOTES | ENT_HTML5); |
||
44 | if (isset($xoTheme) && is_object($xoTheme)) { |
||
45 | $xoTheme->addMeta('meta', 'description', $meta_description); |
||
46 | } else { |
||
47 | $xoopsTpl->assign('xoops_meta_description', $meta_description); |
||
48 | } |
||
49 | |||
50 | require_once XOOPS_ROOT_PATH . '/footer.php'; |
||
51 |