function Legacy_ThemeSelect(&$controller) { // // TODO remove // parent::XCube_ActionFilter($controller); $this->mIsSelectableTheme = new XCube_Delegate(); $this->mIsSelectableTheme->register('Legacy_ThemeSelect.IsSelectableTheme'); $controller->mSetupUser->add(array(&$this, 'doChangeTheme')); }
function LegacyRender_ThemeSelect(&$controller) { parent::XCube_ActionFilter($controller); $controller->mRoot->mDelegateManager->add('Legacy_ThemeSelect.IsSelectableTheme', 'LegacyRender_ThemeSelect::isSelectableTheme'); $controller->mRoot->mDelegateManager->add('LegacyThemeHandler.GetInstalledThemes', 'LegacyRender_DelegateFunctions::getInstalledThemes', XOOPS_ROOT_PATH . "/modules/legacyRender/kernel/DelegateFunctions.class.php"); }
function HypCommonPreLoadBase(&$controller) { $this->isXCL222 = defined('LEGACY_BASE_VERSION') && version_compare(LEGACY_BASE_VERSION, '2.2.2.1', '>='); if (!isset($this->use_set_query_words)) { $this->use_set_query_words = 0; } if (!isset($this->use_words_highlight)) { $this->use_words_highlight = 0; } if (!isset($this->use_proxy_check)) { $this->use_proxy_check = 0; } if (!isset($this->use_dependence_filter)) { $this->use_dependence_filter = 0; } if (!isset($this->use_csrf_protect)) { $this->use_csrf_protect = 0; } if (!isset($this->use_post_spam_filter)) { $this->use_post_spam_filter = 0; } if (!isset($this->post_spam_trap_set)) { $this->post_spam_trap_set = 0; } if (!isset($this->use_k_tai_render)) { $this->use_k_tai_render = 0; } if (!isset($this->use_smart_redirect)) { $this->use_smart_redirect = 0; } if (!isset($this->use_keep_alive)) { $this->use_keep_alive = 0; } if (!isset($this->configEncoding)) { $this->configEncoding = 'ISO-8859-1'; } if (!isset($this->encodehint_word)) { $this->encodehint_word = ''; } if (!isset($this->encodehint_name)) { $this->encodehint_name = 'HypEncHint'; } if (!isset($this->detect_order)) { $this->detect_order = 'ASCII, JIS, UTF-8, eucJP-win, EUC-JP, SJIS-win, SJIS'; } if (!isset($this->msg_words_highlight)) { $this->msg_words_highlight = 'These key words are highlighted.'; } if (!isset($this->no_proxy_check)) { $this->no_proxy_check = '/^(127\\.0\\.0\\.1|192\\.168\\.1\\.)/'; } if (!isset($this->msg_proxy_check)) { $this->msg_proxy_check = 'Can not post from public proxy.'; } if (!isset($this->input_filter_strength)) { $this->input_filter_strength = 0; } if (!isset($this->use_mail_notify)) { $this->use_mail_notify = 1; } if (!isset($this->send_mail_interval)) { $this->send_mail_interval = 60; } if (!isset($this->post_spam_a)) { $this->post_spam_a = 1; } if (!isset($this->post_spam_bb)) { $this->post_spam_bb = 1; } if (!isset($this->post_spam_url)) { $this->post_spam_url = 1; } if (!isset($this->post_spam_unhost)) { $this->post_spam_unhost = 5; } if (!isset($this->post_spam_host)) { $this->post_spam_host = 31; } if (!isset($this->post_spam_word)) { $this->post_spam_word = 10; } if (!isset($this->post_spam_filed)) { $this->post_spam_filed = 200; } if (!isset($this->post_spam_trap)) { $this->post_spam_trap = '___url'; } if (!isset($this->post_spam_user)) { $this->post_spam_user = 150; } if (!isset($this->post_spam_guest)) { $this->post_spam_guest = 15; } if (!isset($this->post_spam_pass_names)) { $this->post_spam_pass_names = 'reference_quote,msg_before,msg_after'; } if (!isset($this->post_spam_badip)) { $this->post_spam_badip = 100; } if (!isset($this->post_spam_site_auto_regist)) { $this->post_spam_site_auto_regist = 1; } if (!isset($this->post_spam_safe_url)) { $this->post_spam_safe_url = '(?:^|\\.)(?:google|yahoo)\\.'; } if (!isset($this->post_spam_badip_ttl)) { $this->post_spam_badip_ttl = 900; } if (!isset($this->post_spam_badip_forever)) { $this->post_spam_badip_forever = 200; } if (!isset($this->post_spam_badip_ttl0)) { $this->post_spam_badip_ttl0 = 2592000; } if (!isset($this->post_spam_checkers)) { $this->post_spam_checkers = array(array('dnsbl.spam-champuru.livedoor.com', '/^192\\.168\\.1\\.2/')); } if (!isset($this->post_spam_rules)) { $this->post_spam_rules = array("/((?:ht|f)tps?:\\/\\/[!~*'();\\/?:\\@&=+\$,%#_0-9a-zA-Z.-]+).+?\\1.+?\\1/i" => 11, '/[\\x01-\\x08\\x0b-\\x0c\\x0e\\x10-\\x1a\\x1c-\\x1f\\x7f]+/' => 31, '/^\\s*(?:Hi|Aloha)! (?:<a[^>]+?href=|\\[url=|http:\\/\\/)/i' => 15); } if (!isset($this->ignore_fileds)) { $this->ignore_fileds = array(); } if (!isset($this->q_word)) { $this->q_word = 'XOOPS_QUERY_WORD'; } if (!isset($this->q_word2)) { $this->q_word2 = 'XOOPS_QUERY_WORD2'; } if (!isset($this->se_name)) { $this->se_name = 'XOOPS_SEARCH_ENGINE_NAME'; } if (!isset($this->extlink_class_name)) { $this->extlink_class_name = 'ext'; } if (!isset($this->kakasi_cache_dir)) { $this->kakasi_cache_dir = XOOPS_TRUST_PATH . '/uploads/hyp_common/kakasi/'; } if (!isset($this->smart_redirect_min_sec)) { $this->smart_redirect_min_sec = 5; } if (!isset($this->bot_ua_reg)) { $this->bot_ua_reg = '/bot|Slurp|Crawler|Sidewinder|spider|Y!J|Ask/i'; } if (!isset($this->k_tai_conf['ua_regex'])) { $this->k_tai_conf['ua_regex'] = '#(?:Android|Windows Phone|SoftBank|Vodafone|J-PHONE|DoCoMo|UP\\.Browser|DDIPOCKET|WILLCOM|iPhone|iPod|mixi-mobile-converter|Googlebot-Mobile|Google Wireless Transcoder|Hatena-Mobile-Gateway)#'; } if (!isset($this->k_tai_conf['jquery_profiles'])) { $this->k_tai_conf['jquery_profiles'] = 'android,iphone,ipod,windows phone'; } if (!isset($this->k_tai_conf['jquery_theme'])) { $this->k_tai_conf['jquery_theme'] = 'b'; } if (!isset($this->k_tai_conf['jquery_theme_content'])) { $this->k_tai_conf['jquery_theme_content'] = 'd'; } if (!isset($this->k_tai_conf['jquery_theme_block'])) { $this->k_tai_conf['jquery_theme_block'] = 'c'; } if (!isset($this->k_tai_conf['jquery_no_reduce'])) { $this->k_tai_conf['jquery_no_reduce'] = true; } if (!isset($this->k_tai_conf['jquery_remove_flash'])) { $this->k_tai_conf['jquery_remove_flash'] = ''; } if (!isset($this->k_tai_conf['jquery_resolve_table'])) { $this->k_tai_conf['jquery_resolve_table'] = false; } if (!isset($this->k_tai_conf['jquery_image_convert'])) { $this->k_tai_conf['jquery_image_convert'] = 0; } if (!isset($this->k_tai_conf['rebuilds'])) { $this->k_tai_conf['rebuilds'] = array('header' => array('above' => '', 'below' => ''), 'body' => array('above' => '', 'below' => ''), 'footer' => array('above' => '', 'below' => ''), 'headerlogo' => array('above' => '<center>', 'below' => '</center>'), 'headerbar' => array('above' => '<hr>', 'below' => ''), 'breadcrumbs' => array('above' => '', 'below' => ''), 'leftcolumn' => array('above' => '<hr>', 'below' => ''), 'centerCcolumn' => array('above' => '<hr>', 'below' => ''), 'centerLcolumn' => array('above' => '', 'below' => ''), 'centerRcolumn' => array('above' => '', 'below' => ''), 'content' => array('above' => '<hr>', 'below' => ''), 'rightcolumn' => array('above' => '<hr>', 'below' => ''), 'footerbar' => array('above' => '', 'below' => ''), 'easylogin' => array('above' => '<div style="text-align:center;background-color:#DBBCA6;font-size:small">[ ', 'below' => ' ]</div>'), 'redirectMessage' => array('above' => '<marquee loop="3">', 'below' => '</marquee>'), 'blockMenu' => array('above' => '<div style="background-color:#E0EEEE;font-size:small">', 'below' => '</div>'), 'blockContent' => array('above' => '', 'below' => ''), 'toMain' => array('above' => '<hr /><div style="text-align:center">', 'below' => '</div>'), 'subMenu' => array('above' => '<div id="submenu" style="background-color:#ccccff"><h2 style="text-align:center">サブメニュー</h2></div>', 'below' => '')); } if (!isset($this->k_tai_conf['rebuildsEx'])) { $this->k_tai_conf['rebuildsEx'] = array(); } if (!isset($this->k_tai_conf['rebuildsEx']['jqm'])) { $this->k_tai_conf['rebuildsEx']['jqm'] = array('header' => array('above' => '<div data-role="header" data-theme="' . $this->k_tai_conf['jquery_theme'] . '">', 'below' => '</div>'), 'body' => array('above' => '<div data-role="content" id="keitaiContents" data-theme="' . $this->k_tai_conf['jquery_theme'] . '">', 'below' => '</div>'), 'footer' => array('above' => '<div data-role="footer" data-theme="' . $this->k_tai_conf['jquery_theme'] . '">', 'below' => '</div>'), 'headerlogo' => array('above' => '<h1>', 'below' => '</h1>'), 'easylogin' => array('above' => '', 'below' => ''), 'blockMenu' => array('above' => '', 'below' => ''), 'blockMenuBar' => array('above' => '', 'below' => '')); } if (!isset($this->k_tai_conf['jqm_css'])) { $this->k_tai_conf['jqm_css'] = ''; } if (!isset($this->k_tai_conf['themeSet'])) { $this->k_tai_conf['themeSet'] = 'ktai_default'; } if (!isset($this->k_tai_conf['templateSet'])) { $this->k_tai_conf['templateSet'] = 'ktai'; } if (!isset($this->k_tai_conf['themeSets'])) { $this->k_tai_conf['themeSets'] = array(); } if ($this->isXCL222 && !isset($this->k_tai_conf['themeSets']['jqm'])) { $this->k_tai_conf['themeSets']['jqm'] = 'ktai_smart_default'; } if (!isset($this->k_tai_conf['templateSets'])) { $this->k_tai_conf['templateSets'] = array(); } if (!isset($this->k_tai_conf['template'])) { $this->k_tai_conf['template'] = 'default'; } if (!isset($this->k_tai_conf['templates'])) { $this->k_tai_conf['templates'] = array(); } if (!isset($this->k_tai_conf['templates']['jqm'])) { $this->k_tai_conf['templates']['jqm'] = 'smart'; } if (!isset($this->k_tai_conf['bodyAttribute'])) { $this->k_tai_conf['bodyAttribute'] = ''; } if (!isset($this->k_tai_conf['disabledBlockIds'])) { $this->k_tai_conf['disabledBlockIds'] = array(); } if (!isset($this->k_tai_conf['limitedBlockIds'])) { $this->k_tai_conf['limitedBlockIds'] = array(); } if (!isset($this->k_tai_conf['showBlockIds'])) { $this->k_tai_conf['showBlockIds'] = array(); } if (!isset($this->k_tai_conf['useJqmBlockCtl'])) { $this->k_tai_conf['useJqmBlockCtl'] = 0; } if (!isset($this->k_tai_conf['disabledBlockIds_jqm'])) { $this->k_tai_conf['disabledBlockIds_jqm'] = array(); } if (!isset($this->k_tai_conf['limitedBlockIds_jqm'])) { $this->k_tai_conf['limitedBlockIds_jqm'] = array(); } if (!isset($this->k_tai_conf['showBlockIds_jqm'])) { $this->k_tai_conf['showBlockIds_jqm'] = array(); } if (!isset($this->k_tai_conf['pictSizeMax'])) { $this->k_tai_conf['pictSizeMax'] = '200'; } if (!isset($this->k_tai_conf['showImgHosts'])) { $this->k_tai_conf['showImgHosts'] = array('amazon.com', 'yimg.jp', 'yimg.com', 'google.com'); } if (!isset($this->k_tai_conf['directImgHosts'])) { $this->k_tai_conf['directImgHosts'] = array('google-analytics.com', 'maps.google.com', 'maps.googleapis.com', 'ad.jp.ap.valuecommerce.com', 'ba.afl.rakuten.co.jp', 'assoc-amazon.jp', 'ad.linksynergy.com'); } if (!isset($this->k_tai_conf['directLinkHosts'])) { $this->k_tai_conf['directLinkHosts'] = array('amazon.co.jp', 'ck.jp.ap.valuecommerce.com', 'afl.rakuten.co.jp', 'maps.google.com', 'google.co.jp'); } if (!isset($this->k_tai_conf['redirect'])) { $this->k_tai_conf['redirect'] = XOOPS_URL . '/class/hyp_common/gate.php?way=redirect&_d=0&_u=0&_x=0&l='; } if (!isset($this->k_tai_conf['easyLogin'])) { $this->k_tai_conf['easyLogin'] = 1; } if (!isset($this->k_tai_conf['noCheckIpRange'])) { $this->k_tai_conf['noCheckIpRange'] = 0; } if (!isset($this->k_tai_conf['docomoGuidTTL'])) { $this->k_tai_conf['docomoGuidTTL'] = 300; } if (!isset($this->k_tai_conf['msg']['easylogin'])) { $this->k_tai_conf['msg']['easylogin'] = '******'; } if (!isset($this->k_tai_conf['msg']['logout'])) { $this->k_tai_conf['msg']['logout'] = 'Logout'; } if (!isset($this->k_tai_conf['msg']['easyloginSet'])) { $this->k_tai_conf['msg']['easyloginSet'] = 'Easylogin:ON'; } if (!isset($this->k_tai_conf['msg']['easyloginUnset'])) { $this->k_tai_conf['msg']['easyloginUnset'] = 'Easylogin:OFF'; } if (!isset($this->k_tai_conf['msg']['toMain'])) { $this->k_tai_conf['msg']['toMain'] = 'Show main contents'; } if (!isset($this->k_tai_conf['msg']['mainMenu'])) { $this->k_tai_conf['msg']['mainMenu'] = 'Main Menu'; } if (!isset($this->k_tai_conf['msg']['subMenu'])) { $this->k_tai_conf['msg']['subMenu'] = 'Sub Menu'; } if (!isset($this->k_tai_conf['msg']['switchSmart'])) { $this->k_tai_conf['msg']['switchSmart'] = 'To Smart phone\'s'; } if (!isset($this->k_tai_conf['icon']['toMain'])) { $this->k_tai_conf['icon']['toMain'] = '((e:f7e4))'; } if (!isset($this->k_tai_conf['style']['highlight'])) { $this->k_tai_conf['style']['highlight'] = 'background-color:#ffc0cb'; } if (!isset($this->k_tai_conf['easyLoginConfPath'])) { $this->k_tai_conf['easyLoginConfPath'] = '/userinfo.php'; } if (!isset($this->k_tai_conf['easyLoginConfuid'])) { $this->k_tai_conf['easyLoginConfuid'] = 'uid'; } if (!isset($this->k_tai_conf['easyLoginConfInsert'])) { $this->k_tai_conf['easyLoginConfInsert'] = 'content'; } if (!isset($this->k_tai_conf['getKeys']['page'])) { $this->k_tai_conf['getKeys']['page'] = '_p_'; } if (!isset($this->k_tai_conf['getKeys']['page'])) { $this->k_tai_conf['getKeys']['hash'] = '_h_'; } if (!isset($this->k_tai_conf['getKeys']['page'])) { $this->k_tai_conf['getKeys']['block'] = '_b_'; } if (!isset($this->k_tai_conf['googleAdsense']['config'])) { $this->k_tai_conf['googleAdsense']['config'] = XOOPS_TRUST_PATH . '/class/hyp_common/ktairender/adsenseConf.php'; } if (!isset($this->k_tai_conf['googleAdsense']['below'])) { $this->k_tai_conf['googleAdsense']['below'] = 'header'; } if (!isset($this->k_tai_conf['googleAnalyticsId'])) { $this->k_tai_conf['googleAnalyticsId'] = ''; } if (!isset($this->k_tai_conf['urlRewrites'])) { $this->k_tai_conf['urlRewrites'] = null; } if (!isset($this->k_tai_conf['urlImgRewrites'])) { $this->k_tai_conf['urlImgRewrites'] = null; } if (!isset($this->xpwiki_render_dirname)) { $this->xpwiki_render_dirname = ''; } if (!isset($this->xpwiki_render_use_wikihelper)) { $this->xpwiki_render_use_wikihelper = 0; } if (!isset($this->xpwiki_render_use_wikihelper_admin)) { $this->xpwiki_render_use_wikihelper_admin = 0; } if (!isset($this->xpwiki_render_use_wikihelper_bbcode)) { $this->xpwiki_render_use_wikihelper_bbcode = 1; } if (!isset($this->xpwiki_render_notuse_wikihelper_modules)) { $this->xpwiki_render_notuse_wikihelper_modules = array(); } if (!isset($this->misc_head_last_tag)) { $this->misc_head_last_tag = ''; } if (!isset($this->xoopstpl_plugins_dir)) { $this->xoopstpl_plugins_dir = ''; } // init $this->nowModuleDirname = ''; $this->detect_order_org = mb_detect_order(); // Load conf file. $conffile = XOOPS_TRUST_PATH . HYP_COMMON_PRELOAD_CONF; $sections = array('main_switch', 'xpwiki_render', 'spam_block', 'misc'); if (is_file($conffile) && ($conf = parse_ini_file($conffile, true))) { $ini_array_key = version_compare(PHP_VERSION, '5.3.0', '>='); foreach ($conf as $name => $section) { if ($name === 'k_tai_conf') { foreach ($section as $key => $val) { if (!$ini_array_key) { if (strpos($key, '.') !== false) { list($key, $arr_key) = explode('.', $key, 2); if (!isset($this->k_tai_conf[$key . '#' . XOOPS_URL])) { $this->k_tai_conf[$key . '#' . XOOPS_URL] = array(); } $this->k_tai_conf[$key . '#' . XOOPS_URL][$arr_key] = $val; continue; } } $this->k_tai_conf[$key . '#' . XOOPS_URL] = $val; } } else { if (in_array($name, $sections)) { foreach ($section as $key => $val) { if (!$ini_array_key) { if (strpos($key, '.') !== false) { list($key, $arr_key) = explode('.', $key, 2); if (!isset($this->{$key})) { $this->{$key} = array(); } $this->{$key}[$arr_key] = $val; continue; } } $this->{$key} = $val; } } } } $this->xpwiki_render_notuse_wikihelper_modules = array_filter($this->xpwiki_render_notuse_wikihelper_modules); if (isset($this->k_tai_conf['disabledBlockIds#' . XOOPS_URL])) { $this->k_tai_conf['disabledBlockIds#' . XOOPS_URL] = array_filter($this->k_tai_conf['disabledBlockIds#' . XOOPS_URL]); } if (isset($this->k_tai_conf['limitedBlockIds#' . XOOPS_URL])) { $this->k_tai_conf['limitedBlockIds#' . XOOPS_URL] = array_filter($this->k_tai_conf['limitedBlockIds#' . XOOPS_URL]); } if (isset($this->k_tai_conf['disabledBlockIds_jqm#' . XOOPS_URL])) { $this->k_tai_conf['disabledBlockIds_jqm#' . XOOPS_URL] = array_filter($this->k_tai_conf['disabledBlockIds_jqm#' . XOOPS_URL]); } if (isset($this->k_tai_conf['limitedBlockIds_jqm#' . XOOPS_URL])) { $this->k_tai_conf['limitedBlockIds_jqm#' . XOOPS_URL] = array_filter($this->k_tai_conf['limitedBlockIds_jqm#' . XOOPS_URL]); } if (isset($this->k_tai_conf['jquery_theme#' . XOOPS_URL])) { $this->k_tai_conf['rebuildsEx']['jqm']['header']['above'] = preg_replace('/data-theme="[a-z]"/', 'data-theme="' . $this->k_tai_conf['jquery_theme#' . XOOPS_URL] . '"', $this->k_tai_conf['rebuildsEx']['jqm']['header']['above']); $this->k_tai_conf['rebuildsEx']['jqm']['body']['above'] = preg_replace('/data-theme="[a-z]"/', 'data-theme="' . $this->k_tai_conf['jquery_theme#' . XOOPS_URL] . '"', $this->k_tai_conf['rebuildsEx']['jqm']['body']['above']); $this->k_tai_conf['rebuildsEx']['jqm']['footer']['above'] = preg_replace('/data-theme="[a-z]"/', 'data-theme="' . $this->k_tai_conf['jquery_theme#' . XOOPS_URL] . '"', $this->k_tai_conf['rebuildsEx']['jqm']['footer']['above']); } if ($this->post_spam_badip_ttl == -1) { $this->post_spam_badip_ttl = null; } if (defined('XOOPS_CUBE_LEGACY') && $this->xpwiki_render_dirname && !XC_CLASS_EXISTS('Hyp_TextFilter')) { include_once XOOPS_TRUST_PATH . '/class/hyp_common/xc_classes/Hyp_TextFilter.php'; } } parent::XCube_ActionFilter($controller); }
function DbthemePreloadBase(&$controller) { parent::XCube_ActionFilter($controller); $controller->mRoot->mDelegateManager->add('LegacyThemeHandler.GetInstalledThemes', array(&$this, 'getInstalledThemes4Dbtheme')); }
/** * Return new XoopsClassLoader object * @param XCube_Controller $controller */ public function __construct($controller) { parent::XCube_ActionFilter($controller); $this->classMap = $this->_getClassMap(); }
function NBFrameActionFilter(&$controller, &$environment) { parent::XCube_ActionFilter($controller); $this->mEnvironment = $environment; }