php scripts in the shell forum??

avgaz

Member
Hello, I want to go to that forum with forum IPS. But before buying I need to know whether it is possible within the forum to open up different php scripts. On the forum the IPS is done so
PHP:
<?php
require_once '/init.php';
\IPS\Dispatcher\External::i();
\IPS\Dispatcher\Build::i();
$content = 'Hello Hello';
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( 'Page Title', $content, array( 'app' => \IPS\Dispatcher::i()->application->directory, 'module' => \IPS\Dispatcher::i()->module->key, 'controller' => \IPS\Dispatcher::i()->controller ) ) );
?>
And how to do it in XF2??
 
you can use the simplest example of a php page like when I wrote above for IPS

XenForo isn't really designed like that, it works much better when using the standard systems.

Page nodes would allow you to do what you're doing with the plain php script there, and (as Jake said), you can add a static method callback to add more information. If you're not using other data, just the current visitor, then you don't even need the callback - all templates by default come with the visitor's User entity (in XF2 - in XF1 it's the visitor object) accessible.

Liam
 
Back
Top Bottom