Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Alternating Row Color for Forums / Search Results / Thread Listings Details »
Alternating Row Color for Forums / Search Results / Thread Listings
Mod Version: .3, by nevetS (Member) nevetS is offline
Developer Last Online: Oct 2008 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Rating: (7 votes - 4.57 average) Installs: 49
Released: 03 Sep 2006 Last Update: 07 Sep 2006 Downloads: 512
Not Supported Uses Plugins Template Edits  

What this plugin/modification does:
In the default vBulletin implementation, the colors alternate from left to right - from table cell to table cell. This plugin/modification changes it so that each row changes colors instead.

For a visual, we're talking about changing this:
---------------------------
| red | blue | red | blue |
---------------------------
| red | blue | red | blue |
---------------------------
| red | blue | red | blue |
---------------------------
To this:
-----------------------------
| red |
red | red | red |
---------------------------
--
| blue | blue | blue | blue |
-----------------------------
| red | red | red | red |
-----------------------------


Currently, this plugin enables changing row colors in
  • Forum Listing in the Forum Home page (screenie attached)
  • Sub Forum Listing (screenie attached)
  • Thread Listing (screenie attached)
  • Search Results Page (screenie attached)
  • PM Listing
  • Member Listings
How it works:
The way the colors are currently assigned is via CSS classes. The template changes remove the class definitions from the table cells, and add class definitions to the displayed rows. The CSS Classes used are the "Alt1" and "Alt2" classes - defined in the Admin Control Panel under Style Manager, (style), Main CSS, "First Alternating Color" and "Second Alternating Color".

The Product is named "Alternating Row Color for ForumBits".
Attached to the product are Four plugins:
Alternating Row Color for ForumBits Function - this defines a brief function enabled at the "global_start" hook location.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This function is called from other plugins to define whether or not they should be presented with the "alt1" CSS Class, or the "alt2" CSS Class.
The other three plugins -Alternating Threadbit background, Alternating Row Color for ForumBits, Alternating Row Color Search Threadbit - are copy/paste functionality enabled in three separate locations:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Basically, as vbulletin iterates through creating the rows to display, it calls the function to find out which CSS class to use.
Making minor changes:
If you would rather the colors be switched, simply swap 'alt1' and 'alt2' in the "Alternating Row Color for ForumBits Function" plugin.

What's Involved?
1 Product Installation
4 Plugins (installed all at once, via the product)
47 Changes to 5 Templates

Credit To
VBSeo.com for giving me the idea.


Updates
9/6/2006
got rid of funky quotes in updated_memberlist_reslutsbit.tmpl.php

9/5/2006
Version .3
Updated Mod Description, Install Instructions, downloadable files
Added functionality for Memberlist Alternating Colors
Added functionality for PM Listing Alternating Row Colors
Added new templates - pm_messagelistbit and memberlist_resultsbit

9/3/2006

Updated Mod Description
Installation Instructions
Added additional Screenshots
Uploaded pre-modified out-of-the-box templates
Re-uploaded zip file with appropriate paths
Mod Title Update

9/2/2006
Version .2 - Added plugin to alternate row colors in search results, which also implies the ability to alternate row colors in thread listings.

Installation:
Downloads are on the right. The zip file contains the xml plugin file as well as pre-modified template updates. Only use the premodified templates if the following statements are all true:
1) You are running vBulletin 3.6.0
2) You have not modified the templates to be updated.


There are now 5 templates I have identified that need updating. These templates are:
  • threadbit
  • forumhome_forumbit_level1_post
  • forumhome_forumbit_level2_post
  • memberlist_resultsbit
  • pm_messagelistbit
Step 1) Go into your AdminCP, Click Add/Import Product, Upload the product-alternating-forum-rows.xml file.

For the remaining steps, I'm going to go through three iterations of instructions: "The Really Easy Way", "The Easy Way", and "The Hard Way"
Just Pick ONE set of instructions to follow!
Instructions for "The Really Easy Way":
  1. If you didn't follow the instructions above, upload the product-alternating-forum-rows.xml file into your Product Manager
  2. Replace your unmodified threadbit template with updated_threadbit.tmpl.php
  3. Replace your unmodified 3.6.0 forumhome_forumbit_level1_post template with updated_forumhome_forumbit_level1_post.tmpl.php
  4. Replace your unmodified 3.6.0 forumhome_forumbit_level2_post template with updated_forumhome_forumbit_level2_post.tmpl.php
  5. Replace your unmodified 3.6.0 memberlist_resultsbit template with updated_ memberlist_resultsbit.tmpl.php
  6. Replace your unmodified 3.6.0 pm_messagelistbit template with updated_ pm_messagelistbit.tmpl.php
