vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Alternating Rows... not columns (https://vborg.vbsupport.ru/showthread.php?t=64078)

Jolten 04-19-2004 01:46 AM

Alternating Rows... not columns
 
I see this has been asked a couple times with no real answer for vb3 or 3.0.1.

I found a hack that alternates rows in the forumhome_level2_post template but... does anyone know haw to alter the forum display so that the alternating rows carry over to the thread views rather than just on the forum home?

Thanks.

Zachery 04-19-2004 06:02 AM

It can be done with a template modifcation.. :)

Zachery 04-19-2004 07:17 AM

<a href="http://www.vbulletin.com/forum/showthread.php?t=100759" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=100759</a>

Jolten 04-19-2004 04:13 PM

Zachery, I've applied that template modifaction. it adjusts the forum home but it does not adjust the forum display template. Wha tthis means is that the rows alternate on the forum home only. Threads within forums do not alternate rows. They are still alternating columns. I'd like to get threads to alternate rows as well as the forum home.

Jolten 04-20-2004 02:16 AM

Okay I got closer. By adding the if statement using $thread[threadid] in the threadbits template I got alternating rows. However, the colors are assigned by thread ID so they dont' alternate properly. If someone posts to a thread, it moves up in the list, but retains it's originally assigned class.

So.. with this...

Code:

<if condition="$thread[threadid] % 2 == 0">class="alt2"<else />class="alt1"</if>
can anyone help me make that statement conditional on the display order of the thread rather than the thread ID? I did try $thread['displayorder'] but that didnt' work at all.

Thanks.

amykhar 04-20-2004 03:34 AM

what needs to be done is similar to what is done assigning numbers to posts in a thread. postid's are not consecutive either, but posts have consecutive numbers in the postbit.

You need to mimic that code in forumdisplay when creating the list of threads.

Amy

Jolten 04-20-2004 03:42 AM

Actually I got is sorted thanks to daemon over at vbulletin.com. It actually needed a simpler code in the threadbits template.


add:
Code:

<if condition="exec_switch_bg()"></if>
To the top of the template. Then change td classes to $bgclass in the rest of the template


All times are GMT. The time now is 03:20 AM.

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.01082 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete