<?php
// Set PHP Reporting
error_reporting(E_ALL & ~E_NOTICE);
define('__XF__', __DIR__); // EDIT VALUE IF SCRIPT IS NOT IN XF FOLDER
require __XF__ . '/src/XF.php';
$_SERVER['SCRIPT_NAME'] = __XF__ . '/index.php';
$_SERVER['REQUEST_URI'] = preg_replace("|^" . preg_quote(preg_replace('|(/+)$|', '', $_SERVER['DOCUMENT_ROOT'])) . "|", '', __XF__ . '/index.php');
XF::start(__XF__);
$app = \XF::setupApp('XF\Pub\App');
// $app->start(); // comment out for 2.3+
$request = $app->request();
\ScriptsPages\Setup::set('init', true);
// EDIT BELOW to set the page's $head and/or $content; the code below is a sample
/** ob_start();
require_once __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . "-head.php";
$head = ob_get_contents();
ob_end_clean(); **/
/** ob_start();
require_once __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . "-content.php";
$content = ob_get_contents();
ob_end_clean(); */
// EDIT BELOW TO CONFIGURE
\ScriptsPages\Setup::set([
'breadcrumbs' => ['Item 1' => '/1', 'Item 2' => '/2', 'Item 3' => '/3'],
'head' => $head,
'content' => $content
]);
// STOP HERE
$app->run()->send($request);
[
'navigation_id' => null, // the navigation tab to highlight
'head' => null, // code to embed inside the <head> tag
'metadata' => true, // include social media meta tags like 'og:*' for social media previews
'title' => null, // the page title; if null, falls back to board title
'breadcrumbs' => true, // true to include breadcrumbs, false to not, or an array of [name => href, ...]
'content' => null, // the page content; this is required
'raw' => false // whether or not to remove the XenForo layout
]
SCRIPT_PAGE_{KEY} prior to loading XenForo, i.e.define('SCRIPT_PAGE_CONTENT', '<b>Hello world</b>');
<?php
// Set PHP Reporting
error_reporting(E_ALL & ~E_NOTICE);
define('__XF__', __DIR__); // EDIT VALUE IF SCRIPT IS NOT IN XF FOLDER
require __XF__ . '/src/XF.php';
$_SERVER['SCRIPT_NAME'] = __XF__ . '/index.php';
$_SERVER['REQUEST_URI'] = preg_replace("|^" . preg_quote(preg_replace('|(/+)$|', '', $_SERVER['DOCUMENT_ROOT'])) . "|", '', __XF__ . '/index.php');
XF::start(__XF__);
$app = \XF::setupApp('XF\Pub\App');
// $app->start(); // comment out for 2.3+
$request = $app->request();
\ScriptsPages\Setup::set('init', true);
// EDIT BELOW to set the page's $head and/or $content; the code below is a sample
/** ob_start();
require_once __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . "-head.php";
$head = ob_get_contents();
ob_end_clean(); **/
/** ob_start();
require_once __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . "-content.php";
$content = ob_get_contents();
ob_end_clean(); */
// EDIT BELOW TO CONFIGURE
\ScriptsPages\Setup::set([
'breadcrumbs' => ['Item 1' => '/1', 'Item 2' => '/2', 'Item 3' => '/3'],
'head' => $head,
'content' => $content
]);
// STOP HERE
$app->run()->send($request);
[
'navigation_id' => null, // the navigation tab to highlight
'head' => null, // code to embed inside the <head> tag
'metadata' => true, // include social media meta tags like 'og:*' for social media previews
'title' => null, // the page title; if null, falls back to board title
'breadcrumbs' => true, // true to include breadcrumbs, false to not, or an array of [name => href, ...]
'content' => null, // the page content; this is required
'raw' => false // whether or not to remove the XenForo layout
]
SCRIPT_PAGE_{KEY} prior to loading XenForo, i.e.define('SCRIPT_PAGE_CONTENT', '<b>Hello world</b>');
This resource has a discussion thread on the forum where you can ask questions, report issues, and talk with the author and other users.
Inactive member accounts are automatically deleted after 1 month. Some countries cannot register and are not allowed to register on this website, there is a reason for that.
All duplicate accounts will be banned and a warning will be issued to the primary account holder.
To ensure a positive and productive experience for everyone, please take a moment to review the site's guidelines and community rules outlined in the link here. Website Rules of Conduct