Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
vB3 Forumhome Stats Cache Serialize hack v2.2 Details »
vB3 Forumhome Stats Cache Serialize hack v2.2
Mod Version: 1.00, by Boofo (R.I.P.) Boofo is offline
Developer Last Online: Jun 2012 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (1 vote - 5.00 average) Installs: 108
Released: 11 Feb 2004 Last Update: Never Downloads: 33
Not Supported  

vB3 Forumhome Stats Cache Serialize hack
Version 2.2
(By Boofo)

What does this hack do?
This hack will add some forum statistics to your forumhome that will be cached (to reduce the query load) for a certain amount of time that can be set to whatever you want. This covers most of the stats any forum Admin would use on his site.

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 index.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:
I want to thank Tigga for the original Forumhome Statistics Cache hack for vB2, partly on what this hack is based. I also want to thank EvilLS1 for his time and patience in helping put this hack together. Another thank you goes out to Mike Gaidin for testing this thoroughly while I was putting together this install file. And, finally, thank you goes out to NTLDR, for helping me track down a very stupid mistake on my part which I had overlooked.

Version 2.0 credits go out to g-force2k2 for getting me started on the datastore version of this hack and guiding me through some of the rough parts in the beginning. And also to KirbyDE for answering all of my dummy questions while writing this version and verifying the code when I figured out all of my mistakes. This is my first attempt at using the datastore function but it seems to work better and be easier to code than the older way of doing things.

Version Information:
Version 1.0
--Initial release
Version 2.0 --Completely rewritten using the datastore function for vB3. It now uses "serialize" to store the data and "unserialize" to retrieve the data. There is also now 1 less query when reading from the cache.
Version 2.1 --Combined the "new threads since last visit" and "new posts since last visit" queries into 1 query, thus eliminating another query on cache hits. Thanks goes out to g_force2k2 for this one. Also added Admin CP setting code so you can change the time interval between cache updates via the Forum Display Option setting in the vBulletin Option in the Admin CP. That code to add is at the end of this file.
Version 2.2 --Added "Top Reputation" statistic (requested by rinkrat ) and totally re-did the template. It looks cleaner now.

New Installation:
Do all of the steps in this file.

