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

Reply
 
Thread Tools
vB3 Forum Quick Stats Cache Serialize Hack v1.1 Details »»
vB3 Forum Quick Stats Cache Serialize Hack v1.1
Version: 1.00, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-14-2004 Last Update: Never Installs: 36
 
No support by the author.

vB3 Forum Quick Stats Cache Serialize Hack
Version 1.1
(By Boofo)

What does this hack do?
It will display stats about each forum at the top of that forum. (NOTE: The attachments info will NOT show in forums that have no attachments.) Also included in the hack is Logician's vB2 "Last Post Minute Hack" (with his permission for the vB2 version, of course) optimized and redone for vB3. It now uses NO queries to get the last minute info. This hack will display a link the last post and the time the last post was made (i.e. "1 minute" or "2 days", etc.) as well as the name and link to the last poster in the forum. The stats are cached and the cache is only updated at a time set by you. With an option in the Admin CP, you can reset the time between cache updates without having to edit any more files once this hack is installed. This hack will add 1 optimized query (for the user's threads and replies stats) on a cache read, but since this hack is serialized, the cache read itself will not pull a query. On a cache update, it will add 6 queries to update the datastore. And then drop back down to the one query until the next cache update. This hack will make a cache in the datastore for each forum you have, so you don't have to worry about forums getting cross-cached with this hack. It has been thorughly tested on my site, but as we all know too well, sites can, and often do, vary in the way a hack performs on it. I forsee no problems of any kind on any site in the way this hack functions. It's basically pretty simple and hard to mess up.

Note: This is the setting for the time interval (in minutes) that you want the cache to be updated on. The default value is 10 minutes. The following code is in the forumdisplay.php part of this hack.

$updatetime = 10;

Once you install the Admin CP setting (at the end of this file), you will be able to update this from the Admin CP vBulletin Options settings.

Credits:
A BIG thank you goes out to KirbyDE for all of his guidance and patience while this hack was being written and tested. This hack might never have gotten past the dreamed up state if it wasn't for him. And it definately wouldn't have been finished by now or turned out as optimized as it is. Thank you, my friend. I learned a lot from you on our little adventure here. It was definately worth the trip.

Version Information:
Version 1.0
--Initial release
Version 1.1 --Corrected a few minor potential bugs and re-did the template. Now it has a cleaner look.

Installation overview:
Files to edit: (1)
--forumdisplay.php
Templates to add: (1)
--forumdisplay_quickstats
Templates to edit: (1)
--forumdisplay
Settings to add: (1)
--forumcachetime

Note: The first image below will show the forum quick stats for a forum that has attachments. The second image will show the forum quick stats for a forum that has no attachments.

Show Your Support

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

Comments
  #92  
Old 04-11-2004, 11:26 PM
surfhog's Avatar
surfhog surfhog is offline
 
Join Date: Aug 2003
Location: England
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's party time LOL

it's working now, what did you say? it's working

Thanks boofo :glasses: for me and beer for you :speechless:
Reply With Quote
  #93  
Old 04-11-2004, 11:40 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently when you are using a table prefix you HAVE to declare the tables with a "table AS table" in it for each table (if you are calling more than 1 table in the query) or the table prefix gets confused, I guess. I hadn't been doing that because that is new in vB3 and I don't use a table prefix. Now that I know that (many, many thanks to NTLDR for enlightening me on this), I will start doing that in any future coding I do just so we can avoid all that you have had to go through for me not knowing that.

It wasn't your fault, there were 3 queries doing that in this hack and as soon as we fixed one of them, it stopped at the next one. I should have looked at all of them the first time but, alas, I didn't. Sorry you had to go through all of this for such a small hack.

I'm glad it's finally working for you, my friend. Enjoy! And thanks for the beer. I can sure use it now.

You remembered the install button, right?
Reply With Quote
  #94  
Old 04-11-2004, 11:55 PM
surfhog's Avatar
surfhog surfhog is offline
 
Join Date: Aug 2003
Location: England
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay well it proved to be a task for both of us then and thanks for the explanation.

Thanks to NTLDR for all the help also

I have hit install on both now.

I am really pleased and can't stress enough how grateful i am for your brilliant support
Reply With Quote
  #95  
Old 04-12-2004, 12:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And we both learned something along the way. I guess we're never too old to learn, huh?

Thank you for the kind words, sir. I really appreciate it. It feels kindof nice when someone appreciates the work that goes into a hack, no matter how small. If more users felt like you do, this would be a much happier place. I enjoyed our little adventure.
Reply With Quote
  #96  
Old 05-30-2004, 06:35 PM
Nj?rd Eriksson Nj?rd Eriksson is offline
 
Join Date: Jul 2003
Location: Midg?rd
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
And we both learned something along the way. I guess we're never too old to learn, huh?

