Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Tommy Boy Tommy Boy is offline
Developer Last Online: Oct 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-07-2001 Last Update: Never Installs: 1
 
No support by the author.

This hack adds a static counter to each post, in addition to the dynamic (total user posts) counter, which is currently used. It will show "Posts: 55/73" under the poster name, which indicated that this is the 55th post by this user, who has posted until now 73 posts in total.

This hack does NOT add any load to your board (except for deleting threads/posts, but this is optional). It is easy to install, just download the attached text file, and read the instructions.

What's new in version 1.1?
- Old posts counters are updated correctly (requested by bira)
- Correctly dealing with forums where posts should not count
- Fixed displayed counters for guests and imported posts

What's new in version 1.2?
- Static post counter is updated when deleting posts/threads (requested by bira)

What's new in version 1.3?
- Added support for single users update (useful in several situations)

What's new in version 2.0? (major release)
- Installer and updater integrated in the Admin control panel
- Option to update total users' post counts at the same time

What's new in version 2.1?
- Fixed bug in v2.0 installation (upgrade was still smooth)


Links:
- DOWNLOAD the hack
- Live Demo
- Admin control panel screenshot

Good luck!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-08-2001, 10:44 PM
exodus's Avatar
exodus exodus is offline
 
Join Date: Nov 2001
Location: Providence, RI USA
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this the accumlative post number? or like they have here on vB.org where every post in a specific thread gets numbered? post #1, post #2, etc...

?
Reply With Quote
  #3  
Old 12-08-2001, 11:17 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a very nice idea.

If I understand correctly, this is the number of post per USER, not per thread.

Meaning, when you read this post now, this is my 115th post out of 115 total posts I made on this Bulletin Board.

But the next time I post (here or in a different thread), this will show it to be my 115th post out of a total of 116th, etc.

So it will allow users to easily see at what point in your posting history this post was made. Was it your very first post? Was it your very last? etc.

I'll try this hack - the idea is nice.
Reply With Quote
  #4  
Old 12-09-2001, 02:23 AM
pipi pipi is offline
 
Join Date: Nov 2001
Location: USA
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any demo? thanks for your hard work
Reply With Quote
  #5  
Old 12-09-2001, 02:50 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I am trying this hack on my development server which has NO traffic at all, and I can already tell you of one big pitfall in this hack:

The update-post-counters.php runs an UPDATE post SET ... query on ALL YOUR POSTS. With over half a million posts in my database, and for other websites with a lot of posts, this process will take A LONG TIME, and will eventually exceed the execution timeout limit in php.ini (if not crash your MySQL!)

You MUST change your hack installer to run at X number of posts at a time (like the "update counters" does). You cannot just release this installer without making this modification, because it will not be fully installed, and most posts will show 0/xxx.

I myself can't even get the hack installed yet because I have so many posts in the db. So I don't even know what it looks like or how it works
Reply With Quote
  #6  
Old 12-09-2001, 03:43 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After editing your update-post-counters.php to use limit and startat points, I've managed to install this hack.

Here is why the hack is at the moment worthless for existing bulletin boards:

Pitfall 1:

Users will now show in all of their existing posts totalposts/totalposts.

Eg, if I had 3000 posts so far, all my posts up to now will show 3000/3000 -- not very informative.

Pitfall 2:

If I delete a post, or an admin deletes a post, the currentpost will be bigger than the total posts.

Eg, if to use the same example as above, all my posts up to now will show:

3000/2999

....

Sorry, but only a new Bulletin Board owner should use this hack. It's worthless for boards that have been operating as long as I have

If you want to make it valuable, you need to change it to:

ORDER BY dateline ASC

and add $postcount = 1 before the loop, and $postcount++ after the loop. That will at least solve pitfall #1. It won't solve pitfal #2. Nothing normal will.

Either way, a word of warning: installing this hack takes, on moderate to big boards, close to one hour. And it takes a LOT or resources.
Reply With Quote
  #7  
Old 12-09-2001, 05:54 AM
Tommy Boy Tommy Boy is offline
 
Join Date: Nov 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehe, it's amazing, I was just thinking about these things when I went to sleep last night! If you want to wait, I'll provide a fix when I come back from work.

This hack IS possible, and has a lot of potential. Please give me a chance to prove it.
Reply With Quote
  #8  
Old 12-09-2001, 09:48 AM
Tommy Boy Tommy Boy is offline
 
Join Date: Nov 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I couldn't wait, so I released the fix already (first post updated)

Bira, please try it on your huge database, it should work fine, but let me know if it doesn't, for any reason... It takes less than 5 seconds to run on my database, and I have over 60k posts.

So anyway, this fixes your pitfall #1. Now let's talk about your pitfall #2. First of all, many people will not consider it a problem, but a "feature", since even though some of this user's posts were deleted, this still remains his Xth post, and there is no reason to modify this. This is a "logical" issue, if you will. In any case, I have decided to make it part of the hack after all.

Anything else I can do for you, sir?
Reply With Quote
  #9  
Old 12-09-2001, 10:08 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tommy I'm a girl!

I want to send you something by e-mail. I can't attach files to an e-mail via the BB, so can you please e-mail me at goren@atlasf1.com your addy, so I can send it to you?

I think you'll like it
Reply With Quote
  #10  
Old 12-09-2001, 10:13 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tommy did you upload a new zip file? The one I just downloaded has exactly the same php file
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 04:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04970 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete