TP Documentation site

Welcome to the offical documentation site for Tinyportal!

Can I Still Make An External Page Outside TP/SMF Directory?

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]
<?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_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]
<?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_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.*

Pages: [1]
  • Print
  • Reply with quote



  • Comments:

    There are no comments.

Page created in 0.046 seconds with 33 queries.