Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Threads Started by User in Postbit and Profile Details »»
Threads Started by User in Postbit and Profile
Version: 1.0.1, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.5.4 Rating:
Released: 05-08-2006 Last Update: 05-13-2006 Installs: 50
Uses Plugins Template Edits
 
No support by the author.

vB3.5.4 Threads Started by User in Postbit and Profile
Version 1.0.1
(By Andreas, Boofo, Hambil and Paul M.)

What does this product do?
This product counts the threads started by a user and displays it in the postbit and the profile. It will also display the threads per day in the profile. The thread count is automatically updated hourly via cron job. New threads are added to the count in real time. No extra queries are run in the postbit or profile when getting the thread count, only when the cron job runs. This product has been tested on a live board with over 15,000 users and 40,000 threads and ran unnoticeably in the background in 0.3 seconds during the cron job update. This product only counts valid threads (not moderated or soft-deleted threads).

NOTE: This Hack requires at least mySQL 4.0.4

Version Information:
Version 1.0.0 --Initial release
Version 1.0.1 --No longer counts threads in forums that have the "Count Posts Made in this Forum Towards User Post Counts" option set to No. Also made the posts and threads counts in the postbit clickable search links like in the profile.

NOTE: You must redo the postbit template edit to get the clickable links.

Credits:
Thanks goes out to Andreas for the original version of this product. Thanks also goes out to Paul M for coming up with the way to update the thread count without adding a query to every post, and to Hambil for coming up with the way to not count threads in forums where the "Count Posts Made in this Forum Towards User Post Counts" option is set to No. Thanks guys!

Details
---------
1 Product XML (4 Plugins, 2 Phrases)

Supporters / CoAuthors

Show Your Support

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

Comments
  #62  
Old 06-17-2006, 01:54 AM
futuredood futuredood is offline
 
Join Date: Jan 2002
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey boofo, i installed this successfully, except nowhere does it show us how to set up the cron.. can you add that to the instructions? thanks.
Reply With Quote
  #63  
Old 06-17-2006, 05:05 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by futuredood
hey boofo, i installed this successfully, except nowhere does it show us how to set up the cron.. can you add that to the instructions? thanks.
Nope, can't give you any instructions, sorry.

That's because it uses a hook and does it all automatically.
Reply With Quote
  #64  
Old 06-17-2006, 05:26 AM
futuredood futuredood is offline
 
Join Date: Jan 2002
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha great! what i did was i uploaded it, and only put the code in my memberinfo template (i only want it to show up in the profile).

is that the reason it's not working for me? i didn't want it to show up in the postbit templates. if it hasn't been updating, maybe it has to be with my server settings.
Reply With Quote
  #65  
Old 06-17-2006, 05:50 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure the threads it isn't counting aren't in forums where you have the postcount turned off. It will update new threads immediately and adjust it when the cron runs.
Reply With Quote
  #66  
Old 06-17-2006, 06:22 AM
futuredood futuredood is offline
 
Join Date: Jan 2002
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah, i caught the problem. i posted a new thread and it counted fine, but old threads aren't counted. i tried running some maintenance scripts, like updating post counts but that didn't do the trick. was their a step i missed?
Reply With Quote
  #67  
Old 06-17-2006, 06:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All the threads that the member has started are counted when you first install the hack and when the cron runs.
Reply With Quote
  #68  
Old 06-20-2006, 12:31 AM
futuredood futuredood is offline
 
Join Date: Jan 2002
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hm didn't seem to work when i reinstalled and overwrote the original file. it's ok though since i'm installing this on a new forum.
Reply With Quote
  #69  
Old 06-26-2006, 01:00 AM
Tyegurl's Avatar
Tyegurl Tyegurl is offline
 
Join Date: Mar 2006
Location: NY
Posts: 480
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

darn i need mysql 4.0.4...
Reply With Quote
  #70  
Old 06-26-2006, 11:17 AM
futuredood futuredood is offline
 
Join Date: Jan 2002
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

threads seem to be counted correctly, but this error is e-mailed to me about once a night. i read someone else received this error too.. it'd be nice to know that everything was running smooth, though.:

Database error in vBulletin 3.5.4:
Quote:
Invalid SQL:

UPDATE user AS user
SET user.threads =
(
SELECT COUNT(threadid)
FROM thread AS thread
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE visible = 1
AND (forum.options & 4096)
AND user.userid=postuserid
);

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(threadid)
FROM thread AS thread
LEFT JOIN f
Error Number : 1064
Reply With Quote
  #71  
Old 07-13-2006, 10:08 PM
barca4ever barca4ever is offline
 
Join Date: Mar 2006
Location: Q8
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a user has posted 2 threads, so he's thread's count is 2 which is correct, But when I soft-deleted his 2 threads, his thread's count still showing 2 !!!
Reply With Quote
Reply

Thread Tools

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 12:52 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.05011 seconds
  • Memory Usage 2,302KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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