MyBB Community Forums

Full Version: Help with template conditionals code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

MikeInToshx

Hey guys,

What PHP code do I use if I want to make an infobar in this forum?:
http://computerhelpforum.be/forum-handle...ips-tricks

Only visible in that forum, not somewhere else.

<if "user in this forum"' then>

<div>...</div>

</if>



EDIT:
This has been solved!
(2014-03-15, 07:10 PM)MikeInToshx Wrote: [ -> ]Hey guys,

What PHP code do I use if I want to make an infobar in this forum?:
http://computerhelpforum.be/forum-handle...ips-tricks

Only visible in that forum, not somewhere else.


<if "user in this forum"' then>

<div>...</div>

</if>



EDIT:
This has been solved!

How?
It depends where you want to put it. Do you want this on the forumdisplay where all the threads are listed?

Open forumdisplay template, and put the code as below. Replace xxx with the number of the forum you want it to show on.

<!--Start special-->
<if ($foruminfo['fid'] =='xxx') then>
	your code here
</if>
<!--end special-->
{$threadslist}

Using ZingaBurga's template conditionals.
Using this plugin: http://community.mybb.com/thread-31860.html
inside template we can define conditions