vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Forum Quick Stats v1.0 (https://vborg.vbsupport.ru/showthread.php?t=53138)

Boofo 05-18-2003 10:00 PM

Forum Quick Stats v1.0
 
Forum Quick Stats v1.0
(By Boofo)

Thanks goes out to Mug and cirisme, for all of their indispensable help with the queries. Without them, this hack would still be on the drawing board. And thanks also goes out to Grog6 for the basis of this hack, which is his Forums Statistics hack. A special thanks goes out to Logician for his great Last Post Minute Hack. Thank you, my friend. ;)

This hack has all new 100% working (and optimized) queries. I will be updating it to cache all of the queries so it will only update them at a pre-determined time (set by you).

What this hack does:
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 "Last Post Minute Hack" (with his permission, of course). 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.).

Tested and installed on vBulletin v2.2.9 (but should work with all versions).

Files to edit: 1 (forumdisplay.php)
Template to edit: 1 (forumdisplay)
Templates to add: 2 (lastpostminute and forumdisplay_quickstats)
Settings to edit: 1 (in the Admin CP)
Install time: 5 minutes (if you are slow or a newbie ;))

[high]Please click the install button if you install this hack. (I have 3 kids to put through college.)[/high]

Dan 05-19-2003 08:52 PM

Screenshot?

Boofo 05-19-2003 09:01 PM

Here is a screenshot [high]with[/high] the attachment info.

Boofo 05-19-2003 09:02 PM

Here is a screenshot [high]without[/high] the attachment info.

Reverend 05-19-2003 10:02 PM

Looks good Boofo.
Will replace grog's hack with this one.I'll install tomorrow on v2.3.0 ;)

Boofo 05-19-2003 10:26 PM

Quote:

Today at 06:02 PM Reverend said this in Post #5
Looks good Boofo.
Will replace grog's hack with this one.I'll install tomorrow on v2.3.0 ;)

Thanks. ;)

Don't forget to click install. I plan on updating it to cache the queries and you can be automatically notified when I do the update.

Dan 05-19-2003 10:32 PM

Hmm.... might install this once I'm finished playing around with my new half life cds

kaotic 05-19-2003 11:03 PM

Looks good. I'll download it once it is updated.

*Installed for now.

grog6 05-19-2003 11:21 PM

Thx for the (big) release, good work Boofo ;)
And a big thanks too for all updates and support you brang in my thread whereas I couldn't do it by myself

I still have a lot of work for the university ... I'm working now on a PHP/SQL project, so I'll improve my PHP and so will come soon for big, usefull and "good coded hack" :D

;)

Boofo 05-19-2003 11:28 PM

Thank you for the kind words. Your hack was very useful in putting this together. I learned some things along the way, plus I had some great help with this. ;)

I'll look forward to your next hack. ;)

Reverend 05-19-2003 11:39 PM

Now installed on vb 2.3.0.
Works perfect.
One question,how do i change the font color for "$yourstats"

i tried editing the forumdisplay.php code from this:

<smallfont><b>$bbuserinfo[username], you have made a total of <i>$yourposts</i> posts in this forum.</b></smallfont>

to this:

<smallfontcolor="#FFFFFF"><b>$bbuserinfo[username], you have made a total of <i>$yourposts</i> posts in this forum.</b></smallfont>

but get parse errors.

Boofo 05-19-2003 11:41 PM

Change this:

<smallfontcolor="#FFFFFF"><b>$bbuserinfo[username], you have made a total of <i>$yourposts</i> posts in this forum.</b></smallfont>

to this:

<smallfontcolor=\"#FFFFFF\"><b>$bbuserinfo[username], you have made a total of <i>$yourposts</i> posts in this forum.</b></smallfont>

You have to put backslashes before the quotes in php files. ;)

Reverend 05-19-2003 11:47 PM

That did it.
Thanks Boofo. ;)

Boofo 05-19-2003 11:53 PM

No problem. Enjoy! ;)

Reverend 05-19-2003 11:54 PM

Just wondering if its possible to edit the font colour for $yourstats via the forumdisplay_quickstats template so that the colour can be set for different styles.

squawell 05-20-2003 12:19 AM

Boofo if i want forum member just see their own stats....how

should i do??(the attachment part)...thankz...

Smoothie 05-20-2003 01:40 AM

number of queries this adds?

Boofo 05-20-2003 01:48 AM

Quote:

Today at 08:19 PM squawell said this in Post #16
Boofo if i want forum member just see their own stats....how

should i do??(the attachment part)...thankz...

That would require re-writing the whole hack. The only problem you might have in doing it that way would be if you get a user in a forum that they haven't done a whole lot in, the information would be very low.

Boofo 05-20-2003 01:54 AM

Quote:

