MyBB Community Forums

Full Version: Different postbit styles for each forums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello world,
I want to use different postbit styles for some forums. I have tried to use that by changing(adding some if statements) postbit template but i didn't work. So which template i should edit or do you have any idea,logic how can i do that?
Thank you in advance.
If you have a look at xThreads

When your in forum management you can set a prefix for that forum's template.
For example if you set one as forum1_ then in global templates you add forum1_postbit and make it different from the normal post bit you get the forum that's assigned the forum1_ prefix will have a different post bit. Smile

In Simple:
  • Edit a forum and enter a "Template Prefix". For example "forum1_"
  • Create a new template in global templates called forum1_postbit (or use your prefix).
Or you can set the postbit style per forum in the Settings Overrides. No templates needed.
uppedpost
(2013-05-30, 02:46 PM)Leefish Wrote: [ -> ]Or you can set the postbit style per forum in the Settings Overrides. No templates needed.
Yes! That's what exactly i need but i didn't quite understand the method so can you tell me how can i do that? And i want to change postbit style just firstpost for six special forums.
^ can you elaborate your requirement
do you want to decorate first post of six special forums ?(eg. different background colors - border)
(2013-06-01, 09:32 AM).m. Wrote: [ -> ]^ can you elaborate your requirement
do you want to decorate first post of six special forums ?(eg. different background colors - border)
Yes and if it is possible without a pluginSmile
^ well, you tried it by using if conditions in templates - right ? for that you have to use template conditionals plugin
see replies here for example work
(2013-06-01, 09:47 AM).m. Wrote: [ -> ]^ well, you tried it by using if conditions in templates - right ? for that you have to use template conditionals plugin
see replies here for example work
Thanks that was what i was looking for thanks and can i do this one like that for special forums;
<if $postcounter == 1 and $thread['fid'] == 2 then>
Special postbit
<else>
Normal postbit
</if>
you can try below code with template conditionals plugin installed. A to F are forum IDs of your special 6 forums.

<if in_array($thread['fid'], array('A', 'B', 'C', 'D', 'E', 'F')) and $postcounter == 1 then>
special postbit
<else>
normal postbit
</if>