TinyPortal

Development => Resources => Topic started by: Dragooon on January 29, 2008, 12:02:16 PM

Title: How to make a external page with keeping the TP stuff - For TP 1
Post by: Dragooon on January 29, 2008, 12:02:16 PM
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 :)
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: G6Cad on January 29, 2008, 03:15:32 PM
Your beeing buissy Dragooon :)  Gret work done  :up:
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: IchBin on January 29, 2008, 03:53:02 PM
You do realize there is a blank page option in TP 1.0 ? Unless I'm not getting the significance of this... lol
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Dragooon on January 29, 2008, 04:52:20 PM
There is?
And this is for files completely outside of SMF lol.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: IchBin on January 29, 2008, 06:25:14 PM
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. :)
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Crip on January 29, 2008, 11:48:10 PM
it's like having WP blog in an Iframe within an Article which is a very cool tool..

  I made a rhyme :P
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: bloc on February 01, 2008, 08:20:20 AM
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:
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Dragooon on February 01, 2008, 08:36:06 AM
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.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Crip on February 01, 2008, 10:09:34 AM
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
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Dragooon on February 01, 2008, 10:19:31 AM
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
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Crip on February 01, 2008, 10:21:08 AM
Lmao ;)
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: bloc on February 01, 2008, 05:59:26 PM
lol :D
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Dragooon on April 20, 2008, 05:03:31 AM
Can someone move this to public boards now that TP 1 is out?
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Xarcell on April 20, 2008, 06:31:56 PM
I have converted this to a doc.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: Heero on April 23, 2008, 07:25:03 PM
This totally rocks,
thanks again Dragooon!
I love you work :)
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: wilsy on April 25, 2008, 11:56:21 AM
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.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: 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.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: wilsy on June 10, 2008, 03:05:43 PM
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!
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: fangweile on March 20, 2009, 11:19:57 AM
Is it working in tp beta 3, i am having problem when trying to use it in beta 3
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: IchBin on March 20, 2009, 10:12:50 PM
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.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: fangweile on March 21, 2009, 12:45:51 AM
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. @_@
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: IchBin on March 21, 2009, 03:38:52 AM
Hide the blocks on what page? Perhaps you could provide some details about what you have and what you're trying to do?
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: dry3210 on April 02, 2009, 04:50:26 PM
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.
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: IchBin on April 02, 2009, 08:38:34 PM
The only way you'll find that out is to try it. :)
Title: Re: How to make a external page with keeping the TP stuff - For TP 1
Post by: dry3210 on April 02, 2009, 09:33:22 PM
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.