![]() |
Calling a template on command line
What UI am trying to do is call a specific template from the command line, something like...
http://mysite.com/forum/index.php?template=forumhome http://mysite.com/forum/index.php?template=articlehome http://mysite.com/forum/index.php?te...=marketinghome http://mysite.com/forum/index.php?template=whateva I imagine I need some sort of moderator in index.php to do this. Can anyone help me out? Thanx |
This code should achieve the effect that you're looking for.
PHP Code:
g-force2k2 |
SWEET !!!! :D
Thank you m8 - works perfect! Just the ticket I needed. If I leave in the eval("dooutput(\"".gettemplate('forumhome')."\");" ); then it defaults to forumhome if I dont specify the template= Thanx again :D |
Hey no problem glad that you appreciate the help.
Regards, g-force2k2 |
Just noticed a minor problem (I was wrong above - spoke a little too soon)
If a Template is NOT specified, I get "<!-- // End of vbPortal calendar script " .. hmmmm If I leave the eval("dooutput(\"".gettemplate('forumhome')."\");" ); statement in, then I actually get both my called template and the forumhome template all on the same page. This should be easy (but I am stupid), but I could use a statement to use forumhome if no template specified. That would really just be a fallback cause I am gonna specify a template with almost anything - more worried about the script making the call itself. Tyhanx much again :D |
Any help on this one. What I need is a statement to go along with
if ( $template ) { eval ( "dooutput ( \"" . gettemplate ( $template ) . "\" ) ;" ) ; } so that if template=null (i.e., no template called), the forumhome or other default template is used. As it stands now, if I just use index.php, I get a blank page because no template is used. Thanx again if you can help :D |
Its alright Webby, anyhow i recoded to fix the changes that you talked about and also added something to restrict calling a specific template on command so that they don't end up with a white page.
PHP Code:
g-force2k2 |
All times are GMT. The time now is 11:18 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|