vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Alternating Row Color for Forums / Search Results / Thread Listings (https://vborg.vbsupport.ru/showthread.php?t=125654)

aceofspades 09-10-2006 09:18 AM

Thanks nevetS, you were right. Fixed and working perfectly, thank you

Ascor 09-12-2006 10:55 AM

Just installed the update, all working nice, thank's again nevest :)

Smoothie 11-27-2006 01:57 AM

Have a quick question. I added a template and a modification that shows another row on forum home, but the alt1 and alt2 in the new template isn't looking quite right. Is it possible to get this new template to work with this mod?

PayBas 01-01-2007 11:17 PM

I used this product/plugin but now I found this other way that doesnt require plugins, and can be modified super easy for each template it is used in.

http://www.vbulletin-styles.com/showthread.php?t=23841

its basically does the exact same thing :)

PennylessZ28 01-18-2007 04:00 AM

Quote:

Originally Posted by PayBas (Post 1148799)
I used this product/plugin but now I found this other way that doesnt require plugins, and can be modified super easy for each template it is used in.

http://www.vbulletin-styles.com/showthread.php?t=23841

its basically does the exact same thing :)

that link is invalid.

PennylessZ28 01-18-2007 04:15 AM

Oh BTW: If you wanted to make your stickies stand out after doing this, try this little trick:

Code:

<if condition="$thread['sticky'] == 1">
<tr class="sticky">
<else />
<tr class="$rowClass">
</if>

Code:

.sticky {background-color: pink;        color: #000000}

stek2006 02-21-2007 01:42 PM

Thanks so much for this mod - it's exactly what I needed.

I've also modified my templates to use a simpler table row based display on showthread.php - which works fine, but I'd like to use the alternating background colours.

I tried just creating a copy of the 'Alternating Row Color Search Threadbit' plug in and set this to start with the correct postbit hook... changed the tr class to $rowClass but each row seems to show the .alt2 class regardless.

Any suggestions?

maxicep 03-13-2007 11:53 AM

nice hack, installed.

magnus 03-19-2007 05:16 PM

I was using this modification up until I read PayBas's post. To accomplish this without the need for plugins or extra functions simply uninstall the product (leaving the template changes in place) and re-edit the templates listed in the instructions, adding the following to the top of each template:

HTML Code:

<if condition="$altrow =& $GLOBALS['altrow']"></if>
<if condition="!isset($altrow)">
        <if condition="$altrow = 0"></if>
</if>
<if condition="++$altrow % 2 == 0">
        <if condition="$rowClass = 'alt1'"></if>
<else />
        <if condition="$rowClass = 'alt2'"></if>
</if>


That's it. :)

maxicep 03-21-2007 12:02 PM

Quote:

Originally Posted by magnus (Post 1207465)
I was using this modification up until I read PayBas's post. To accomplish this without the need for plugins or extra functions simply uninstall the product (leaving the template changes in place) and re-edit the templates listed in the instructions, adding the following to the top of each template:

HTML Code:

<if condition="$altrow =& $GLOBALS['altrow']"></if>
<if condition="!isset($altrow)">
        <if condition="$altrow = 0"></if>
</if>
<if condition="++$altrow % 2 == 0">
        <if condition="$rowClass = 'alt1'"></if>
<else />
        <if condition="$rowClass = 'alt2'"></if>
</if>


That's it. :)

this hack work with without a product, with your way?

magnus 03-21-2007 01:58 PM

Quote:

Originally Posted by maxicep (Post 1208734)
this hack work with without a product, with your way?

Yes.

maxicep 03-22-2007 10:04 AM

i got a question one more,
how can i this hack work with Zoints Tags showing tags results like forumdisplay.
When showing tags results forumdisplay all backrounds White ,how can i fix ?

DiSpy 03-25-2007 03:46 PM

I did this using the changes in this post.

However, for my templates (v3.6.5) there were a few differences that may help others...
In the instructions for "The Easy Way"

in threadbit template updates
add
4) Find all ' class="alt1Active"' and remove

in memberlist_resultsbit
change
2) Find all ' AND exec_switch_bg()"' and remove
to
2) Find all ' AND exec_switch_bg()' and remove
(removed the trailing " symbol)

and lastly, there were no instances of
5) Find all ' class="alt2"' and remove

ALSO, this broke my other mod that changed the bg color of a row on hover. I did wind up getting both to work, but it was all custom stuff so I won't bother posting exactly what I did (since it'll be different for everyone). Just wanted to let you know that it WILL break that.

