vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Alternate infraction infotable backgrounds (https://vborg.vbsupport.ru/showthread.php?t=285342)

Kybyrian 07-09-2012 02:53 AM

Alternate infraction infotable backgrounds
 
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.

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:

Code:

<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. :)


All times are GMT. The time now is 07:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01015 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete