PDA

View Full Version : Need $newposts to be known in $fivelinks template


06-22-2000, 12:32 AM
How can I make $newposts accessable within the fivelinks template?

06-22-2000, 02:56 AM
I would just hard code the link in there ie http://www.yourdomain.com/forum/search.php?action=getnew

06-22-2000, 03:07 AM
Because it's determined at runtime whether action=getnew or action=getdaily should be shown....So i definitely need to the variable be known into the template...

06-22-2000, 07:04 AM
Mas*Mind:

Why not just put $fivelinks  $newposts and then delete the other $newposts reference in the template.

Then if you want to use an image over the text just edit
the newposts template.

Parker

[Edited by Parker Clack on 06-22-2000 at 04:04 PM]

06-22-2000, 07:30 AM
I thought about that, but I want it to be part of fivelinks; Because then you have to change just one template if you want to change that part....If you have to insert it every time you insert fivelinks you'll end up w/ several templates if you want to change it (bad explained, hope you'll get it :D)

I know this won't be difficult, just wanted to know if anyone can tell me how before I go to the whole script...

06-22-2000, 03:05 PM
LOL, whoops.

Well, thats easy.

Open global.php, and search for eval("\$fivelinks = \"".gettemplate("fivelinks")."\";");

Underneath it, add:
eval("\$fivelinks .= \"".gettemplate("newposts")."\";");

Thats it. Hope that helps.

[Edited by Krucifyx on 06-23-2000 at 02:57 AM]

06-22-2000, 05:01 PM
Originally posted by Krucifyx
Then add it to the fivelinks template.

The whole point of this thread was how to make $newposts expand when used in $fivelinks.