THANK YOU!!!! (marked installed)

dynamot 08-08-2007 03:02 PM

Can I apply this to vb 3.6.8 version?

maxicep 08-18-2007 11:22 AM

how can i make row color for similar threats ?

amnesia623 08-31-2007 08:05 AM

nice - thank you

needaltuna 09-19-2007 04:16 AM

Many thanks to everybody who's provided a plugin/script with which to achieve this effect.

Somebody has already asked this question, but didn't receive an answer. Do these mods work in 3.6.8?

needaltuna 09-20-2007 05:56 AM

In 3.6.8, the first line of forumhome_forumbit_level2_post has "<tr align="center">" on it instead of "<tr>". Should this be changed to "<tr class="$rowClass">"?

needaltuna 09-20-2007 08:50 AM

Well, it works in 3.6.8. Check out the main page of my forum.

http://www.afeastoffumetti.org/

The only problem with it is that it doesn't alternate the row colors on pages like this.

http://www.afeastoffumetti.org/forumdisplay.php?f=3

Anyone know how I can correct this?

needaltuna 09-21-2007 06:43 AM

Well it turned out that this hack didn't work so well in 3.6.8. In the memberslist page, I got the following error message.

Quote:

Parse error: syntax error, unexpected '<' in /home/needa/public_html/memberlist.php(831) : eval()'d code on line 14
Anyway, I had to replace the new code with the old.

It'd be nice if somebody came up with a updated version of this hack for the latest version of vBulletin. Got a feeling, though, that everybody but me has abandoned this thread. Pity.

magnus 09-27-2007 01:51 AM

Quote:

Originally Posted by needaltuna (Post 1343644)
Well it turned out that this hack didn't work so well in 3.6.8. In the memberslist page, I got the following error message.



Anyway, I had to replace the new code with the old.

It'd be nice if somebody came up with a updated version of this hack for the latest version of vBulletin. Got a feeling, though, that everybody but me has abandoned this thread. Pity.

The method in my previous post(s) works fine (tested in 3.6.8). I'd check for typos.

bulletinboard 10-25-2007 01:01 AM

Excellent, just what I was looking for.

NicholasMarshal 11-02-2007 11:46 AM

Quote:

Originally Posted by magnus (Post 1207465)
I was using this modification up until I read PayBas's post. To accomplish this without the need for plugins or extra functions simply uninstall the product (leaving the template changes in place) and re-edit the templates listed in the instructions, adding the following to the top of each template:

HTML Code:

<if condition="$altrow =& $GLOBALS['altrow']"></if>
<if condition="!isset($altrow)">
        <if condition="$altrow = 0"></if>
</if>
<if condition="++$altrow % 2 == 0">
        <if condition="$rowClass = 'alt1'"></if>
<else />
        <if condition="$rowClass = 'alt2'"></if>
</if>


That's it. :)

Well done, works like a treat

MichaelJohnston 03-24-2008 11:36 PM

Sweet man, this is the way it should be. Thanks a MILLION!

brendanc 05-04-2008 04:17 AM

Would like to point out that this works with 3.7.0 as well. Thanks!

karp2381 07-08-2008 01:24 AM

This code is great! Thanks a bunch.

ringleader 11-01-2008 03:22 PM

Works great with 3.7.3 PL1.

Thanks so much for making it!

Uneek 01-07-2009 10:38 PM

Is this method still safe for vbulletin 3.8.0?

ddurazo 02-18-2009 06:09 PM

it does work for 3.8.0 however one of the templates u have to modifiy is slightly different, it has a few lines of code above the first <tr> so be careful with that and you should be good to go

escavern 12-08-2011 03:28 PM

Doesnt work with Internet Explorer.. and im googling it and there are many people says alternate row color is not compatible with IE8+IE9.. any solutions ?

ringleader 12-08-2011 04:28 PM

Hey, I had kind of stopped developing for vbulletin for the last year or so, but I will look at this.

Thanks for the feedback - I had no idea there were issues in IE8 and IE9 (they didn't exist at the time!)

Quote:

Originally Posted by escavern (Post 2275917)
Doesnt work with Internet Explorer.. and im googling it and there are many people says alternate row color is not compatible with IE8+IE9.. any solutions ?


muimui 04-25-2013 11:05 AM

its working for vb 4.21 version?


All times are GMT. The time now is 01:37 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.01260 seconds
  • Memory Usage 1,808KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete