MyBB Community Forums

Full Version: Conditional stuff in templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
well can it be done. Say if i wanted different text if the user was a guest or admin or do i have to do some php shizzle?
well it can be dont, but it is not always realible, it is better to have it in the php file.

regards
mmmm bah thats bad will it ever come? cos it would be so much easier.
Why would you want to use php code in html templates?
php is easy, and you can use $ variables in the templates aswell so.
no not php ok like most forums these days you can do something like this

<is:admin> helloo <else:if /> argh </is:admin> in the templates
takin it from the link that Michael said, it should me something like this for example:
<if condition=$mybbgroup['canusercp']== no <then>
<a href="$settings[bburl]/member.php?action=register"><b>Register</b></a><else /></if>
anyone made one good like <is:admin> hello<if:else /> fdhfdh </is:admin>
im digging this old thread up...

Im also looking way to add conditional tags into template

I want to make tabbed header navigation. So I need to add class for active page (memberlist.php, search.php ...):

<a href="link" class="currentpage">Link</a>