Today at 09:40 PM Smoothie said this in Post #17
number of queries this adds?
Right now it adds 7 queries (8 with Logician's hack). The old Forum Statistics hack added 6 queries and didn't have the attachments info, Logician's Lastpostminute hack, "your stats" or the last poster. I am in the process of writing the code that will cache those queries and only run them every so many minutes (i.e. 10) in which case it will run 8 queries when it is updating the cache and only one query when it is not. How does that sound? ;)

Boofo 05-20-2003 02:18 AM

Quote:

Today at 07:54 PM Reverend said this in Post #15
Just wondering if its possible to edit the font colour for $yourstats via the forumdisplay_quickstats template so that the colour can be set for different styles.
Yes, you can, but it will show the thread and posts numbers in the your stats line at the bottom of the box even if they haven't posted in that thread. Here is how you can do it:

In forumdisplay.php, find:

PHP Code:

if ($yourposts !="0") {
$yourstats "<tr id=\"cat\">
        <td bgcolor=\"#1D6AA0\" align=\"center\" nowrap colspan=\"3\"><smallfont><b>
$bbuserinfo[username], you have made a total of <i>$yourposts</i> in this forum. (<i>$yourthreads</i> and <i>$yourreplies</i>)</b></smallfont></td>
</tr>"
;
} else {
$yourstats "<tr id=\"cat\">
        <td bgcolor=\"#1D6AA0\" align=\"center\" nowrap colspan=\"3\"><smallfont><b>
$bbuserinfo[username], you have made a total of <i>$yourposts</i> posts in this forum.</b></smallfont></td>
</tr>"
;


and delete it. Then go into the forumdisplay_quickstats template and replace:

PHP Code:

$yourstats 

with this:

PHP Code:

<tr id="cat">
        <
td bgcolor="#1D6AA0" align="center" nowrap colspan="3"><smallfont><b>$bbuserinfo[username], you have made a total of <i>$yourposts</iin this forum. (<i>$yourthreads</i> and <i>$yourreplies</i>)</b></smallfont></td>
</
tr

That should do it. ;)

Austin Dea 05-20-2003 02:22 AM

I install when the stats are cached ;)

Boofo 05-20-2003 02:32 AM

Quote:

Today at 10:22 PM Austin Dea said this in Post #21
I install when the stats are cached ;)
The queries that are in it right now are fairly fast queries. I have optimized them as much as I can and on my site it runs quick. ;)

Austin Dea 05-20-2003 03:01 AM

Yes, but I don't need it right this second. I'll wait =P

sleepbirdcyp 05-20-2003 03:03 AM

coooooooooooooooool!
Looks good. thx Boofo!

and still waiting for the next stats cached version~

Smoothie 05-20-2003 03:14 AM

Quote:

Yesterday at 10:54 PM Boofo said this in Post #19
Right now it adds 7 queries (8 with Logician's hack). The old Forum Statistics hack added 6 queries and didn't have the attachments info, Logician's Lastpostminute hack, "your stats" or the last poster. I am in the process of writing the code that will cache those queries and only run them every so many minutes (i.e. 10) in which case it will run 8 queries when it is updating the cache and only one query when it is not. How does that sound? ;)
Sounds good Boofo, nice work, but thats too many queries for my site.

sleepbirdcyp 05-20-2003 03:18 AM

just waiting for next version

:D

Boofo 05-20-2003 04:04 AM

Quote:

Yesterday at 11:14 PM Smoothie said this in Post #25
Sounds good Boofo, nice work, but thats too many queries for my site.
I will be releasing the update (hopefully tomorrow) with the cache. It will only run 1 query when it is not updating the cache. Will that work better for you?

MetroSports82 05-20-2003 04:12 AM

great work Boofo! ;) works great, and yea i noticed the queries are running fairly quick on my end as well. thanks! ;)

Boofo 05-20-2003 04:22 AM

Quote:

Today at 12:12 AM MetroSports82 said this in Post #28
great work Boofo! ;) works great, and yea i noticed the queries are running fairly quick on my end as well. thanks! ;)
Thank you for the kind words. ;) Don't forget to click install so you can be notified when I get the cached version up here in the next day or so.

Smoothie 05-20-2003 04:35 AM

Quote:

Today at 01:04 AM Boofo said this in Post #27
I will be releasing the update (hopefully tomorrow) with the cache. It will only run 1 query when it is not updating the cache. Will that work better for you?
That might work. :)

Boofo 05-20-2003 10:11 AM

Ok, here is an update on my progress with the caching. I have it done except for 2 small problems. The main one being how to have it cache each forum. If you go from one forum to another, it won't update the stats until the pre-determined time, so you will be looking at the stats from the forum that was last cached. I will get it figured out and release it here just as soon as I can, hopefully later today. Hang in there, it's coming. ;)

sleepbirdcyp 05-20-2003 11:32 AM

for example

update the forum stats every 24 hours~

:)

Austin Dea 05-20-2003 02:43 PM

24 hours? I'd much rather have it every 10 minutes.

Boofo 05-20-2003 06:54 PM

It will be configurable in that sense to whatever you want.

sleepbirdcyp 05-20-2003 07:12 PM

come on

can not wait anymore

:D :D :D

Boofo 05-20-2003 07:41 PM

I'm still trying to figure out the fix for each forum. I'll post it the moment I have it. ;)

Xyphen 05-21-2003 12:04 AM

Nice piece of work Boofo

Boofo 05-21-2003 12:10 AM

Quote:

Today at 08:04 PM AViO 07 said this in Post #37
Nice piece of work Boofo
Thank you. ;) Don't forget to hit install if you want to be notified when I post the caching update.

alkatraz 05-21-2003 06:16 AM

thx!

installed

TheComputerGuy 05-22-2003 01:32 AM

Installed :)


All times are GMT. The time now is 04:50 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.01753 seconds
  • Memory Usage 1,827KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete