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 07-02-2009, 09:03 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default separate post count in postbit for non-postcount forums?

I assume I'd have to edit the postbit template, but with what?

I want to make a new post count bit, after the "Post Count:"

but how would I go about adding a separate post count in postbit for non-postcount forums?
Reply With Quote
  #2  
Old 07-05-2009, 03:21 AM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Any answers? Lynne is usually so good at replying to issues, did you miss this one?

Or anyone whom is able to help, please, just drop me a reply here

Cheers
Reply With Quote
  #3  
Old 07-05-2009, 02:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mikey1991 View Post
Hi,

Any answers? Lynne is usually so good at replying to issues, did you miss this one?

Or anyone whom is able to help, please, just drop me a reply here

Cheers
I'm stuck on dial-up while on vacation, so I'm not going through all the threads like I normally do.

You have a couple of options. One, you can write a plugin that does a query for each user to count this separate post count for you. It will add one query per post. Then you can spit that variable out in the post. Two, you can write a series of plugins to keep track of the post count in a new field you would need to create in the user table. Then you can grab that field when you do the query for posts and it won't add any queries to the page. This method is probably preferable since you won't be adding so many queries per page, but it will take more effort on your part to write.
Reply With Quote
  #4  
Old 07-08-2009, 08:16 PM
ludachris ludachris is offline
 
Join Date: Feb 2002
Posts: 287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Two, you can write a series of plugins to keep track of the post count in a new field you would need to create in the user table. Then you can grab that field when you do the query for posts and it won't add any queries to the page. This method is probably preferable since you won't be adding so many queries per page, but it will take more effort on your part to write.
When you say "series of plugins", why couldn't it just be one plugin? Would you add a function in the post function where it updates the post counter updating the second (and possibly 3rd, 4th, post count) field?
Reply With Quote
  #5  
Old 07-08-2009, 10:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ludachris View Post
When you say "series of plugins", why couldn't it just be one plugin? Would you add a function in the post function where it updates the post counter updating the second (and possibly 3rd, 4th, post count) field?
If you did just one plugin at the post function, what about if a user deletes a post? There is deleting via ajax and via post edit and via mass delete and via thread delete and change of forumid by mass moving or moderator action or.... a couple of those may be the same plugin, but I know they aren't all the same one.
Reply With Quote
  #6  
Old 07-08-2009, 10:55 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it does sound complex, anyway :P
Reply With Quote
  #7  
Old 07-12-2009, 10:15 PM
ludachris ludachris is offline
 
Join Date: Feb 2002
Posts: 287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
If you did just one plugin at the post function, what about if a user deletes a post? There is deleting via ajax and via post edit and via mass delete and via thread delete and change of forumid by mass moving or moderator action or.... a couple of those may be the same plugin, but I know they aren't all the same one.
That makes sense. Thanks for the explanation.
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 02:35 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.04956 seconds
  • Memory Usage 2,221KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete