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
  #52  
Old 05-15-2006, 07:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to post the whole error. I can't tell much with what you have there.
Reply With Quote
  #53  
Old 05-15-2006, 10:05 PM
evofile evofile is offline
 
Join Date: Feb 2006
Location: Flushing, NY
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:

Database error in vBulletin 3.5.4:
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
Date : Monday, May 15th 2006 @ 09:41:36 PM
Script : http://forum.evofile.com/cron.php?&rand=694578
Referrer : http://www.evofile.com/
IP Address : 69.86.205.252
Username : Unregistered
Classname : vb_database
Reply With Quote
  #54  
Old 05-16-2006, 12:54 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 evofile
Code:

Database error in vBulletin 3.5.4:
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
Date : Monday, May 15th 2006 @ 09:41:36 PM
Script : http://forum.evofile.com/cron.php?&rand=694578
Referrer : http://www.evofile.com/
IP Address : 69.86.205.252
Username : Unregistered
Classname : vb_database
What version of MySQL are you running on the server?
Reply With Quote
  #55  
Old 05-16-2006, 02:24 AM
evofile evofile is offline
 
Join Date: Feb 2006
Location: Flushing, NY
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
What version of MySQL are you running on the server?
4.0.24
Reply With Quote
  #56  
Old 05-16-2006, 02:37 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hang in there, we're looking at it now.
Reply With Quote
  #57  
Old 06-14-2006, 10:09 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup, I'm getting the same error but with vBulletin 3.6.0 Beta 2..

It might have been doing it before the upgrade, but I've only just re-added an email address to receive database error messages (they do my head in!).. Running MySQL 4.0.27-standard.
Reply With Quote
  #58  
Old 06-14-2006, 10:22 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 Oblivion Knight
Yup, I'm getting the same error but with vBulletin 3.6.0 Beta 2..

It might have been doing it before the upgrade, but I've only just re-added an email address to receive database error messages (they do my head in!).. Running MySQL 4.0.27-standard.
I thought 3.6 took a higher MySQL version that that.
Reply With Quote
  #59  
Old 06-14-2006, 10:29 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
I thought 3.6 took a higher MySQL version that that.
From vbulletin.com:
vBulletin 3.6 now requires PHP 4.3.3 or later and MySQL 4.0.16 or later.

Reply With Quote
  #60  
Old 06-14-2006, 10:38 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using 4.1.11 and this hack works fine with that. I have a fix for it for older versions somewhere.
Reply With Quote
  #61  
Old 06-15-2006, 06:59 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Genius! Thank you guys! *Clicked Install*
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:49 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.08705 seconds
  • Memory Usage 2,307KB
  • 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_code
  • (4)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