TinyPortal Docs

Documentation For TinyPortal 1.0 => GENERAL => TP 1.0 => General Questions => Topic started by: Xarcell on April 20, 2008, 10:57:44 AM

Title: Can I Still Make An External Page Outside TP/SMF Directory?
Post by: Xarcell on April 20, 2008, 10:57:44 AM
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:

<?php
// 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_main_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
Quotetp_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_main_above

An Example of added functions to initial above code:
<?php
// 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_main_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