TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 13, 2024, 05:01:46 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 102
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 35
  • Total: 35

How to Make a Page at a different URL Yet, Keeping the TPish effect.

Started by Megaforum, November 15, 2007, 04:44:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dragooon

Here is just my 22 cents :P
Want to make something like http://yoursite.com being your homepage and http://forum.yoursite.com being your Forum yet keep it only till SMF/TP? It can also be any page, not just a homepage.
Want to? But don't know how to? Well I have done it, and here is a *alternative* way to do this
A example is http://gforumx.com being the homepage showing TP and SMF whereas the actual TP/SMF is at http://forum.gforumx.com

I took the help of this guide:
   
[SMF 1.1.x] Integrating the forum into your site using SMF's layer system

And all I used on that page was:
<?php
$ssi_theme 
1;
global 
$context;
require_once(
'..path..to...my...forum...test/smf1/SSI.php');
TPortal_init();
template_main_above();

echo 
'
This is to show you the divine power of SMF and TP!!!'
;

ssi_shutdown();
?>

Yup, only that.
It was mainly derived from that Guide only, but I changed a few stuff(see for yourself) and I made this possible :D.

This was my tip for you to make a nice homepage :).

Hope you like it!

IchBin

For future reference TP 1.0 will have the option to use a page without requiring the other layers of SMF. Pretty much just add your own custom blank page. :up:



Dragooon

Thanks :)
I'll soon implement this on my site, once I am done buying SMF Theme shop subscription.

MinasC


Dragooon

Thanks :)
And if you want to hide some panels you can use tp_hidebars function
Before
template_main_above(); Add
tp_hidebars('YOUR BAR');
'center' For Center
'left' For Left
'right' For right.

Dragooon


fangweile

Great!. That was what i am looking for. Thanks for sharing  ;D

wilsy

Hi Dragoon,

Great code!

I have created a page but can't get the ssi_shutdown(); to show at the bottom of the page. When I navigate to this new page it doesnt recognise that I'm logged in and all my menu options disappear.

Any advice? My code is below?

<?php
$ssi_theme 
1;
global 
$context;
require_once(
'/home/rewind01/public_html/forum/SSI.php');
TPortal_init();
tp_hidebars('right');
tp_hidebars('center');
template_main_above();

include_once (
'includes/config.php');
include_once (
'includes/tbs_class.php');


// GET NETWORK TO IMPORT FROM

if ($service != "") {//get service from processor e.g mygmail.php  $service = 'mygmail';

    
$get $service;

}
else {
    
$get $_GET["domain"];
}
if (
$get =="") {

    
$script "myhotmail.php";

    
$img "myhotmail.gif";

}
else {

    
$script $get.'.php';

    
$img $get.'.gif';
}
//select template inner table [var.which] in TBS (email or cvs upload)
if ($table != "") {
    
$which $table;
}
else {
    
$which $_GET['tbl'];
$poweredby_top $footer//powered by
}

//if loading index.php for first time
if ($which == "") {
    
$which 1;
$poweredby_top $footer//powered by
}


$TBS = new clsTinyButStrong;
$TBS->NoErr true;// no more error message displayed.
$TBS->LoadTemplate('template.html');
$TBS->MergeBlock('blk1',$display_array);
$TBS->Show();

echo 
$show;
ssi_shutdown();

?>



Regards and thanks again for the code.

Wilsy.