/** * Sets the style to use for successive templates. * * @param int $styleid - The id of the style to use */ public function setStyle($styleid) { if (!IS_MOBILE_STYLE) { $this->styleid = $styleid; $this->bootstrap->force_styleid($this->styleid); } }
/** * Gets editor in the selected mode. * * @return string */ public function actionSwitchMode() { // Set up the style info - we need charset to be set for convert_urlencoded_unicode $this->bootstrap->force_styleid(0); $this->bootstrap->load_style(); require_once DIR . '/includes/class_xml.php'; vB::$vbulletin->input->clean_array_gpc('r', array( 'towysiwyg' => vB_Input::TYPE_BOOL, 'allowsmilie' => vB_Input::TYPE_BOOL, 'message' => vB_Input::TYPE_STR, )); vB::$vbulletin->GPC['message'] = convert_urlencoded_unicode(vB::$vbulletin->GPC['message']); $xml = new vB_AJAX_XML_Builder(vB::$vbulletin, 'text/xml'); if (vB::$vbulletin->GPC['towysiwyg']) { $wysiwyg_parser = new vBCms_BBCode_Wysiwyg(vB::$vbulletin, vBCms_BBCode_Wysiwyg::fetchCmsTags()); // todo: options $wysiwyg_html = $wysiwyg_parser->do_parse(vB::$vbulletin->GPC['message'], false, vB::$vbulletin->GPC['allowsmilie'], true, true, true); $xml->add_tag('message', process_replacement_vars($wysiwyg_html)); } else { $html_parser = new vBCms_WysiwygHtmlParser(vB::$vbulletin); $do_html = false; // todo: option $message = $html_parser->parse(vB::$vbulletin->GPC['message'], $do_html); $xml->add_tag('message', process_replacement_vars($message)); } if (!vB::contentHeadersSent()) { $xml->send_content_type_header(); $xml->send_content_length_header(); vB::contentHeadersSent(true); } return $xml->fetch_xml(); }
|| #################################################################### || \*======================================================================*/ /*Legacy Bootstrap==================================================================*/ // Turn on error reporting error_reporting(E_ALL & ~E_NOTICE); // Legacy system constants define('CSRF_PROTECTION', true); define('VB_AREA', 'Forum'); // Don't use the usual WOLPATH resolution define('SKIP_WOLPATH', 1); // Legacy info // TODO: Load the cms phrasegroup elsewhere $phrasegroups = array('vbcms'); // Bootstrap to the legacy system require './includes/class_bootstrap.php'; $bootstrap = new vB_Bootstrap(); $bootstrap->datastore_entries = array('routes'); $bootstrap->bootstrap(); /*MVC Bootstrap=====================================================================*/ // Get the entry time define('VB_ENTRY_TIME', microtime(true)); // vB core path define('VB_PATH', realpath(dirname(__FILE__)) . '/'); // The package path define('VB_PKG_PATH', realpath(VB_PATH . '../packages') . '/'); // Bootstrap the framework require_once VB_PATH . 'vb.php'; vB::init(); if (defined('VB_API') and VB_API === true) { // Force vB::$vbulletin->options['route_requestvar'] to 'r' for API. vB::$vbulletin->options['route_requestvar'] = 'r';
/** * Sets the style to use for successive templates. * * @param int $styleid - The id of the style to use */ public function setStyle($styleid) { $this->styleid = $styleid; $this->bootstrap->force_styleid($this->styleid); }
*/ chdir(MCWD); chdir('../'); define('VB_PRODUCT', 'vbcms'); define('VB_ENTRY', 1); define('VB_ROUTER_SEGMENT', 'content'); define('GET_EDIT_TEMPLATES', 'picture'); define('CMS_SCRIPT', true); define('THIS_SCRIPT', 'vbcms'); define('FRIENDLY_URL_LINK', 'vbcms'); define('CSRF_PROTECTION', false); define('VB_AREA', 'Forum'); define('SKIP_WOLPATH', 1); $phrasegroups = array('vbcms'); require './includes/class_bootstrap.php'; $bootstrap = new vB_Bootstrap(); $bootstrap->datastore_entries = array('routes'); $bootstrap->bootstrap(); $bootstrap->process_templates(); if (!defined('VB_ENTRY')) { define('VB_ENTRY', 1); } define('VB_ENTRY_TIME', microtime(true)); define('VB_PATH', MCWD . '/../vb/'); define('VB_PKG_PATH', realpath(VB_PATH . '../packages') . '/'); require_once DIR . '/vb/phrase.php'; require_once DIR . '/vb/vb.php'; vB::init(); require_once DIR . '/vb/vb.php'; require_once DIR . '/vb/cache.php'; require_once DIR . '/vb/cache/db.php';
$phrasegroups = array(); // get special data templates from the datastore $specialtemplates = array('blogcategorycache'); // pre-cache templates used by all actions $globaltemplates = array(); // pre-cache templates used by specific actions $actiontemplates = array(); // ######################### REQUIRE BACK-END ############################ require_once CWD . '/includes/init.php'; require_once DIR . '/includes/blog_functions.php'; require_once DIR . '/includes/class_trackback.php'; require_once DIR . '/includes/class_bootstrap.php'; define('VB_AREA', 'Forum'); $bootstrap = new vB_Bootstrap_Forum(); $bootstrap->datastore_entries = $specialtemplates; $bootstrap->cache_templates = vB_Bootstrap::fetch_required_template_list(array(), array()); $bootstrap->bootstrap(); $vbulletin->input->clean_array_gpc('p', array('url' => TYPE_STR)); $vbulletin->input->clean_array_gpc('r', array('blogid' => TYPE_UINT)); // Came to the url directly if ($vbulletin->GPC['blogid']) { if ($vbulletin->options['vbblog_pingback']) { $pingbackurl = $vbulletin->options['bburl'] . '/blog_callback.php'; header("X-Pingback: {$pingbackurl}"); } exec_header_redirect('blog.php?b=' . $vbulletin->GPC['blogid']); } ($hook = vBulletinHook::fetch_hook('blog_callback_start')) ? eval($hook) : false; $trackback = new vB_Trackback_Server($vbulletin); if ($trackback->parse_blogid(SCRIPTPATH, $vbulletin->GPC['url']) and $vbulletin->options['vbblog_trackback']) { $trackback->send_xml_response();
/** * Loads assorted show variables. Ideally, these would be used in templates, * but sometimes they're used within code. */ public function load_show_variables() { parent::load_show_variables(); global $vbulletin, $show, $threadinfo, $foruminfo; $show['foruminfo'] = (THIS_SCRIPT == 'forumdisplay' and $vbulletin->userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canview']); if (THIS_SCRIPT == 'showthread' and $threadinfo['threadid']) { if (!($vbulletin->userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canview']) or (!$threadinfo['visible'] and !can_moderate($foruminfo['forumid'], 'canmoderateposts') or $threadinfo['isdeleted'] and !can_moderate($foruminfo['forumid'])) or in_coventry($threadinfo['postuserid']) and !can_moderate($foruminfo['forumid']) or !($vbulletin->userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or !($vbulletin->userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0) or !verify_forum_password($foruminfo['forumid'], $foruminfo['password'], false)) { $show['threadinfo'] = false; } else { $show['threadinfo'] = true; } } else { $show['threadinfo'] = false; } }
|| # Copyright 2000-2015 vBulletin Solutions Inc. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ error_reporting(E_ALL & ~E_NOTICE); require_once dirname(__FILE__) . '/includes/class_bootstrap.php'; define('VB_AREA', 'Forum'); if (!defined('VB_ENTRY')) { define('VB_ENTRY', 1); } global $bootstrap, $actiontemplates, $globaltemplates, $specialtemplates; $bootstrap = new vB_Bootstrap_Forum(); $bootstrap->datastore_entries = $specialtemplates; $bootstrap->cache_templates = vB_Bootstrap::fetch_required_template_list(empty($_REQUEST['do']) ? '' : $_REQUEST['do'], $actiontemplates, $globaltemplates); $bootstrap->bootstrap(); // Deprecated as of release 4.0.2, replaced by global_bootstrap_init_start // Legacy Hook 'global_start' Removed // $bootstrap->load_style(); // legacy code needs this global $permissions; $permissions = $vbulletin->userinfo['permissions']; // Deprecated as of release 4.0.2, replaced by global_bootstrap_complete // Legacy Hook 'global_setup_complete' Removed // if (!empty($db->explain)) { $aftertime = microtime(true) - TIMESTART; echo "End call of global.php: {$aftertime}\n"; echo "\n<hr />\n\n"; } /*=========================================================================*\