Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2011, 12:14 AM
dm_fan dm_fan is offline
 
Join Date: Jul 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Countdown to posts total

Hi All
I have a forums where the total posts will be crossing 2,000,000 in a few months. I want to award the person who posts the 2 millionth post a prize. But I'm not sure how I can identify the exact the 2 millionth post. I was hoping there was a mod that would allow me to find the post but haven't had any luck in my search.

Any suggestions?

Thanks
Reply With Quote
  #2  
Old 06-01-2011, 12:54 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chance are you're already over the limit.

What is the highest postid in your database now, what is the current post count on your forum say?
Reply With Quote
  #3  
Old 06-01-2011, 04:54 PM
dm_fan dm_fan is offline
 
Join Date: Jul 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The main page of our forums shows Posts: 1,880,638 under statistics.
A post that was posted a few minutes ago was numbered 4332588.

What limit are you refering to?

Thanks
Reply With Quote
  #4  
Old 06-01-2011, 07:10 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everytime a post is made, it gets a unique id, that counts upwards sequetially.

If you've deleted 220+k posts, you've already gone over the 2 million mark. But, since your current postid shows 4,332,558. That means you've deleted 2+ million posts over the corse of the sites life.

Assuming no more posts get deleted, 4451920 will be the 2 millionth post.
Reply With Quote
  #5  
Old 06-01-2011, 11:30 PM
dm_fan dm_fan is offline
 
Join Date: Jul 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
That makes sense.
There will likely be a number of posts deleted between now and when we reach 2 mil so I'll probably have to recalculate a day or two before we cross the line.

You mentioned a limit earlier. Can you explain? I just don't want to be surprised by a sudden DB crash because we exceeded a limit I wasn't aware of. Our posts table has 1932552 records at the moment.
Reply With Quote
  #6  
Old 06-02-2011, 11:22 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Over the limit, just me being odd and saying you've already gone over 2 million posts in the postid table.
Reply With Quote
  #7  
Old 06-03-2011, 10:11 PM
dm_fan dm_fan is offline
 
Join Date: Jul 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
Over the limit, just me being odd and saying you've already gone over 2 million posts in the postid table.
Got it
Thanks
Reply With Quote
  #8  
Old 06-04-2011, 05:13 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a mod that puts a goal and progress bar on the forum index:
https://vborg.vbsupport.ru/showthread.php?t=255898

But there's no way to know for sure that is the 2 millionth post because as was explained posts are constantly getting deleted.

If you edit your postbit (or postbit_legacy) template, find: $post[message]

Right above or below it put:

Code:
<if condition="$post[postid] == 4451920">
This is the 2 Millionth Post!! <br />
</if>
*That's the number calculated by zachery, adjust it to your needs.

This will put a note in your 2 millionth post so someone will know as soon as they make it. Tell them to contact you if they see the message.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:28 PM.


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.02009 seconds
  • Memory Usage 2,224KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete