PDA

View Full Version : Changing this to call a template?


N9ne
12-17-2002, 08:46 PM
global $forumbrowsers;
$count = $forumbrowsers[$forum['forumid']];
if (intval($count) < 1) {
$count = 0;
}

I want to make it so instead of me using $count just to get the number, I actually call another template which is ($count viewing) in it or something...

I'm not sure how to do this though, how do I make it so it calls a template if $count > 0 and it doesn't show anything if $count < 1?

Xenon
12-18-2002, 04:06 PM
global $forumbrowsers;
$count = $forumbrowsers[$forum['forumid']];
if (intval($count) > 0) {
eval("\$textcount = \"".gettemplate('countertext')."\";");
} else {
$textcount =""
}

use $textcount in your output template and create a new template countertext which can use $count in it :)