PDA

View Full Version : counter in postbit_legacy


manuelsechi
09-26-2011, 09:17 AM
hello

what can I do to put a counter into postbit_legacy? I also have seen the $post[postcount] that display the post number in a thread but I just need a counter that display the post number per page, and in the second page restart from zero...

hope this is clear (excuse me for my poor english)

thank you very much
Manuel

manuelsechi
09-27-2011, 01:53 PM
anyone can help me please?

Lynne
09-27-2011, 04:16 PM
I don't understand what you want - do you have an image to show what you want or a link to a site that does this?

The post number is in the upper right corner of each post. The posts per page is a setting that the users set in their control panel.

manuelsechi
09-28-2011, 07:05 AM
Hi Lynne
sorry I don't have any image, I need something similar to the post number
in VB we usually have 10 posts for each thread, so if you have 30 posts, in the first post in the second page the post number is 11
I just need to setup a variable that indicates the post number for the page, in this case the post number for the first post in the first page will be 1, the post number for the second post in the secon page will be 2, and so on.
I need it to use whit JS, not to display to users
thank you very much for your help
regards
Manuel

Lynne
09-28-2011, 03:41 PM
So you want the post number? That variable is already available in the template.

manuelsechi
09-29-2011, 08:05 AM
I need something different from $show['postcount']

kh99
09-29-2011, 08:31 AM
I think I know what you're saying. Do you really need the post number or just a unique number? If you just need a unique number, use the postid. If you really need a counter of posts on the page, there is a $counter variable that might work for you, but it's a global so it might not be available in the template. Maybe try $GLOBALS[counter].

manuelsechi
09-30-2011, 12:10 PM
Dear kh99

thank you, this works perfect!

best regards