Log in

View Full Version : Forum Display Enhancements - vB3.5 Forum Display Stats Cache Serialized


Boofo
09-11-2005, 10:00 PM
vB3.5 Forum Display Stats Cache Serialized
Version 1.0.0
(By Boofo)

What does this product 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 product is Logician's vB2 "Last Post Minute Hack" (with his permission for the vB2 version, of course) optimized and redone for vB3.5. It now uses NO queries to get the last minute info. This product 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 once this product is installed. This product will add 1 optimized query (for the user's threads and replies stats) on a cache read, but since this product is serialized, the cache read itself will not pull a query. On a cache update, it will add 6 queries to update the cache. And then drop back down to the one query until the next cache update. This product will make a cache in the datastore for each forum you have (with no extra queries), so you don't have to worry about forums getting cross-cached with this product. It has been thoroughly tested on my site, but as we all know too well, sites can, and often do, vary in the way a product performs on it. I forsee no problems of any kind on any site in the way this product functions. It's basically pretty simple and hard to mess up.

Forum Display Stats Update Frequency
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. You can change the setting in the Admin CP vBulletin Options settings under "Forum Listings Display Options > Forum Display Stats Update Frequency".

Credits:
A BIG thank you goes out to eXtremeTim for all of his expert guidance and patience while this product was being converted and tested. This product might never have gotten past the conversion if it wasn't for him. And it definitely wouldn't have been finished by now. Thank you, my friend. ;)

Version Information:
Version 1.0.0 --Initial release

Installation overview:
---------------------------------
Files to edit: (1)
--forumdisplay.php (or config.php)
Products to install (1)

Installation Instructions:
---------------------------------
In forumdisplay.php:

Find:
---------------------------------

'iconcache',

---------------------------------
BELOW it add:
---------------------------------

'forumstatscache',

----------------------------------------------------------------------------------------
If you want to save a file edit on upgrades, do the following INSTEAD of the above file edit:
----------------------------------------------------------------------------------------
In includes/config.php:

Find:
---------------------------------

$config['Mysqli']['ini_file'] = '';

---------------------------------
BELOW it add:
---------------------------------

// ****** SPECIALTEMPLATES *****
// Add any specialtemplates here for any products or mods that use the datastore, to save
// from re-doing file edits on an upgrade or re-install of vBulletin (until they give us a better
// way to do it, anyway). Thanks to KirbyDE for the how-to on doing this.
if(THIS_SCRIPT == 'forumdisplay')
{
global $specialtemplates;
$specialtemplates = array_merge($specialtemplates, array('forumstatscache'));
}


NOTE: You can also add any other specialtemplates from other hacks in here to save those file edits also.

---------------------------------

Go to your AdminCP
Scroll down to 'Plugin System'
Click 'Manage Products'
Click 'Add/Import Product'
Click the 'Browse' button, and locate the product-forumdisplay_stats_bh.xml file on your computer

---------------------------------
Done!
Enjoy!

eXtremeTim
09-12-2005, 07:59 AM
Post Reserved. :)

For if we have anything to tell. :)

Enjoy this hack you guys. :)

Barakat
09-12-2005, 02:05 PM
great and install >

Gizmo5h1t3
09-12-2005, 04:23 PM
cant see where this is supposed to show, followed the instructions, but nothing is displaying..???

eXtremeTim
09-12-2005, 07:54 PM
cant see where this is supposed to show, followed the instructions, but nothing is displaying..???

Are you sure that you loaded in the project file? Becuase we used a trick to do the template edit to avoid having to do it by hand. The product file is the heart of this hack and contains 99.99% of the code.

Boofo
09-12-2005, 08:45 PM
Also, without doing the edit for 'forumstatscache' it won't show. Make sure you do that edit. ;)

dieselpowered
09-12-2005, 09:24 PM
Works like a champ Boofo...well done!!

**clicks install**

Huijting
09-13-2005, 05:30 AM
Downloaded it and give it a try 2night/2morow gotta go to work now :squareeyed:

Will click install when it's done :)

Rob

Boofo
09-13-2005, 05:39 AM
Downloaded it and give it a try 2night/2morow gotta go to work now :squareeyed:

Will click install when it's done :)

Rob

Ok, I'll be waiting here then. ;)

FleaBag
09-13-2005, 09:54 PM
What's overheard like with this Boofo? The 3.0.x version kinda brought my forumdisplay to it's knees.

