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: 48
Released: 03 Sep 2006 Last Update: 07 Sep 2006 Downloads: 505
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:	1328
Size:	8.3 KB
ID:	53030   Click image for larger version

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

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

Name:	alternating_thread_listing.gif
Views:	1124
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 23:47

  #31  
Old 06 Sep 2006, 06:46
nevetS nevetS is offline
 
Join Date: Jun 2005
Just uploaded. I'm updating the instructions now, but for upgrades from 0.2, all you just overwrite the plugin, and update the new templates. I attached new pre-modified templates again, so it should be pretty easy.

Today I added memberlist and Private Message listings.
Reply With Quote
  #32  
Old 06 Sep 2006, 06:56
Smoothie Smoothie is offline
 
Join Date: Oct 2001
If we have the previous version installed and have added the new templates (forumhome level 1, level 2 and threadbit), do we need to update those templates too? Or just the newest templates(Memberlist and Private messages)?
Reply With Quote
  #33  
Old 06 Sep 2006, 06:57
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by Ascor
i suggest: the same think for forumdisplay and showthread view, to have the most 3 views harmonised
Forgive me here - but I thought that forumdisplay and showthread were already updated. Either you posted this prior to the update, or maybe I am just thinking of the wrong views?

If I'm wrong, just post a sample url (i.e. forums/showthread.php?t=123) so I can check it on my own forum.

I took a peek and found something like 41 templates that have the possibility of being updated! I don't think I'll be tackling ALL of them just yet
Reply With Quote
  #34  
Old 06 Sep 2006, 06:57
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by Smoothie
If we have the previous version installed and have added the new templates (forumhome level 1, level 2 and threadbit), do we need to update those templates too? Or just the newest templates(Memberlist and Private messages)?
Just the newest ones. The others have not changed.
Reply With Quote
  #35  
Old 06 Sep 2006, 23:43
Ascor's Avatar
Ascor Ascor is offline
 
Join Date: Jul 2006
yes your right, i posted before the update but when i look at your screen, showthread is not inclued
(what i think is this present view here, that you are just reading at this moment)
Tomorrow i install your upgrade

Last edited by Ascor; 06 Sep 2006 at 23:45.
Reply With Quote
  #36  
Old 07 Sep 2006, 04:00
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Originally Posted by nevetS
Just uploaded. I'm updating the instructions now, but for upgrades from 0.2, all you just overwrite the plugin, and update the new templates. I attached new pre-modified templates again, so it should be pretty easy.

Today I added memberlist and Private Message listings.
Might want to check your memberlist_resultbit template. It's got some funny characters in the first line.

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

Reply With Quote
  #37  
Old 07 Sep 2006, 04:23
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by Smoothie
Might want to check your memberlist_resultbit template. It's got some funny characters in the first line.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thanks again smoothie. I copy pasted that from MS Word. It apparently smart-quoted me... In my text editor, they look almost exactly the same.

Template repaired and updated in the zip file. Anybody can use the new file, or replace align=ÓcenterÓ with align="center"
Reply With Quote
  #38  
Old 07 Sep 2006, 10:39
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Installed new version and working. Thanks!
Reply With Quote
  #39  
Old 09 Sep 2006, 23:01
aceofspades's Avatar
aceofspades aceofspades is offline
 
Join Date: Apr 2006
Please help me. I made a thread start column by using this tutorial:

http://www.vbulletin.com/forum/showthread.php?t=197265

which gave me this result:



Your hack worked perfectly before i added that column but now it doesnt match up. Can you please please please tell me how i would go about getting the row colours to alternate like the other columnbs (i.e last post). I would really appreciate it.

Regards,

James
Reply With Quote
  #40  
Old 10 Sep 2006, 10:45
nevetS nevetS is offline
 
Join Date: Jun 2005
Originally Posted by aceofspades
Please help me. I made a thread start column by using this tutorial:

http://www.vbulletin.com/forum/showthread.php?t=197265

which gave me this result:



Your hack worked perfectly before i added that column but now it doesnt match up. Can you please please please tell me how i would go about getting the row colours to alternate like the other columnbs (i.e last post). I would really appreciate it.

Regards,

James
Take a gander at your threadbit template. I suspect you will find an instance of
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or possibly, "alt1", but I'm pretty sure that it's alt2.
simply remove it and you should be fine. Basically, that class declaration is over-riding the color for cells in that column.
Reply With Quote
  #41  
Old 10 Sep 2006, 11:18
aceofspades's Avatar
aceofspades aceofspades is offline
 
Join Date: Apr 2006
Thanks nevetS, you were right. Fixed and working perfectly, thank you
Reply With Quote
  #42  
Old 12 Sep 2006, 12:55
Ascor's Avatar
Ascor Ascor is offline
 
Join Date: Jul 2006
Just installed the update, all working nice, thank's again nevest
Reply With Quote
  #43  
Old 27 Nov 2006, 03:57
Smoothie Smoothie is offline
 
Join Date: Oct 2001
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?
Reply With Quote
  #44  
Old 02 Jan 2007, 01:17
PayBas PayBas is offline
 
Join Date: Jun 2006
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

Last edited by PayBas; 02 Jan 2007 at 01:28.
Reply With Quote
  #45  
Old 18 Jan 2007, 06:00
PennylessZ28 PennylessZ28 is offline
 
Join Date: Mar 2002
Real name: Mike
Originally Posted by PayBas View Post
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.
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 20:12.

Layout Options | Width: Wide Color: