Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 20 Sep 2010, 09:33
Areku Areku is offline
 
Join Date: Feb 2002
Row (background) color based on prefix

Hi

I want to color the background of every thread's row based on its prefix.

Ie. PREFIX A is red, PREFIX B is green, PREFIX C is yellow

Hence, having threads

A thread 1
A thread 2
B thread 3
C thread 4
A thread 5

would result in threads' rows colored as

A red thread 1
A red thread 2
B green thread 3
C yellow thread 4
A red thread 5


instead of the alternate default bluish colors


Ideas?


Thanks!
Reply With Quote
  #2  
Old 20 Sep 2010, 14:49
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Change the class of the background row based on the prefix and then define the classes in the CSS to be different for each color.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 20 Sep 2010, 15:12
Areku Areku is offline
 
Join Date: Feb 2002
Which translates into...??

(Sorry I just dont know where to start are there IF clauses for the CSS??)

Thanks!!

Last edited by Areku; 20 Sep 2010 at 16:48.
Reply With Quote
  #4  
Old 22 Sep 2010, 12:00
BigJohnny's Avatar
BigJohnny BigJohnny is offline
 
Join Date: Jul 2006
you will need an if statement for the prefixid's I believe.

<if condition="$prefixid[id-goes-here]" OR $prefixid[other-id-goes-here]> (I'm fairly certain I have mangled that statement, but it's only an example as I don't know the exact code for prefixes)

then you would put your if statements around the code that builds the tables and rows, and it would check prefixes (IDs) and apply your changes.

You would also have to change the class of the tables based on the prefix, so you would need to make a variable for the class, and add multi css entries.


Lynne, am I way off here or am I at least in the ballpark?
__________________
Offering cheap hosting options for your small vBulletin site or dev board. 1GB Space, 5GB Bandwidth, individual cPanel and more. - Contact me for further details.
Ontario Unlimited - Local Freecycling and Community Events
Teamspeak Display - The original vBA CMPS Teamspeak viewer
Reply With Quote
  #5  
Old 22 Sep 2010, 14:50
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You are going in the direction I would go (I'm sure there are many ways to do this). I'd find the row and add

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And then in the Main CSS area, I'd define class1:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 23 Sep 2010, 09:05
Areku Areku is offline
 
Join Date: Feb 2002
Thaaats it, thanks!!!
Reply With Quote
  #7  
Old 28 Jul 2013, 06:38
^SuiCyde^ ^SuiCyde^ is offline
 
Join Date: Dec 2003
Originally Posted by Lynne View Post
You are going in the direction I would go (I'm sure there are many ways to do this). I'd find the row and add

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And then in the Main CSS area, I'd define class1:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I'm very interested in this, and I realize it was a long time ago that it was posted. I apologize!

How would I go about "finding the row" to add that entry?
__________________
Jokes/HipHop/Battles/Exposing Internet Creeps

http://www.OTBVA.com
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:41.

Layout Options | Width: Wide Color: