News: April 7, 2019 - TP Docs is now updated to Version 1.6.3...!

Search Articles


Search in titles
Search in article texts

Docs Navigation





Author Topic: Can I Still Make An External Page Outside TP/SMF Directory?  (Read 5185 times)

Offline Xarcell

  • Full Member
  • ***
  • Posts: 137
Can I Still Make An External Page Outside TP/SMF Directory?
« 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:
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_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
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_main_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_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
« Last Edit: May 13, 2008, 01:09:25 PM by Ken. »