JohnLogar
Active member
I'm trying for few days to integrate the footer and header of XenForo on a standalone PHP file but stuck.
The same thing was done before here for XenForo 1
In file separate.php
Header.php
FrontCroller Class
At the separate.php footer i called the run() function with blank screen output.
Your help would be appericiate.
Thanks
The same thing was done before here for XenForo 1
Unmaintained - Kotomi - Generic script bridge
This is mainly intended for developer use. It lets you embed a non-XenForo/non-MVC script (just about any PHP script should work) into the XenForo page and use XenForo functions such as permissions while still accessing the script from a standard...
xenforo.com
In file separate.php
Code:
$container = true;
$fileDir = dirname(__FILE__)."/{$indexFilePath}";
$dir = __DIR__;
require($dir . '/src/XF.php');
\XF::start($dir);
require "{$fileDir}src/AddonPath/Header.php";
Header.php
Code:
$objFC = new FrontController(\XF::app(),\XF::app()->request());
FrontCroller Class
Code:
class FrontController extends \XF\Mvc\Dispatcher
{
public function runDriven()
{
$html="
<html>
<head>
<title>Some Title</title>
</head>
<body>
Hello world!
</body>
</html>";
return new \XF\Mvc\Reply\View(
'',
'sep_template',
['html'=>$html]
);
}
At the separate.php footer i called the run() function with blank screen output.
Your help would be appericiate.
Thanks