PDA

View Full Version : Mini - Post Counter in Split Thread


FWC
01-25-2002, 10:00 PM
We have a forum that needs to remain on topic. I do a lot of thread splitting to move posts to our off topic forum. It can be a real pain sometimes. I've had Bira's post count in threads hack installed since last July. I realized I needed something similar for splitting threads. I did some tinkering using the concept from Bira's hack and came up with this mini hack. It's been working for a while, so I thought I would release it in case somebody else would find it handy. Intstructions attached.

I added a direct link to the post count so you can open the original thread in it's own window for comparison.

FWC
01-26-2002, 03:24 AM
Here's a screenshot:

Lesane
01-26-2002, 10:47 AM
this is a very usefull hack, thanks :up:

FWC
01-26-2002, 04:49 PM
Originally posted by Lesane
this is a very usefull hack, thanks :up: I'm glad you found it useful. I sure needed it. :)

Michelle69
01-26-2002, 05:03 PM
Very nice, FWC :)

TWTCommish
01-26-2002, 06:36 PM
I'm confused: is this hack the addition of the post # on the split thread view? IE: "Post #1," "Post #2," et cetera?

FWC
01-26-2002, 06:54 PM
Originally posted by TWTCommish
I'm confused: is this hack the addition of the post # on the split thread view? IE: "Post #1," "Post #2," et cetera? Yes, it's tiny, but it's something I needed. :)

squawell
01-26-2002, 10:41 PM
i love this one :up: :up:

thankz FWC :D :D

globalwin
07-07-2002, 04:41 PM
can anyone get this to work in 2.2.6?


$counter=0;
$postbits = '';
$countposts = 0;
while ($post=$DB_site->fetch_array($posts)) {
if (++$counter%2==0) {
$post[backcolor]="{firstaltcolor}";
$post[bgclass] = "alt1";
$countposts = $countposts+1;
} else {
$post[backcolor]="{secondaltcolor}";
$post[bgclass] = "alt2";
$countposts = $countposts+1;
}

FWC
07-07-2002, 10:31 PM
It does work in 2.2.6. Did you edit the threads_splitthreadbit template?

globalwin
07-09-2002, 12:33 PM
hmm did it b4 and it didnt, now it DOES, cheers :D good + useful hack.

Xenon
07-09-2002, 12:40 PM
i'm really sorry to have to say that, but, you don't need to hack any file to achieve this effect.

it's just a simple template edit

open you template threads_splitthreadbit
and add
<br><b>Post # $counter</b>

after that: <input type="radio" name="splitpost[$post[postid]]" value="no" checked> No


so this is what ya want, no file modification is needed, and this thread could be moved to template modifications....
sory for decreasing your hack-counter ;)