Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-04-2000 Last Update: Never Installs: 0
 
No support by the author.

Someone asked me how to make alternating colored rows via ICQ and I lost them when I closed ICQ so here it is. This make the rows on the main page and on forumdisplay alternate color instead of alternating columns. 1.1.4
Make sure to remove the SPACES from the { firstaltcolor } and { secondaltcolor} and { timecolor} in the code below!!

Edit index.php:

find:

while ($category=$DB_site->fetch_array($categorys)) {

Add this before it:

Code:
$rowtoggle = 1;
find:

eval("\$tempforumbits .= \"".gettemplate("forumbit")."\";");

Add this BEFORE it:

Code:
          if ($rowtoggle == 1)
          {
             $rowcolor = "{ firstaltcolor }";
             $rowtoggle = 0;
          }
          else
          {
             $rowcolor = "{ secondaltcolor }";
             $rowtoggle = 1;
          }

Edit forumdisplay.php

find:

while ($thread=$DB_site->fetch_array($threads)) {

Add this before it:

Code:
$rowtoggle = 1;
find:

eval("\$forumdisplaybits .= \"".gettemplate("$usetemplatebit")."\";");

Add this BEFORE it;

Code:
  if ($rowtoggle == 1)
  {
     $rowcolor = "{ firstaltcolor }";
     $rowtoggle = 0;
  }
  else
  {
    $rowcolor = "{ secondaltcolor }";
    $rowtoggle = 1;
  }
Replace your forumbit template with this:

Code:
<TR bgcolor="$rowcolor">
<TD align=center valign=top><IMG SRC="images/$onoff.gif" BORDER=0></td>
<TD valign=top><normalfont><B>
<A HREF="forumdisplay.php?forumid=$forumid">$forumtitle</A></B></normalfont><BR>
<smallfont>$forumdescription</smallfont></td>
<td align=center valign=top NOWRAP>
<normalfont>$numberposts</normalfont></td>
<td align=center valign=top NOWRAP>
<normalfont>$numberthreads</normalfont></td>
<td NOWRAP valign=top align=center>
<normalfont><a href="showthread.php?goto=lastpost&forumid=$forumid"><img src="images/lastpost.gif" border=0 alt="Go to last post"></a> $lastpostdate <normalfont COLOR="{ timecolor }">$lastposttime</normalfont>
<br><smallfont>$lastposter</smallfont></td>
<td valign=top align=center>
<normalfont>$moderators</normalfont></td>
</tr>
Replace your forumdisplaybit template with this:

Code:
<TR bgcolor="$rowcolor">
<TD align=center>
<IMG SRC="images/$newoldhot.gif" BORDER=0></td>

<td align=center>
$threadicon
</td>

<td width="100%"><normalfont>
$gotonew <A HREF="showthread.php?threadid=$threadid">$threadtitle</a> <smallfont>$pagenav</smallfont></normalfont>
</td>

<td align=center nowrap>
<normalfont>$firstposter</normalfont>
</td>

<td align=center>
<normalfont>$replies</normalfont>
</td>

<td align=center>
<normalfont>$views</normalfont>
</td>

<td nowrap>
<normalfont><a href="showthread.php?goto=lastpost&threadid=$threadid"><img src="images/lastpost.gif" border=0 alt="Go to last post"></a> $lastreplydate <normalfont COLOR="{ timecolor }">$lastreplytime</normalfont> by $lastposter</normalfont>
</td></tr>
[Edited by freddie on 11-04-2000 at 10:26 PM]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-05-2000, 02:21 AM
Guest
 
Posts: n/a
Default

Thanks so much Freddie you relly helped me. Just one note that when you change the info in the templates make sure that you put in the proper link, i.e. instead of
<A HREF="forumdisplay.php? etc.>, I had to enter <A HREF=forumdispllay.php3? etc.>.
In any case, Freddie I thank you so much. YOU'RE THE BEST!
Reply With Quote
  #3  
Old 11-05-2000, 03:16 PM
Guest
 
Posts: n/a
Default

Thanks. All you need to do is remove the bgcolor from each <td> and place bgcolor="$rowcolor" in the <tr> or replace the templates with mine.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:57 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.03936 seconds
  • Memory Usage 2,205KB
  • Queries Executed 16 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete