MyBB Hacks

Full Version: $forum['fid'] in forumdisplay_newthread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there.

Currently I'm having issues trying to alter the text of the forumdisplay_newthread templates based on the FID. Here's my code, I've been altering it and searching the forums on here trying to understand why it is not working without any lucky. From what I understand I don't appear to be doing anything wrong?

PHP Code:
<if $forum['fid'] == '2' then>
<a href="newthread.php?fid={$fid}"><span class="button">Support Thread</span></a><br />
<else>
<a href="newthread.php?fid={$fid}"><span class="button">New Thread</span></a><br />
</if>


Any help would be great. Thanks.

You can use $foruminfo['fid'] or $fid in that template.
Ugh, can't believe I didn't think of that. Thanks! Is there any documentation as to what variables to use in each template set?
Open the php file (forumdisplay.php) -> search the template being eval'd (forumdisplay_newthread) -> read code above it.

Pretty much all the variables above are the ones you can use in that template.
Ahh, I see now. Thanks a ton. Smile
Reference URL's