Boofo
09-13-2005, 10:59 PM
Check out the first post. ;)

I couldn't tell you what the overhead would be any more than the queries used. You would have to check it out but now it is easy to install and uninstall with no more major file edits.

If this hack brought your server to it's knees in 3.0, then you had more going on than just this messing that up. No way this hack can do that. ;)

FleaBag
09-13-2005, 11:14 PM
Well just installed this hack and get the following upon the page loading in a relatively tiny forum...
Page generated in 13.37798 seconds with 23 queries [Server Loads: 0.50 0.24 : 0.14].

Without the hack...
Page generated in 0.83826 seconds with 16 queries [Server Loads: 0.28 0.22 : 0.14].

No other hacks affect it in this way.

Boofo
09-14-2005, 12:55 AM
Well just installed this hack and get the following upon the page loading in a relatively tiny forum...
Page generated in 13.37798 seconds with 23 queries [Server Loads: 0.50 0.24 : 0.14].

Without the hack...
Page generated in 0.83826 seconds with 16 queries [Server Loads: 0.28 0.22 : 0.14].

No other hacks affect it in this way.

That will only be 23 queries on the cache update. The rest of the time it will only add one query. Read the first post!

Do the template edit and adjust the setting.

haiboss
09-14-2005, 12:11 PM
cant see where this is supposed to show, followed the instructions, but nothing is displaying..???

I'm have install but it doesn't works, why....?

Boofo
09-14-2005, 12:53 PM
Read this in the first post:

Installation Instructions:

And don't forget the install button. ;)

Gizmo5h1t3
09-14-2005, 04:40 PM
Read this in the first post:

Installation Instructions:

And don't forget the install button. ;)

just followed your instructions to the letter, and im tellin u mate it isnt working!!!

Andreas
09-14-2005, 04:56 PM
Working for me, so you must be doing smth. wrong.
Are you sure you imported the XML as Product and not as Plugin?

Huijting
09-14-2005, 04:58 PM
Ok, I'll be waiting here then. ;)

Click :-)

Gizmo5h1t3
09-14-2005, 04:59 PM
Working for me, so you must be doing smth. wrong.
Are you sure you imported the XML as Product and not as Plugin?

if id have done that,it would have told me it was an invalid file..
as it is, ive followed to the LETTER, and i see nothing....

Andreas
09-14-2005, 05:00 PM
No, RC2 doesn't tell that the File is invalid :)
Anyway, send me a PM with an ACP Login and i'll take a look.

Gizmo5h1t3
09-14-2005, 06:43 PM
no , what im saying is, if i d tried to import it as a plugin, instead of a product, id have got the invalid file type message.

Andreas
09-14-2005, 07:16 PM
Quoting myself:
RC2 does not give an invalid file type error when you try to import a product xml as a plugin xml.

Living in music
09-15-2005, 09:44 AM
I followed your request,this mod is too simple but I cannot understand why I don't see any change at forumdisplay after hacking this.
I uninstalled this but still not be successful.Please help me solve this problem.

Bhuwan
09-15-2005, 09:19 PM
great! any way to add this to the bottom instead of top?

any way to disallow guests from seeing?

Boofo
09-15-2005, 10:18 PM
great! any way to add this to the bottom instead of top?

any way to disallow guests from seeing?

To move it from the top, you will have to edit the xml and take out the template string replace and edit the template to add it where you want it.

Guests will only see words in areas where they are allowed to see them. ;)

Boofo
09-15-2005, 10:21 PM
I followed your request,this mod is too simple but I cannot understand why I don't see any change at forumdisplay after hacking this.

Did you do the file edit, too? Without that it won't show up. ;)

Living in music
09-15-2005, 11:24 PM
Installation Instructions:
---------------------------------
In forumdisplay.php:

Find:
---------------------------------

'iconcache',

---------------------------------
BELOW it add:
---------------------------------

'forumstatscache',

----------------------------------------------------------------------------------------
If you want to save a file edit on upgrades, do the following INSTEAD of the above file edit:
----------------------------------------------------------------------------------------
In includes/config.php:

Find:
---------------------------------

$config['Mysqli']['ini_file'] = '';

---------------------------------
BELOW it add:
---------------------------------

