XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
AdminRenderAction.class.php
1<?php
3 * @package legacyRender
4 * HtaccessViewAction.class.php
5 */
6
7if (!defined('XOOPS_ROOT_PATH')) {
8 exit();
9}
10//require_once XOOPS_ROOT_PATH.'/modules/legacyRender/kernel/Legacy_RenderSystem.class.php';
11//require_once XOOPS_ROOT_PATH . '/class/template.php';
12
14{
15 public function getDefaultView(&$controller, &$xoopsUser)
16 {
17 return LEGACYRENDER_FRAME_VIEW_SUCCESS;
18 }
19
20 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
21 {
22
23 $retArray = Legacy_Utils::checkSystemModules();
24 $accessAllowFlag = false;
25 $xoopsConfig = $controller->mRoot->mContext->getXoopsConfig();
26 $mRoot = $controller->mRoot;
27 $mContext = $mRoot->mContext;
28
29 // Render System - get configurations categories
30 $moduleHandler = xoops_gethandler('module');
31 $legacyRender =& $moduleHandler->getByDirname('legacyRender');
32 $configHandler = xoops_gethandler('config');
33 $configs =& $configHandler->getConfigsByCat(0, $legacyRender->get('mid'));
34
35 $textFilter =& $mRoot->getTextFilter();
36 $headerScript = $mContext->getAttribute('headerScript');
37 // Meta
38 $render->setAttribute('xoops_meta_keywords',$textFilter->toShow($headerScript->getMeta('keywords') ?: $configs['meta_keywords']));
39 $render->setAttribute('xoops_meta_description',$textFilter->toShow($headerScript->getMeta('description') ?: $configs['meta_description']));
40 $render->setAttribute('xoops_meta_robots',$textFilter->toShow($headerScript->getMeta('robots') ?: $configs['meta_robots']));
41 $render->setAttribute('xoops_meta_rating',$textFilter->toShow($headerScript->getMeta('rating') ?: $configs['meta_rating']));
42 $render->setAttribute('xoops_meta_author',$textFilter->toShow($headerScript->getMeta('author') ?: $configs['meta_author']));
43 $render->setAttribute('xoops_meta_copyright',$textFilter->toShow($headerScript->getMeta('copyright') ?: $configs['meta_copyright']));
44 // Extra Meta Webmaster Tools
45 $render->setAttribute('xoops_meta_bing',$textFilter->toShow($headerScript->getMeta('msvalidate.01') ?: $configs['meta_bing']));
46 $render->setAttribute('xoops_meta_google',$textFilter->toShow($headerScript->getMeta('google-site-verification') ?: $configs['meta_google']));
47 $render->setAttribute('xoops_meta_yandex',$textFilter->toShow($headerScript->getMeta('yandex-verification') ?: $configs['meta_yandex']));
48 // Extra Meta App ID
49 $render->setAttribute('xoops_meta_fb_app',$textFilter->toShow($headerScript->getMeta('fb:app_id') ?: $configs['meta_fb_app']));
50 $render->setAttribute('xoops_meta_twitter_site',$textFilter->toShow($headerScript->getMeta('twitter:site') ?: $configs['meta_twitter_site']));
51 // footer may be raw HTML text.
52 $render->setAttribute('xoops_footer',$configs['footer']);
53
54
55 // xcl 2.3.x
56 $render->setAttribute('meta_keywords',$textFilter->toShow($headerScript->getMeta('keywords') ?: $configs['meta_keywords']));
57 $render->setAttribute('meta_description',$textFilter->toShow($headerScript->getMeta('description') ?: $configs['meta_description']));
58 $render->setAttribute('meta_robots',$textFilter->toShow($headerScript->getMeta('robots') ?: $configs['meta_robots']));
59 $render->setAttribute('meta_rating',$textFilter->toShow($headerScript->getMeta('rating') ?: $configs['meta_rating']));
60 $render->setAttribute('meta_author',$textFilter->toShow($headerScript->getMeta('author') ?: $configs['meta_author']));
61 $render->setAttribute('meta_copyright',$textFilter->toShow($headerScript->getMeta('copyright') ?: $configs['meta_copyright']));
62 // Extra Meta Webmaster Tools
63 $render->setAttribute('meta_bing',$textFilter->toShow($headerScript->getMeta('msvalidate.01') ?: $configs['meta_bing']));
64 $render->setAttribute('meta_google',$textFilter->toShow($headerScript->getMeta('google-site-verification') ?: $configs['meta_google']));
65 $render->setAttribute('meta_yandex',$textFilter->toShow($headerScript->getMeta('yandex-verification') ?: $configs['meta_yandex']));
66 // Extra Meta App ID
67 $render->setAttribute('meta_fb_app',$textFilter->toShow($headerScript->getMeta('fb:app_id') ?: $configs['meta_fb_app']));
68 $render->setAttribute('meta_twitter_site',$textFilter->toShow($headerScript->getMeta('twitter:site') ?: $configs['meta_twitter_site']));
69 // Main
70 $render->setAttribute('favicon',$configs['favicon']);
71 $render->setAttribute('logotype',$configs['logotype']);
72 // footer may be raw HTML text.
73 $render->setAttribute('footer',$configs['footer']);
74 $render->setAttribute('test',$configs['meta_robots']);
75 $render->setAttribute('site_name',$xoopsConfig['sitename']);
76 $render->setAttribute('language',$xoopsConfig['language']);
77 $render->setAttribute('theme_set',$xoopsConfig['theme_set']);
78 $render->setAttribute('page_title' ,$textFilter->toShow($mContext->getAttribute('legacy_pagetitle')) );
79 $render->setAttribute('slogan',$textFilter->toShow($mContext->getAttribute('legacy_slogan')) );
80 // XOOPS2
81 $render->setAttribute('xoops_sitename', htmlspecialchars($xoopsConfig['sitename']));
82 $render->setAttribute('xoops_themecss', xoops_getcss());
83 $render->setAttribute('xoops_imageurl', XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/');
84 // Template
85 $render->setTemplateName('admin_render.html');
86 }
87}