News: 12 October 2018 - TP Docs is now updated to (soon to be released) Version 1.6.0...!

Docs Navigation

Search Articles


Search in titles
Search in article texts





Question: Can I still make an external page outside TP/SMF directory?
Answer: You can still create an external file outside of TP and the SMF folder itself while retaining the panels & blocks using this method below.

Create your PHP File.

Add To File:
Code: [Select]

// ID of the theme
$ssi_theme = 1;

// Exact path to SSI.php
require_once('SSI.php');

global $context;

TPortal_init();

// Your page Title
$context['page_title'] = 'Demo Page';

template_html_above();
template_tp_above();

// Here comes all your contents
echo 'SMF/TP Rules baby!';

// And this ends stuff
ssi_shutdown();
?>

Several things are commented, make sure to set the exact path to SSI so that it works correctly.
All your content will be added after template_tp_above(); and before ssi_shutdown();

You can do more things like hide certain TP Panels (Or say bar) is
Quote
     tp_hidebars('the side');


Its various valid values are:
'all', 'center', 'top', 'left', 'right', 'bottom', 'lower'.
This function has to be added before the function template_html_above

An Example of added functions to initial above code:
Code: [Select]
// ID of the theme
$ssi_theme = 1;

// Exact path to SSI.php
require_once('SSI.php');

global $context;

TPortal_init();

// Your page Title
$context['page_title'] = 'Demo Page';
// Hide the bars
tp_hidebars('center');
tp_hidebars('right');

template_html_above();
template_tp_above();

// Here comes all your contents
echo 'SMF/TP Rules baby!';

// And this ends stuff
ssi_shutdown();
?>


Doc Written By: Xarcell
Code & Concept Written By: Dragooon
Doc Updated By: Illori - Now works with SMF 2.0.*

Articles in « General questions »