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

Recent

Welcome to TinyPortal. Please login or sign up.

April 27, 2024, 02:07:00 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 90
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 52
  • Total: 53
  • @rjen

How to make a external page with keeping the TP stuff - For TP 1

Started by Megaforum, January 29, 2008, 12:02:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dragooon

A Quick guide by me on how to make a external page outside of TP but keeping TP's blocks
Example - http://gforumx.com being page and http://forum.gforumx.com being my forum with TP/SMF(TP v1).

To start with in a php file add

<?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 are added after template_tp_above(); and before ssi_shutdown();

Some more stuff, Would you like to hide some bars?
So here are the ways
The function to hide a TP Panel(Or say bar) is
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
A Example which hides center and right bars
<?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();
?>

What can this be used for? Well for integrations and making page outside SMF/TP.

This only works for TP 1 not for TP 0.9.8.
For a guide for TP 0.9.8 see :
http://www.tinyportal.net/index.php?topic=20069.0

You can ask any question here.

Thanks :)

G6Cad


IchBin

You do realize there is a blank page option in TP 1.0 ? Unless I'm not getting the significance of this... lol

Dragooon

There is?
And this is for files completely outside of SMF lol.

IchBin

Yes, when creating an article just make it an external type if I remember right. This gives you the "files outside of SMF" feel. Which is why I suggested it. :) But this is cool anyway. Thanks for figuring it out. :)

Crip

it's like having WP blog in an Iframe within an Article which is a very cool tool..

  I made a rhyme :P
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



bloc

Yes, the "import article" can simply fetch external files..but I think this way the actual adress will be outside(or can be) the forum folder.

Great for those that like to have frontpage - or splash page - on root, while forum in a folder.

Excellent guide :up:

Dragooon

Yup, the actual files can be outside the forum folder itself.

Thank you for your comments and I added the way to hide specific bars in the guide.

Crip

I think I'll try making a splash page leading to
my forum with your code -- if it screws up my
forum at all look out Goony. :P
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Dragooon

There is no way it can screw a forum because it doesn't alter a forum file but I'll find a hideout anyway :P

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes




Dragooon

Can someone move this to public boards now that TP 1 is out?


Heero

This totally rocks,
thanks again Dragooon!
I love you work :)

wilsy

Quote from: Heero on April 23, 2008, 07:25:03 PM
This totally rocks,
thanks again Dragooon!
I love you work :)

Me too! ;)

Is there still not a solution to display front page blocks?

Regards,

Wilsy.

Dragooon

I think front page Blocks can be displayed, Not sure how. I'll see to it later once I am done with my upcoming module.

wilsy

Quote from: Dragooon on April 25, 2008, 12:56:29 PM
I think front page Blocks can be displayed, Not sure how. I'll see to it later once I am done with my upcoming module.

Thanks Dragooon!

fangweile

Is it working in tp beta 3, i am having problem when trying to use it in beta 3

IchBin

You can actually use an article now to do the same type of thing. Articles have the option to not show anything from TP/SMF except the copyright at the bottom if you'd like to try that out.

fangweile

No, I am using the code as my header in my coppermine theme. How do i hide all the blocks in beta 3. The first post code seems doesn't work for me. @_@

IchBin

Hide the blocks on what page? Perhaps you could provide some details about what you have and what you're trying to do?

dry3210

Would either of these ways be good to run the shoutbox but not have the header or anything else?  Just the shoutbox and thats it.  Kind of like a detach shoutbox for people with dual screens.

IchBin


dry3210

Quote from: IchBinâ„¢ on April 02, 2009, 08:38:34 PM
The only way you'll find that out is to try it. :)

Well I did try the built in way but it still has the top banner/info and links along with the left panel that comes out.

I guess I'll give the other way a try but I'm thinking it might be the same deal.