public function __construct() { // in collapsed form, we want to be able to load API classes $core_path = vB5_Config::instance()->core_path; vB5_Autoloader::register($core_path); vB::init(); $request = new vB_Request_Test(array('userid' => 1, 'ipAddress' => '127.0.0.1', 'altIp' => '127.0.0.1', 'userAgent' => 'CLI')); vB::setRequest($request); $request->createSession(); }
if (!defined('VB_ENTRY')) { define('VB_ENTRY', 1); } // Check for cached image calls to filedata/fetch? if (isset($_REQUEST['routestring']) and $_REQUEST['routestring'] == 'filedata/fetch' and (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) and !empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) or isset($_SERVER['HTTP_IF_NONE_MATCH']) and !empty($_SERVER['HTTP_IF_NONE_MATCH']))) { // Don't check modify date as URLs contain unique items to nullify caching $sapi_name = php_sapi_name(); if ($sapi_name == 'cgi' or $sapi_name == 'cgi-fcgi') { header('Status: 304 Not Modified'); } else { header('HTTP/1.1 304 Not Modified'); } exit; } require_once 'includes/vb5/autoloader.php'; vB5_Autoloader::register(dirname(__FILE__)); //For a few set routes we can run a streamlined function. if (vB5_Frontend_ApplicationLight::isQuickRoute()) { $app = vB5_Frontend_ApplicationLight::init('config.php'); if ($app->execute()) { exit; } } $app = vB5_Frontend_Application::init('config.php'); //todo, move this back so we can catch notices in the startup code. For now, we can set the value in the php.ini //file to catch these situations. // We report all errors here because we have to make Application Notice free error_reporting(E_ALL | E_STRICT); $config = vB5_Config::instance(); if (!$config->report_all_php_errors) { // Note that E_STRICT became part of E_ALL in PHP 5.4
<?php /* * Forum Runner * * Copyright (c) 2010-2011 to End of Time Studios, LLC * * This file may not be redistributed in whole or significant part. * * http://www.forumrunner.com */ chdir('../'); require_once 'includes/vb5/autoloader.php'; vB5_Autoloader::register(getcwd()); vB5_Frontend_Application::init('config.php'); Api_InterfaceAbstract::instance()->callApi('site', 'forumrunner_image');
/** * Returns a string containing the rendered template * @see vB5_Frontend_Controller_Ajax::actionRender * @see vB5_Frontend_Controller_Page::renderTemplate * @param string $templateName * @param array $data * @param bool $isParentTemplate * @param bool $isAjaxTemplateRender - true if we are rendering for a call to /ajax/render/ and we want CSS <link>s separate * @return string */ public static function staticRender($templateName, $data = array(), $isParentTemplate = true, $isAjaxTemplateRender = false) { if (empty($templateName)) { return null; } $templater = new vB5_Template($templateName); foreach ($data as $varname => $value) { $templater->register($varname, $value); } $core_path = vB5_Config::instance()->core_path; vB5_Autoloader::register($core_path); $result = $templater->render($isParentTemplate, $isAjaxTemplateRender); return $result; }