Change Individual Category Background Color

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Ideas Centre
User avatar
WebDesignByJason
Registered User
Posts: 20
Joined: Wed Feb 23, 2011 8:55 pm
Name: Jason

Change Individual Category Background Color

Post by WebDesignByJason » Thu Mar 31, 2011 7:24 pm

Spent a good 20 mins searching through these forums and around the web for a way to do this with no luck. Pretty sure it can be done in PHP by assigning a different style to a specific category ID. My issue is I am not sure how that can be accomplished or how to identify a categorys ID.

I would like to be able change the background color for 1-2 of the categories on my site much like the example done crudely in photoshop below.

Using prosilver
Image

If anyone has done this before and remembers the steps/ has the spinets of code it would be much appreciated.

Davir
Registered User
Posts: 66
Joined: Sat May 20, 2006 9:49 pm

Re: Change Individual Category Background Color

Post by Davir » Thu Mar 31, 2011 9:16 pm

/styles/prosilver/theme and find colurs.css And experiment
Nothinhg here

User avatar
WebDesignByJason
Registered User
Posts: 20
Joined: Wed Feb 23, 2011 8:55 pm
Name: Jason

Re: Change Individual Category Background Color

Post by WebDesignByJason » Sat Apr 23, 2011 12:01 am

I was able to change it overall but not an individual topic, if anyone has successfully done this and remembers the steps they took I would appreciate it.

richbouchard
Registered User
Posts: 31
Joined: Tue Jul 14, 2009 5:42 pm

Re: Change Individual Category Background Color

Post by richbouchard » Mon Sep 26, 2011 11:59 am

Did anyone ever solve this? I'm looking to do the exact same thing. I've searched the mod database and the nearest I could come up with is the background image mod. But all I want to do is change the colour for an individual category so that it's highlighted with respect to the other categories on my board's index page.

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Wed Jan 04, 2012 9:09 pm

In colour.css at the end insert:

Code: Select all

div.forum-8 {
    background: #F87431;

}
Number 8 is the category id. For each category paste same code one after another and edit it.

Hope it work for you. Don't forget to REFRESH your THEME in ACP!
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Sun Feb 10, 2013 7:55 pm

mladiucitelj wrote:In colour.css at the end insert:

Code: Select all

div.forum-8 {
    background: #F87431;

}
Number 8 is the category id. For each category paste same code one after another and edit it.

Hope it work for you. Don't forget to REFRESH your THEME in ACP!
Hm, when I tried to put this to my other forum it's just not working. When I press F5 I can only for a second see my other colour and then it shows default prosilver again. Any idea or help?
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

ronjan
Registered User
Posts: 78
Joined: Wed Feb 06, 2013 7:36 am

Re: Change Individual Category Background Color

Post by ronjan » Sun Feb 17, 2013 11:37 pm

I have the same problem sometimes when changing css
The solution is to go to the ACP - Styles tab - Create new style / optional base select your standard style (prosilver) and click submit. Set it to standard style and the css will be loaded correctly.

phpbb people claim it happens because of use of the phpbb editor,
but I ALWAYS use Notepad++ for all edits

User avatar
Lumpy Burgertushie
Registered User
Posts: 66328
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Change Individual Category Background Color

Post by Lumpy Burgertushie » Mon Feb 18, 2013 12:19 am

that really has nothing to do with making these types of changes.

all you have to do is use a real ftp program to download the relevant file, edit it using a good text editor only.

upload back , go to the admin panel, styles, refresh the template/imageset or theme depending on what you are changing.

then sometimes you have to refresh your browser to see the changes.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Mon Feb 18, 2013 7:44 am

Lumpy Burgertushie wrote:all you have to do is use a real ftp program to download the relevant file, edit it using a good text editor only.

upload back , go to the admin panel, styles, refresh the template/imageset or theme depending on what you are changing.

then sometimes you have to refresh your browser to see the changes.


robert
I've done all that, but it won't work on my second board.
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

User avatar
Lumpy Burgertushie
Registered User
Posts: 66328
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Change Individual Category Background Color

Post by Lumpy Burgertushie » Mon Feb 18, 2013 2:53 pm

mladiucitelj wrote:
Lumpy Burgertushie wrote:all you have to do is use a real ftp program to download the relevant file, edit it using a good text editor only.

upload back , go to the admin panel, styles, refresh the template/imageset or theme depending on what you are changing.

then sometimes you have to refresh your browser to see the changes.


robert
I've done all that, but it won't work on my second board.
what does "it wont work" mean exactly?

if you are doing it correctly, it works on any board.


if you give us some details maybe we can help you figure out what the problem is.

thanks,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Mon Feb 18, 2013 3:06 pm

Well, in my colour.css I have:

Code: Select all

div.forum-3 {
    background: #F87431;

}

div.forum-1 {
    background: #275252;

}

div.forum-8 {
    background: #275252;

}
Uploaded file, refreshed everything (browser too), but it won't show up. Check my signature for my board.
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

User avatar
Lumpy Burgertushie
Registered User
Posts: 66328
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Change Individual Category Background Color

Post by Lumpy Burgertushie » Mon Feb 18, 2013 3:22 pm

sorry, I thought you meant that editing in general did not work. I have no idea if whether this particular edit will do what he said at all.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Mon Feb 18, 2013 3:26 pm

The point is that it works on my other board! With same edits...
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

User avatar
nextgen
Jr. Style Validator
Posts: 2334
Joined: Mon Jul 26, 2010 10:58 pm
Location: Guatemala
Name: Melvin García
Contact:

Re: Change Individual Category Background Color

Post by nextgen » Mon Feb 18, 2013 3:52 pm

メルビン・ガルシア • Xtrato SolutionsMy active styles for phpBBphpBB Argentina - Soporte en español🇦🇷

Please do NOT contact for support via PM or email.

User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: Change Individual Category Background Color

Post by mladiucitelj » Mon Feb 18, 2013 4:37 pm

Found simple solution!

Open styles/prosilver/template/forumlist_body.html

FIND:

Code: Select all

	<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
		<div class="forabg">
REPLACE WITH:

Code: Select all

	<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
		<div class="forabg"><!-- IF forumrow.S_IS_CAT --> forum-{forumrow.FORUM_ID}<!-- ENDIF -->">
Open styles/prosilver/thme/colour.css at the end insert:

Code: Select all

div.forum-8 {
    background: #F87431;

}
Number 8 is the category id, this #F87431 is colour number. For each category paste same code one after another and edit it.

REFRESH your TEMPLATE and THEME in ACP!
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System

Locked

Return to “[3.0.x] Styles Support & Discussion”