To Update Version 1.0 to Version 2.0:
To update this hack you will need to do everything in this file over again except the second query (Query #2). After you have this hack up and running again and you have made sure it is running to your satisfaction, you can drop the statscache table (from version one of this hack) completely. It is no longer needed.

To Update Version 2.0 to Version 2.1:
You will need to re-add the code for the index.php and go to the end of this file and add the setting for the Admin CP.

To Update Version 2.1 to Version 2.2:
You will need to re-add the code for the index.php and replace the code for the forumhome template.

Installation overview:
Queries to run:
(2)
Files to edit: (2)
--index.php
--member.php
Templates to edit: (1)
--forumhome
Settings to add: (1)
--forumhomecachetime

vB3 Arcade hack stats addon:
http://www.vbulletin.org/forum/showp...&postcount=262

The first attachment shows the Guest loggedin and the second attachment show the Registered Member and above loggedin.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	guest.jpg
Views:	2056
Size:	24.3 KB
ID:	17522   Click image for larger version

Name:	registered.jpg
Views:	2698
Size:	32.2 KB
ID:	17523  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Forum Display Enhancements vB3.5 Forum Display Stats Cache Serialized Boofo Modification Graveyard 42 03 Nov 2007 11:02
vB3 Forum Quick Stats Cache Serialize Hack v1.1 Boofo vBulletin 3.0 Full Releases 117 21 Aug 2005 01:10

  #241  
Old 05 Apr 2004, 03:59
Seby Seby is offline
 
Join Date: Apr 2002
Boofo sent me instructions on how to fix the percentage problems and it worked out nicely, expect a fix soon

Reply With Quote
  #242  
Old 05 Apr 2004, 13:53
Owen Owen is offline
 
Join Date: Jan 2002
ah cool, I am in need of that too.
Reply With Quote
  #243  
Old 05 Apr 2004, 13:58
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
PM me and I'll give you the code. I would like to test it on yours, too, to make sure it is right.
Reply With Quote
  #244  
Old 05 Apr 2004, 14:49
Owen Owen is offline
 
Join Date: Jan 2002
Just go ahead and PM me I'll check it out.
Reply With Quote
  #245  
Old 05 Apr 2004, 15:35
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
No, because I need you to test it out as soon as you get it so we can put it back like it was before it messes anything up if it doesn't work. When you're ready, let me know. I need your full attention while we are doing this.
Reply With Quote
  #246  
Old 05 Apr 2004, 15:39
Owen Owen is offline
 
Join Date: Jan 2002
I am on msn, you dont seem to be online though...
Reply With Quote
  #247  
Old 05 Apr 2004, 15:41
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You'll have to give me a few minutes. I'm right in the middle of helping someone with a hack.
Reply With Quote
  #248  
Old 06 Apr 2004, 00:07
blakkboy's Avatar
blakkboy blakkboy is offline
 
Join Date: Aug 2003
i just updated to 2.2 and now i get this

please help me
Attached Images
File Type: jpg untitled2.JPG (97.6 KB, 25 views)

Last edited by blakkboy; 06 Apr 2004 at 01:25.
Reply With Quote
  #249  
Old 06 Apr 2004, 04:27
Njörd Eriksson Njörd Eriksson is offline
 
Join Date: Jul 2003
Real name: Njörd Eriksson
Originally Posted by Boofo
You'll have to give me a few minutes. I'm right in the middle of helping someone with a hack.
Great hack, Boofo, but ...

... percentages still don't work (yes, I applied the changes you suggested.)

... I have a style-problem. The stats window is displayed in some sort of default vBulletin style in all my six styles to which I applied the modified FORUMHOME template (see screenshot.)

Do you have a fix for this?
Attached Images
File Type: jpg stats_hack_screenshot.jpg (87.1 KB, 15 views)
Reply With Quote
  #250  
Old 06 Apr 2004, 09:25
Njörd Eriksson Njörd Eriksson is offline
 
Join Date: Jul 2003
Real name: Njörd Eriksson
Originally Posted by Njörd Eriksson
Great hack, Boofo, but ...

... percentages still don't work (yes, I applied the changes you suggested.)

... I have a style-problem. The stats window is displayed in some sort of default vBulletin style in all my six styles to which I applied the modified FORUMHOME template (see screenshot.)

Do you have a fix for this?
1. Fix for my style problem (might not be universal but did the job for me):

In the FORUMHOME template, replace:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2. Fix for the incorrect displayed percentages (not universal, works probably only for certain larger boards):

This fix is a modification of Boofo's modification which you can find here:
http://www.vbulletin.org/forum/showp...&postcount=208

In index.php replace:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And delete this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Attached Images
File Type: jpg stats_hack_fixed_screenshot.jpg (44.2 KB, 23 views)
Reply With Quote
  #251  
Old 06 Apr 2004, 09:39
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Ok, I had a fix for the percentage code but yours might actually be better. Let's have a few of the larger boards try it and see if that fixes it for sure. If it works for the rest of you, I will update the hack with both changes. Thank you, sir.

Njörd, where were you when I was tearing what little hair I have left out coming up with a fix for the percentages? You could have saved me some hair.
Reply With Quote
  #252  
Old 06 Apr 2004, 11:58
Njörd Eriksson Njörd Eriksson is offline
 
Join Date: Jul 2003
Real name: Njörd Eriksson
Originally Posted by Boofo
Ok, I had a fix for the percentage code but yours might actually be better. Let's have a few of the larger boards try it and see if that fixes it for sure. If it works for the rest of you, I will update the hack with both changes. Thank you, sir.

Njörd, where were you when I was tearing what little hair I have left out coming up with a fix for the percentages? You could have saved me some hair.
This is not really an acceptable fix I fear ... I just removed the if ... else conditionals from your solution because it didn't work for me. If for anyone then mine will just work for larger boards. :|
Reply With Quote
  #253  
Old 06 Apr 2004, 17:50
djohn djohn is offline
 
Join Date: Feb 2004
What exactly does 1 Uncached Template mean?
Does that uncashed template do any good/bad to my board?
Reply With Quote
  #254  
Old 06 Apr 2004, 18:21
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
An uncached template adds an extra query. Which template is uncached? If you followed the instructions in the very first part of the hack, then the templates are cached for this hack. You might want to recheck it.
Reply With Quote
  #255  
Old 06 Apr 2004, 19:48
BarBeQue's Avatar
BarBeQue BarBeQue is offline
 
Join Date: Nov 2001
Sweet hack boofo!

Always wanted stats but never liked the amount of queries it added (you load them 10x a day and only view them like once....) but this solves it!

Gonna read the whole thread so i'll be back with questions/suggestions later prolly

/me clicks install!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 14:10.

Layout Options | Width: Wide Color: