The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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.
|
#3
|
|||
|
|||
Which translates into...??
(Sorry I just dont know where to start are there IF clauses for the CSS??) Thanks!! |
#4
|
||||
|
||||
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? |
#5
|
||||
|
||||
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
HTML Code:
class="<if condition="$threadinfo[prefixid]==xx">class1<if>" HTML Code:
.class1 {background:pink;} |
#6
|
|||
|
|||
Thaaats it, thanks!!!
|
#7
|
|||
|
|||
Quote:
How would I go about "finding the row" to add that entry? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|