Instead of having html called by the php file. Create a template in the admin cp and call it by using this function:
PHP Code:
eval("dooutput(\"".gettemplate('templatename')."\");");
Use templates in all sorts of places where you have if statements and replace the html in the if statements with a template call. Then place the html in the template.
Then any html you want outputted on one page call the template right at the end of the php file. And you can use the variable you assigned earlier in the script to put it on the page.
E.g.
PHP Code:
<?
if ($bbuserinfo[posts]>10) {
eval("\$minposts = \"".gettemplate('minposts')."\";");
}
eval("dooutput(\"".gettemplate('mainhtml')."\");");
?>
Your main template:
PHP Code:
<!-- this will be the mainhtml template as it will be called straight away -->
<b>Hello User</b><br />
<!-- Min posts bit -->
$minposts
Now minposts has been called before the final template so you can use the variable to call the minposts template. If the user has less than 80 posts it will output the template 'minposts'. Else it won't.
Just as the script does
- miSt