MyBB Community Forums
Change Subforum Tab Background - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Change Subforum Tab Background (/thread-219228.html)

Pages: 1 2


Change Subforum Tab Background - _BcY - 2018-08-11

Hello guys!
How to change subforum tab background one by one?

[Image: subforum.png]


RE: Change Subforum Tab Background - Serpius - 2018-08-12

(2018-08-11, 11:39 PM)_BcY Wrote: Hello guys!
How to change subforum tab background one by one?

https://i.hizliresim.com/4zVLMp.png

Access to the image has been denied.

So... we can't see what you are wanting.


RE: Change Subforum Tab Background - _BcY - 2018-08-12

Updated the link.


RE: Change Subforum Tab Background - Serpius - 2018-08-12

(2018-08-12, 08:27 PM)_BcY Wrote: Updated the link.

Honestly, I am not certain what you are asking for. Not following this part "one by one". 

Can you clarify this a bit?


RE: Change Subforum Tab Background - isoldehn - 2018-08-12

Admin CP --> Templates & Styles --> Themes --> Default --> global.css

Find .thead and then edit the background color.


RE: Change Subforum Tab Background - Thanos - 2018-08-13

I think he wants to change the color of that thead for each specific forum, not just globally.


RE: Change Subforum Tab Background - Serpius - 2018-08-13

(2018-08-13, 03:08 AM)Thanos Wrote: I think he wants to change the color of that thead for each specific forum, not just globally.

Yea, I think you might be right.


RE: Change Subforum Tab Background - effone - 2018-08-13

Not tested but something like this should work:

Open 'forumdisplay_threadlist' template and locate this line:

<td class="thead" colspan="{$colspan}">

Change it to:

<td class="thead" colspan="{$colspan}" style="background: url('{$mybb->asset_url}/bg_{$fid}.png') repeat">

Now upload the background image files, named after your forum id ('bg_2.png', 'bg_7.png' etc) in your image folder.

You need to upload single image for each forum separately with the outlined naming pattern.


RE: Change Subforum Tab Background - laie_techie - 2018-08-13

(2018-08-13, 12:19 PM)effone Wrote: Not tested but something like this should work:

Open 'forumdisplay_threadlist' template and locate this line:

<td class="thead" colspan="{$colspan}">

Change it to:

<td class="thead" colspan="{$colspan}" style="background: url('{$mybb->asset_url}/bg_{$thread['tid']}.png') repeat">

Now upload the background image files, named after your forum id ('bg_2.png', 'bg_7.png' etc) in your image folder.

You need to upload single image for each forum separately with the outlined naming pattern.


Correct if I'm wrong, but isn't $thread['tid'] the thread_id? I think they would want $thread['fid'] for forum_id; I can't imagine creating a background image per thread. Personally, I would have added a new CSS class based on the forum_id instead of directly referencing an image, which could result in a lot of 404 Not Found messages in your server log.


RE: Change Subforum Tab Background - effone - 2018-08-13

Yes you are correct. Just typed it on the fly using mobile.
Good spot.

May be its $foruminfo['fid'] or just $fid to be more correct (both works).

CSS class usage is the right choice if you know the number of forums you have and remember to add more classes whenever you add a forum. To avoid this remember thing I have suggested inline.