PDA

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


22 Jun 2000, 01:32
How can I make $newposts accessable within the fivelinks template?

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

22 Jun 2000, 04:07
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...

22 Jun 2000, 08:04
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]

22 Jun 2000, 08:30
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...

22 Jun 2000, 16:05
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]

22 Jun 2000, 18:01
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.