vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   counter in postbit_legacy (https://vborg.vbsupport.ru/showthread.php?t=270924)

manuelsechi 09-26-2011 09:17 AM

counter in postbit_legacy
 
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


All times are GMT. The time now is 06:39 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.00946 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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