View Full Version : Different Background colors per forum?
kjsmith84
05-10-2010, 06:17 PM
I was wondering what I need to do to have different background colors per forum ids?
if possiable- or even change the colors of the different modules I have for cmps.
Lynne
05-10-2010, 07:31 PM
Several ways to do it
- Get the class, and add a line in the FORUMDISPLAY template to change the background for the class.
- Use a plugin and add the background for the class.
- Use a different style for that forum.
kjsmith84
05-10-2010, 10:14 PM
Several ways to do it
- Get the class, and add a line in the FORUMDISPLAY template to change the background for the class.
- Use a plugin and add the background for the class.
- Use a different style for that forum.
ok thanks.
in the forum display template would you happen to know the code I would need to enter?
Lynne
05-11-2010, 03:18 AM
Real basic....
<if condition="$forumid == x">
<style type="text/css">
yourclass {background: pink;}
</style>
</if>
kjsmith84
05-11-2010, 03:04 PM
Real basic....
<if condition="$forumid == x">
<style type="text/css">
yourclass {background: pink;}
</style>
</if>
hmmm tried it and seemed not to work?
Lynne
05-11-2010, 06:56 PM
*Exactly* what did you put and where?
kjsmith84
05-11-2010, 07:42 PM
*Exactly* what did you put and where?
well to test it I just tried to put it on the top of the forumdisplay
<if condition="$forumid == 1">
<style type="text/css">
yourclass {background: pink;}
</style>
</if>
Lynne
05-12-2010, 02:33 AM
You can't just put that at the top of FORUMDISPLAY. It needs to go within the <head> tags. Also, I told you to find the class you need to change. I *know* it is not called "yourclass" So, there is no way that will work if you don't put in a valid class.
kjsmith84
05-12-2010, 01:38 PM
You can't just put that at the top of FORUMDISPLAY. It needs to go within the <head> tags. Also, I told you to find the class you need to change. I *know* it is not called "yourclass" So, there is no way that will work if you don't put in a valid class.
ok not sure if this is right but its not working.
couldnt fit all the code but here is where I put it in forumdisplay
<if condition="$forumid == 110">
<style type="text/css">
.forumdisplay{color: pink;}
</style>
</if>
kjsmith84
10-19-2010, 03:45 PM
This is something I still need to figure out- can some one help me a bit more- I have attached a picture of what im wanting to do.
I have my site set up similar to here-vb.org and and I want each seperate cat of forums to have a different color - I think it is the tcat class?
same thing with in the threads them self too.
my site
www.SXS411.com
still have a bunch of stuff still need to be done but trying to get a few of the little things done
Thanks!!
BirdOPrey5
10-23-2010, 11:59 AM
ok not sure if this is right but its not working.
couldnt fit all the code but here is where I put it in forumdisplay
<if condition="$forumid == 110">
<style type="text/css">
.forumdisplay{color: pink;}
</style>
</if>
This is something I still need to figure out- can some one help me a bit more- I have attached a picture of what im wanting to do.
I have my site set up similar to here-vb.org and and I want each seperate cat of forums to have a different color - I think it is the tcat class?
same thing with in the threads them self too.
my site
www.SXS411.com
still have a bunch of stuff still need to be done but trying to get a few of the little things done
Thanks!!
You need to re-read what Lynne said and follow the instructions...
You CAN NOT put this code in the forumdisplay template
You must find for yourself the name of the class, it is NOT "yourclass" nor "forumdisplay." forumdisplay is a template name and NOT the template you need to add this code. You must add it to the HEADER so use "headinclude" template.
kjsmith84
10-25-2010, 02:37 PM
You need to re-read what Lynne said and follow the instructions...
You CAN NOT put this code in the forumdisplay template
You must find for yourself the name of the class, it is NOT "yourclass" nor "forumdisplay." forumdisplay is a template name and NOT the template you need to add this code. You must add it to the HEADER so use "headinclude" template.
ok so I tried
<if condition="$forumid == 1">
<style type="text/css">
tcat {background: pink;}
</style>
</if>
and it sees to work- what if I wanted to add more then one forum id to that color?
whould I use array>
if condition="in_array($foruminfo['forumid'], array(147,1,3))
BirdOPrey5
10-25-2010, 03:03 PM
yes... the array should work but just use $forumid not $foruminfo['forumid'] if $forumid is already working for you.
kjsmith84
10-25-2010, 03:38 PM
yes... the array should work but just use $forumid not $foruminfo['forumid'] if $forumid is already working for you.
well i used what I posted and it works for the most part but .tcat doesnt do the subfoums
you can see that they are still blue. not sure what class that is- tried .thead, td.thead, div.thead, th.thead and non worked- so im not sure what works?
BirdOPrey5
10-25-2010, 08:39 PM
Looks like it's .cat1
kjsmith84
10-27-2010, 03:01 PM
Looks like it's .cat1
worked! thanks!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.