Thank you for the kind words, sir. I really appreciate it. It feels kindof nice when someone appreciates the work that goes into a hack, no matter how small. If more users felt like you do, this would be a much happier place. I enjoyed our little adventure.
Boofo,

there are some problems with this hack. I didn't check all my forums because I have - sub-forums included - well over 200 but

1. one of them lists a user with user ID = 0 as top thread starter. If I search for him in the Admin CP, it tells me, he doesn't exist.

2. some forums list no top poster.

3. I know that your hack is not phrased, what is not a problem, as I can phrase it myself apart from one thing: the date that is not displayed in the German language system. Also affects your Forum Home Stats modification; and also the Arcade modification ... so maybe there is a general solution I can apply to all of them?

Screen shots are attached.

Your modification seems to work fine in most forums and sub-forums into which I surfed. Great work.
Reply With Quote
  #97  
Old 05-30-2004, 08:31 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The aracde modification doesn't have anything to do with this hack. As far as the date thing goes, I don't know what the german language uses so I couldn't change that. Just use whatever you use elsewhere on your site for the date and time part of it.

As far as the other problems go, you are the first that has reported that so I'm not sure exactly what is going on. Have you updated your counters recently? You might want to try that and see if that fixes the problem, especially if you have deleted any users that were top posters in a forum at one time. Let me know.
Reply With Quote
  #98  
Old 05-31-2004, 09:53 AM
Nj?rd Eriksson Nj?rd Eriksson is offline
 
Join Date: Jul 2003
Location: Midg?rd
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
The aracde modification doesn't have anything to do with this hack. As far as the date thing goes, I don't know what the german language uses so I couldn't change that. Just use whatever you use elsewhere on your site for the date and time part of it.

As far as the other problems go, you are the first that has reported that so I'm not sure exactly what is going on. Have you updated your counters recently? You might want to try that and see if that fixes the problem, especially if you have deleted any users that were top posters in a forum at one time. Let me know.
Yes, I did. Still persists. There definitely was never a user Strapu having created 117 threads. Since his user ID is 0, I think the problem could be caused by members that were deleted (pruned)? Once about 800 members were pruned ...

So maybe a conditional of the sort "if user ID = 0 then skip" could solve the "top thread starter" problem? as far as the "top poster" (top poster doesn't appear in some forums) problem is concerned -- it might be related?
Reply With Quote
  #99  
Old 05-31-2004, 06:01 PM
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 Nj?rd Eriksson
Yes, I did. Still persists. There definitely was never a user Strapu having created 117 threads. Since his user ID is 0, I think the problem could be caused by members that were deleted (pruned)? Once about 800 members were pruned ...

So maybe a conditional of the sort "if user ID = 0 then skip" could solve the "top thread starter" problem? as far as the "top poster" (top poster doesn't appear in some forums) problem is concerned -- it might be related?
But after you deleted the users and updated the counters, it should have straightened itself out. Did you update the theread and forum counters as well as the postcount? You need to do that, too.
Reply With Quote
  #100  
Old 06-12-2004, 03:38 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Apparently when you are using a table prefix you HAVE to declare the tables with a "table AS table" in it for each table (if you are calling more than 1 table in the query) or the table prefix gets confused, I guess. I hadn't been doing that because that is new in vB3 and I don't use a table prefix. Now that I know that (many, many thanks to NTLDR for enlightening me on this), I will start doing that in any future coding I do just so we can avoid all that you have had to go through for me not knowing that.

It wasn't your fault, there were 3 queries doing that in this hack and as soon as we fixed one of them, it stopped at the next one. I should have looked at all of them the first time but, alas, I didn't. Sorry you had to go through all of this for such a small hack.

I'm glad it's finally working for you, my friend. Enjoy! And thanks for the beer. I can sure use it now.

You remembered the install button, right?
Boofo, It would be nice if you changed the attachment instructions to reflect these changes for other who might experience this problem. Might save you the hastle of explaining this to other who don't want to wade through the threads to find a fix.
Reply With Quote
  #101  
Old 06-13-2004, 11:48 PM
nydk nydk is offline
 
Join Date: May 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick question... (not sure if it was addressed in this thread)

My Administrator usergroup has HTML markups to BOLD and change the font color of the username to RED. My Super Moderators are supposed to show up just BOLD... etc. etc.

Under "Currently Active Users", only the Administrator usernames reflect HTML markups. If an Admin is online, it shows their name BOLDED and RED, but other usergroups look like standard links(like regular, registered users).

Under "Number of Active Users Today", all usergroups' "HTML Markups" show up correctly, not just the Administrators.

Does anybody know how I would go about fixing this??? Thanks
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:34 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.04578 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_quote
  • (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
  • (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