The Arcive of vBulletin Modifications Site. |
|
Calling a template on command line Details »»
|
|||||||||||||||||||||||||
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 Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
This code should achieve the effect that you're looking for.
PHP Code:
g-force2k2 |
|
#3
|
|||
|
|||
|
SWEET !!!!
![]() 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
|
|
#4
|
|||
|
|||
|
Hey no problem glad that you appreciate the help.
Regards, g-force2k2 |
|
#5
|
|||
|
|||
|
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
|
|
#6
|
|||
|
|||
|
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
|
|
#7
|
|||
|
|||
|
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 |
![]() |
|
|