vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=250845

Row (background) color based on prefix
by Areku
20 Sep 2010 09:33

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!

Lynne 20 Sep 2010 14:49

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.

Areku 20 Sep 2010 15:12

Which translates into...?? ;)

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

Thanks!!

BigJohnny 22 Sep 2010 12:00

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?

Lynne 22 Sep 2010 14:50

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.


Areku 23 Sep 2010 09:05

Thaaats it, ;) thanks!!!

^SuiCyde^ 28 Jul 2013 06:38

Quote:

Originally Posted by Lynne (Post 2101836)
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?


All times are GMT. The time now is 03:00.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.