At this point, you are done. No need to read further or execute anymore steps. Take a look at your forum, if it doesn't look right come back and ask for help.
============================

Installation Instructions for "The Easy Way"
If you didn't follow the instructions above, upload the product-alternating-forum-rows.xml file into your Product Manager

threadbit template updates
1) On the very first line, change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) search and remove:
2) Find all ' class="alt1"' and remove
3) Find all ' class="alt2"' and remove

forumhome_forumbit_level1_post updates
1) On the second line, change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) search and remove:
2) Find all ' class="alt1"' and remove
3) Find all ' class="alt2"' and remove
4) Find all ' class="alt1Active"' and remove

forumhome_forumbit_level2_post
1) On the very first line, change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) search and remove:
2) Find all ' class="alt1"' and remove
3) Find all ' class="alt2"' and remove
4) Find all ' class="alt1Active"' and remove


pm_messagelistbit
1) On the very first line, change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) search and remove:
2) Find all ' class="alt1"' and remove
3) Find all ' class="alt2"' and remove
4) Find all ' class="alt1Active"' and remove

memberlist_resultsbit
1) change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) search and remove:
2) Find all ' AND exec_switch_bg()"' and remove
3) Find all ' class="$bgclass"' and remove
4) Find all ' class="alt1Active"' and remove
5) Find all ' class="alt2"' and remove

At this point, you are done. No need to read further or execute anymore steps. Take a look at your forum, if it doesn't look right come back and ask for help.
============================

Installation Instructions for "The Hard Way"
(see the attached zip file. It was making this thread too difficult to read)

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	alternating_forum_listing.gif
Views:	1337
Size:	8.3 KB
ID:	53030   Click image for larger version

Name:	alternating_search_results.gif
Views:	965
Size:	8.9 KB
ID:	53031   Click image for larger version

Name:	alternating_sub_forums.gif
Views:	849
Size:	7.8 KB
ID:	53032   Click image for larger version

Name:	alternating_thread_listing.gif
Views:	1132
Size:	10.9 KB
ID:	53033  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Miscellaneous Hacks Mark Forums Read from Search Results MThornback vBulletin 3.6 Template Modifications 3 16 May 2007 22:47

Comments
  #2  
Old 03 Sep 2006, 05:56
nevetS nevetS is offline
 
Join Date: Jun 2005
Reserved

Per CheerTobi's request, I added the functionality to alternate row colors for search results. This update actually implies alternating row colors in thread listings as well. (I had an alternate solution in place for thread listings, but making the switch was a simple edit on my board.)

If there are other places that you need alternating row colors, post here. The functionality will probably be a copy/paste once I find the right spot to stick a plug-in.

==========
I updated the modification description and installation instructions extensively. For some reason, the only highlight color that works is green, which is just wierd to me.

I also added some screenies for examples of the results.

Now there is a zip file that contains pre-modified templates, the product xml file, and the instructions in pdf. There's no upgrade - just making things more complete.

Last edited by nevetS; 04 Sep 2006 at 07:36.
Reply With Quote
  #3  
Old 03 Sep 2006, 07:23
Cheertobi Cheertobi is offline
 
Join Date: Aug 2004
Does this also work with search results?
Reply With Quote
  #4  
Old 03 Sep 2006, 14:17
nevetS nevetS is offline
 
Join Date: Jun 2005
I didn't even think about search results. I'm off to Disneyland for the day pretty soon here, so I'll take a gander tonight and see if I can't figure out what template changes need to happen there as well.

Done! Any more problems, let me know! You should just be able to over-write the existing product with the new XML file.

Last edited by nevetS; 04 Sep 2006 at 03:53.
Reply With Quote
  #5  
Old 04 Sep 2006, 03:50
Smoothie Smoothie is offline
 
Join Date: Oct 2001
um, where's the plugin file located?
Reply With Quote
  #6  
