MyBB Hacks

Full Version: How to detect if forum is "category" without posts or normal forum with posts??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to detect if forum is "category" without posts or normal forum with posts??

How can i detect it in the templates thanks

How can i detect it in the templates thanks, what is the conditional?
In which template? If it is in forumdisplay template, you can use $foruminfo['type']
c means category type, f means forum type

If it is for index, (not quite sure what you want), forumbit_depth1_cat is template for parent category, forumbit_depth2_cat is template for a category (not forum) inside a category.
i need it in forumdisplay_subforums

thanks working well
so how to add this to forumdisplay?

<if $foruminfo['type'] == "f" then>
</if>

like this?
it work
You can't add that to the forumdisplay template because that refers to the entire page.
Reference URL's