The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hi there,
I am trying to come up with a way to make two very nice (but not very complicated) hacks work together. The first is bira's Post Counter Hack, which dwh updated for v2.0.3: http://www.vbulletin.com/forum/showt...threadid=22083 The second is leadZERO's Custom Thread Ordering hack: http://www.vbulletin.com/forum/showt...threadid=10758 The problem here is that when a user selects the "Reverse Chronological Post Order" (which a lot of people on our forums apparently want to do!), the post numbering is reversed. In other words, the most recent message is (correctly) displayed first, but (incorrectly) shows as #1. This seems like a really easy problem to fix, since all one would need is a variable in showthread.php that contains the total number of posts in a thread. Right now the counter works like: // to determine which number to begin with on each page $countposts = ($pagenumber-1)*$perpage; and later on, $countposts = $countposts+1; To increase the counter. Now if there was a var that held the total # of posts in a thread (equal to replies + 1) it would be quite obvious to do something like: $countposts = $totalreplies+1; // (or whatever) and then $countposts = $countposts-1; As well as adding all of the appropriate checks for which order the user has selected. Anyway, is there an existing variable somewhere in showthread.php that contains that info? If not, is there a way to get the size of the array of posts in a particular thread, without actually looping through it and incrementing? It seems that this method would add a whole ton of unwanted database queries. As you can see this is really my first foray in PHP/MySQL stuff. Thanks! |
#2
|
|||
|
|||
I figure I might as well bump this back to the top just once to see if anybody can still help me out.
Won't do it again. Thanks! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|