Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Different categories color/background
#1
Hey? Do you want to have different categories colors or backgrounds? It's simple!

Preview:

[Image: cUz7xUI.png]

Instructions:

Step 1: Go to ACP → Templates & Style → Templates → Your Theme Templates → Forum Bit Templates → Edit forumbit_depth1_cat.

Step 2: Add new class bar{$forum['fid']} next to tborder class.

Quote:<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder bar{$forum['fid']}">

{$forum['fid']}
mean category ID, so click any category and you'll see ID in address bar:

[Image: iUr73W9.png]
Step 3: Create new class in global.css (ACP → Templates & Styles → Themes → Your Theme → global.css → Advenced Mode)

Create new class named .barID .thead where ID mean your category ID.

Example:

Quote:.bar1 .thead {
 background: green;
}

bar1 mean that ID of category is 1. Add another classes with another IDs.

Done! Thanks!
Reply
#2
Cool  very interesting...

thanks for the tutorial.

Its Very Cool the Color Categories!
Reply
#3
Actually a very neat tweak. Thanks for sharing it with the community!
PGP Key (Fingerprint: 23B6 F4C0 FE2D 45AA 61A0 1E86 DB87 09DC DD87 6E40)
Reply
#4
Great working perfect.
Reply
#5
This is something i have posted few years ago : http://community.mybb.com/thread-148818.html
you can check my site for demo Smile
regards
[Image: mnvhXxj.png]
Reply
#6
I was wondering can you use custom colors and not just primaries? for instance #750000 Btw a great plus for me is that it works on my test board mybb 1.8.13 so I can get back my personal page afterall thank you!


Reply
#7
(11-17-2017, 11:17 PM)Starnova Wrote: I was wondering can you use custom colors and not just primaries?  for instance #750000  Btw a great plus for me is that it works on my test board mybb 1.8.13  so I can get back my personal page afterall   thank you!

Its CSS, so you can include anything you wish - including a background image.
Reply
#8
Perfect! thank you!


Reply
#9
And an image in place of color?
Reply
#10
(07-12-2019, 12:56 PM)Diamante Wrote: And an image in place of color?

Use an url in the background: background:url(../your/bgimage.png) repeat #c0c0c0;
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)