nevetS
03 Sep 2006, 06:45
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.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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":
If you didn't follow the instructions above, upload the product-alternating-forum-rows.xml file into your Product Manager
Replace your unmodified threadbit template with updated_threadbit.tmpl.php
Replace your unmodified 3.6.0 forumhome_forumbit_level1_post template with updated_forumhome_forumbit_level1_post.tmpl.php
Replace your unmodified 3.6.0 forumhome_forumbit_level2_post template with updated_forumhome_forumbit_level2_post.tmpl.php
Replace your unmodified 3.6.0 memberlist_resultsbit template with updated_ memberlist_resultsbit.tmpl.php
Replace your unmodified 3.6.0 pm_messagelistbit template with updated_ pm_messagelistbit.tmpl.phpAt 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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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)
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.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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":
If you didn't follow the instructions above, upload the product-alternating-forum-rows.xml file into your Product Manager
Replace your unmodified threadbit template with updated_threadbit.tmpl.php
Replace your unmodified 3.6.0 forumhome_forumbit_level1_post template with updated_forumhome_forumbit_level1_post.tmpl.php
Replace your unmodified 3.6.0 forumhome_forumbit_level2_post template with updated_forumhome_forumbit_level2_post.tmpl.php
Replace your unmodified 3.6.0 memberlist_resultsbit template with updated_ memberlist_resultsbit.tmpl.php
Replace your unmodified 3.6.0 pm_messagelistbit template with updated_ pm_messagelistbit.tmpl.phpAt 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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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)