News:

June, 2024 - TP Docs is now running on the newest version of TinyPortal Version 3.0.1.!

Main Menu

Search articles


Search in titles
Search in article texts

Docs Navigation





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:

// 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
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_html_above

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