PDA

View Full Version : Alternate infraction infotable backgrounds


Kybyrian
07-09-2012, 02:53 AM
Hey guys, it's always been a little bit of a problem when issuing an infraction to a user to see that mono-colored background in the infractions table. My idea was to give each alternating infraction displayed a different background color (i.e. grey) to make for less mischecking and a need to highlight just to line an infraction and its checkbox up correctly.

(screenshot) This is the sort of stuff I'm talking about. (http://puu.sh/GZXu)

Now the raw HTML displays this as a table. And each separate infraction is held in a <tr>. My idea was to give each alternating <tr> a class, but the problem is I wouldn't know to go about doing this since it's not something you can just directly edit for each alternating infraction. Any help with this? Would be really appreciated.

kh99
07-09-2012, 12:38 PM
This is kind of an ugly hack but it works: edit the userinfractionbit template and at the top where the <tr> tag is, change it to something like this:

<vb:if condition="$GLOBALS['userinfractionbit_bg'] = !$GLOBALS['userinfractionbit_bg']">
<tr>
<vb:else />
<tr style="background: grey">
</vb:if>


("grey" actually looks too dark, but of course you can change either or both <tr> tags to style it any way you want).

Kybyrian
07-09-2012, 09:37 PM
Thanks for the help kh99, much appreciated. :)