Old 04 Sep 2006, 04:03
Ascor's Avatar
Ascor Ascor is offline
 
Join Date: Jul 2006
Just installed to defaut theme and work fine, thank you, the theme is nicer with this
But when i usin in a theme who have this hack installed
http://www.vbulletin.org/forum/showt...90#post1067490
i have a probleme whith the row who display the forum name :/ any idea please ?

here are the mod make with the other hack

Installation Instructions

Step 1: Upload the Plugin via the Product Manager!

Step 2: Edit the forumhome_forumbit_level1_post template

Find:
-----

<td><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>

Replace with:
-------------

<td><img src="<if condition="$show['customstatusicon']">$forum[customicon]<else />$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif</if>" alt="" border="0" /></td>

Step 3: Edit the forumhome_forumbit_level2_post template

Find:
-----

<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>

Replace with:
-------------

<td class="alt2"><img src="<if condition="$show['customstatusicon']">$forum[customicon]<else />$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif</if>" alt="" border="0" /></td>

Step 4: ENJOY
i dont knwo why this is not compatible :/

Last edited by Ascor; 04 Sep 2006 at 04:12.
Reply With Quote
  #7  
Old 04 Sep 2006, 04:13
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Question, when you mention "Also in these templates, simply change the first
<tr>, you mean the very first instance of <tr> or <tr align="center">
Reply With Quote
  #8  
Old 04 Sep 2006, 04:20
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by Smoothie
um, where's the plugin file located?
It's the XML file in the downloads section. I see it... hopefully you can too! :surprised:
Reply With Quote
  #9  
Old 04 Sep 2006, 04:23
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by Smoothie
Question, when you mention "Also in these templates, simply change the first
<tr>, you mean the very first instance of <tr> or <tr align="center">
I'm going to revert my templates and then provide a more detailed installation message. I have these templates customized already, so I'm not absolutely sure of the answer to your question. I'll update the instructions shortly.
Reply With Quote
  #10  
Old 04 Sep 2006, 04:24
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Originally Posted by nevetS
It's the XML file in the downloads section. I see it... hopefully you can too! :surprised:
I see it now, thanks.

Got it uploaded, changed the templates but it doesn't look quite right. Maybe it has something to do with the question in my previous post
Reply With Quote
  #11  
Old 04 Sep 2006, 05:06
Ascor's Avatar
Ascor Ascor is offline
 
Join Date: Jul 2006
i changed first <tr align="center"> in <tr> and it's work at default style (but not with custom icon mod)
Reply With Quote
  #12  
Old 04 Sep 2006, 06:59
Smoothie Smoothie is offline
 
Join Date: Oct 2001
In those 3 templates find all instances of alt1, alt2, alt1active, alt2active and change to $rowClass. Maybe an easier way? Not sure but that works.
Reply With Quote
  #13  
Old 04 Sep 2006, 07:09
nevetS nevetS is offline
 
Join Date: Jun 2005
Ascor - I just installed that plugin, and I am not seeing any problems at the moment. Shortly, I will attach copies of my templates including the custom icon plugin. I did make just one minor change to the instructions - in forumhome_forumbit_level2_post, I removed ' Class="alt2"', but that's it. I LOVE that plugin BTW!

Could you be more specific about what is wrong? Or send me a link? Are you receiving errors? Or are the rows just not alternating colors? Do you have the Forums Arranged in Columns by Xeon mod too? I didn't install that one.
Attached Files
File Type: zip custom_icon_templates.zip (1.5 KB, 24 views)

Last edited by nevetS; 04 Sep 2006 at 07:31. Reason: Attached Templates
Reply With Quote
  #14  
Old 04 Sep 2006, 07:51
Smoothie Smoothie is offline
 
Join Date: Oct 2001
forumhome_forumbit_level1_post updates
1) On the very first line, change Code:
<tr>
to Code:
<tr class="$rowClass">

I don't have that on the first line in forumhome_forumbit_level1_post

Default template, I have this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #15  
Old 04 Sep 2006, 07:58
nevetS nevetS is offline
 
Join Date: Jun 2005
Thanks Smoothie! I updated the instructions. I guess I got a little bleary-eyed while proof-reading.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:58.

Layout Options | Width: Wide Color: