Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 3 Months, 4 Weeks, 1 Day ago Change Subforum Tab Background
#1
Solved: 3 Months, 4 Weeks, 1 Day ago
Hello guys!
How to change subforum tab background one by one?

[Image: subforum.png]
Reply
#2
Solved: 3 Months, 4 Weeks, 1 Day ago
(08-11-2018, 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.
I'm Serpius and You're Not
[Image: 5M7sb0n.png?1]
Reply
#3
Solved: 3 Months, 4 Weeks, 1 Day ago
Updated the link.
Reply
#4
Solved: 3 Months, 4 Weeks, 1 Day ago
(08-12-2018, 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?
I'm Serpius and You're Not
[Image: 5M7sb0n.png?1]
Reply
#5
Solved: 3 Months, 4 Weeks, 1 Day ago
Admin CP --> Templates & Styles --> Themes --> Default --> global.css

Find .thead and then edit the background color.
> SELECT finger FROM hand WHERE id='3'
Reply
#6
Solved: 3 Months, 4 Weeks, 1 Day ago
I think he wants to change the color of that thead for each specific forum, not just globally.
Reply
#7
Solved: 3 Months, 4 Weeks, 1 Day ago
(08-13-2018, 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.
I'm Serpius and You're Not
[Image: 5M7sb0n.png?1]
Reply
#8
Solved: 3 Months, 4 Weeks, 1 Day ago
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.
[Image: dehibernate.png]
Reply
#9
Solved: 3 Months, 4 Weeks, 1 Day ago
(08-13-2018, 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.
Reply
#10
Solved: 3 Months, 4 Weeks, 1 Day ago
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.
[Image: dehibernate.png]
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)