// ****** SPECIALTEMPLATES *****
// Add any specialtemplates here for any products or mods that use the datastore, to save
// from re-doing file edits on an upgrade or re-install of vBulletin (until they give us a better
// way to do it, anyway). Thanks to KirbyDE for the how-to on doing this.
if(THIS_SCRIPT == 'forumdisplay')
{
global $specialtemplates;
$specialtemplates = array_merge($specialtemplates, array('forumstatscache'));
}


NOTE: You can also add any other specialtemplates from other hacks in here to save those file edits also.

ADDED !!!

but this mod doesn't works.

Boofo
09-16-2005, 12:06 AM
No, this mod DOES work. You must be doing something wrong. If you installed the product and did the file edit, there is no way it can't work.

If you want me to check it out, pm me whatever details I need and I will look at it.

Living in music
09-18-2005, 10:24 AM
No, this mod DOES work. You must be doing something wrong. If you installed the product and did the file edit, there is no way it can't work.

If you want me to check it out, pm me whatever details I need and I will look at it.


I only edit file and install product,how it can be wrong?I also uninstalled and re-installed one more time but it's not working too. :ermm:

Andreas
09-18-2005, 10:28 AM
Normally, there is no way this Hack could not work.
Only if you had removed the Navbar from FORUMDISPLAY.

Boofo
09-18-2005, 10:54 AM
If you don't have any threads in a forum it won't show up either. Other than that, what Kirby said is 100 percent correct. ;)

Gizmo5h1t3
09-18-2005, 02:58 PM
then why is it NOT showing on mine, or the others making the comment??

cmon lads, we`re not tryin to say it DOESNT work, we`re wondering WHY it aint working on ours..
as i said, i folowed the instructions TO THE LETTER...but no joy...

Boofo
09-18-2005, 04:04 PM
then why is it NOT showing on mine, or the others making the comment??

cmon lads, we`re not tryin to say it DOESNT work, we`re wondering WHY it aint working on ours..
as i said, i folowed the instructions TO THE LETTER...but no joy...

Like I posted earlier, if you want to set up an account, I can take a look and see if I can find out what the problem might be. ;)

Did you make the edit to the forumdisplay.php file as instructed in the first post? It needs to go in the specialtemplates section.

Andreas
09-18-2005, 08:17 PM
@Gizmo5h1t3
As said, it's almost impossible to get this Hack to not show anything.
But feel free to send me a PM with ACP details and i'll take a look

Andreas
09-20-2005, 04:37 PM
OK, here is the cause for the mysterious Problem of Gizmo5h1t3:
https://vborg.vbsupport.ru/showpost.php?p=776834&postcount=175

The solution is to disable the other Hack (until it gets fixed), move the Code for this Hack to forumdisplay_start or change execution order of the Plugins (which is not possible ... nudge nudge @ Jelsoft Developers)

Gizmo5h1t3
09-20-2005, 05:06 PM
many thanks to kirby for sorting the problem out, or at least lettin me know why its not showing..
I TOLD YOU!!!...lmao

cheers mate..and yeah, i do have quiter a few hacks going....lol

michaelbenson
10-19-2005, 01:07 PM
Is it possible for these forum statistics to be displayed below the actual threadbit listings and above the Display Options etc ... area? I would normally do this since this would normally have been an installation via a template edit, but these plugins are taking a while to get used to; end-user customization wise at least ... :)

Code Monkey
10-20-2005, 11:24 PM
Have you thought of updating this using this (https://vborg.vbsupport.ru/showthread.php?t=97054) to eliminate the file edit?

Boofo
10-21-2005, 09:52 PM
many thanks to kirby for sorting the problem out, or at least lettin me know why its not showing..
I TOLD YOU!!!...lmao

cheers mate..and yeah, i do have quiter a few hacks going....lol

Then don't forget the install button in case there are any updates you might want to know about. ;)

fuldon
01-04-2006, 05:38 PM
Any updates?

TTG
09-27-2006, 12:32 PM
Works on 3.6.1 .. thanks Boofo ... wherever you are !?

yahoooh
10-30-2007, 08:45 PM
does it work with vb 3.6.8?

Lea Verou
11-03-2007, 09:02 AM
Yes it does. :-)

Also, I noticed that you can turn the file edit into a plugin in 3.6, just add that code in a plugin on hook global_start, instead of adding it in config.php :)

Boofo & ExtremeTim, wherever you are, THANK you for this hack! :)