PDA

View Full Version : Custom template


drives_fast
09-14-2001, 01:42 AM
Hello,
I have made a custom template called "links" but I have not yet figured out how to be able to call it in the other templates. What it is ...is a replacement for the header. I only use the $header call on the main forum page and I want to use the links template in many other pages because it is different (thats the reason I dont use the $header call there)

Now I tried calling it with $links but of course...lol....that doesn't work. I am assuming that maybe in global.php something needs to be set....I am still trying to get the hand of the php stuff.

Could someone please help me with the mods I need to do to make the template work?

Also,

I have searched the entire hacks forum and cannot find this. I am wanting to put the "$loggedinusers" on my chat thread (integrated jIRC hack/mod) using the "forumdisplay" in the new style and templates so I modified the code in the "forumhome_loggedinusers" and called it with the "$loggedinusers" but nothing shows up....well.....the number of users doesn't show up.

Any help would be appreciated on this one.

Thanks in advance...drives

drives_fast
09-29-2001, 08:09 PM
anybody?

Admin
09-30-2001, 09:28 AM
Add this to your global.php:
eval("\$links = \"".gettemplate('links')."\";");
right after this:
if (!$header) {
eval("\$header = \"".gettemplate('header')."\";");
} else {
eval("\$header .= \"".gettemplate('header')."\";");
}

WhisperPntr
04-09-2002, 06:24 AM
Do you have to do this with ALL custom templates!?

FWC
04-09-2002, 06:31 AM
Only if you want to be able to call them all over the place. If you just need a template on one page or program, you can use the same code in just that php file.