![]() |
Alternating Colored Rows in vBulletin 4 [No Plugin]
How to have alternating colored rows (and not columns) in vBulletin 4. After searching around, I found one by William, Very nice work. His solution is for vBulletin 3 but it can be easily ported to vBulletin 4. As I searched, I saw the problem is talked a lot in forums without any solution for vBulletin 4 and so I decided to put together a solution extending William's work.
1. Edit template forumhome_forumbit_level2_postAdd the following code at the top of the template. Code:
<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if>Now change the first line (first line before inserting the above code) from Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2">Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2 {vb:raw $rowClass}">2. Edit forumhome_forumbit_level1_post / _nopostAdd the following at the top of forumhome_forumbit_level1_post and forumhome_forumbit_level1_nopost template.Code:
<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if>3. Edit StylevarsEdit forumrow_firstentry_background and forumrow_background stylevars and make it transparent by deleting Background Color and Background Image.4.Edit CSSNow add the following CSS in the additional.css template. Code:
.altodd {background-color:#eee;}I hope this helps fellow vBulletin forum webmasters. |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Nice tutorial Shabbir!
:) This was a very common question for webmasters at vBulletin.Org forum! ;) Now it has a solution!! Thanks! |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Thanks and if you see someone looking for something now you know what to do?
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
This is a great work around , however i can not seem to get it working on the forumdisplay page . I.e the sub forums above the threadbits, Any ideas ?
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
You should be. What are you trying on the forumdisplay? I tried myself and it just works fine
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
So far i have edited what you have mentioned above : forumhome_forumbit_level2_post forumhome_forumbit_level1_post forumhome_forumbit_level2_nopost |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Sorry i meant :
forumhome_forumbit_level1_nopost not forumhome_forumbit_level2_nopost |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
that would be amazing thank you, Im using vbulletin 4
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
For having alternating colors for your threads add the following code at the top of the threadbit template.
Code:
<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if>Change Code:
<li class="threadbit {vb:raw thread.statusstring}Code:
<li class="threadbit {vb:raw $rowClass} {vb:raw thread.statusstring} |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Thats great thank you for that , however im still having trouble with the forumdisplay page and the display of the subforums above the threadbit, see image :
imageupload.org/thumb/thumb_32745.png |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Can you have a large image because I am not able to understand anything out of that thumb
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Sorry please see below,
where i have highlighted in red , is suppose to be a light grey : tinypic.com/r/20u68tx/7 |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Your forum has no post and we have not done the changes for forums that don't have posts in it. Try adding one post into that sub forum and then see if it works.
Also I see only one sub forum and for alternating color make them two sub forums |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
I have just added posts and added more subforums but its still the same :
tinypic.com/r/vz8twp/7 |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Can you PM me your forum access and I will be more than happy to help
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Unfortunately not, The forum is being worked on a local machine , not on a server which is online. Its all on vb 4.1.3 on the default fresh install of vbulletin. No edits or mods installed.
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
Weird, Ill try it on another live install when i get time, for now i have just added a background colour to the element in the forumdisplay template so its the same colour as one of the alternatives. It will look ok until i work out whats wrong. Thanks for the help though. Much appreciated. |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
2 Attachment(s)
Quote:
Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2">Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post {vb:raw forum.statusicon} L2">for forum display.its not working.... and i have a little problem with forumdisplay.. before delete : rgb(255, 255, 255) at Forum Row Background. attachment number1 after delete : rgb(255, 255, 255) at Forum Row Background. make it transparent. attachment number 2 how to make it work in forumdisplay? |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Did you follow both the steps because it works for me even in the latest vB 4.x
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
yes i follow all steps..but only working in forumhome..forum display.its not working..
but ,i didnt found this code : Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2">Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post {vb:raw forum.statusicon} L2">Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2 {vb:raw $rowClass}"> |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
here copy from : forumhome_forumbit_level2_post
Code:
<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if> |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
PM Me your forum URL and I will be more than happy to look into it.
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
okay.sent
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
hello,
Send a message via email to shabbir and yahoo messenger.. |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
I don't use Yahoo. Send me message here in the forums.
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
It is working for forum display but for threadbits it is not meant to work but only for forums and not for threads. If you want that refer this post
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
okay.but still not change anything
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
please check at forum display : Forex Foreign Currencies Exchange Trading Discussion
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
im not familiar with this.can u give me the guide? i mean the code.
thanks |
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
okay.done
|
Re: Alternating Colored Rows in vBulletin 4 [No Plugin]
Quote:
|
| All times are GMT +5.5. The time now is 23:56. |