Log in

View Full Version : QuickStats v1.1


X-Fan
09-21-2003, 10:00 PM
Hack Name: QuickStats v1.1 for vBulletin 2.x.x
Hack Author: X-Fan (x-fan@bigpond.net.au)
Inspired by: Bane's vbStats Hack and Afterburner's NewStatistikHack
Thanks to: Mystics' Who Was Online Today hack for the members today record, inphinity's UserAgentCheck hack for the web robots online, and Velocd's Who's Chatting modification for phpMyChat for the chatters online portions of this hack.
First Release: 22 September 2003
Description: This is a quick and easy hack that provides many statistics for your forums via a pop-up window, including:

* Online Stats (total online, members online, visible/invisible, guests online, web robots online, online record)
* Crew Stats (admins, super mods, and mods)
* Members Stats (total members, invisible members, active members, activity rate, members today, members today record, registrations today)
* Top 5 Posters
* Top 5 Referrers
* 5 Newest Members
* Forum Stats (total categories, total forums, posts today, total posts, active posts, views today, total views, total attachments, total PMs, unread PMs, total avatars, total smilies)
* Top 5 Forums
* Thread Stats (threads today, total threads, active threads, sticky threads, closed threads, moved threads, unanswered threads)
* Top 5 Threads
* Newest 5 Threads
* Stats add-ons for other popular hacks such as Lesane's Store, MarkB's Mark User as Contributor, and more.

Tested and installed on vBulletin v2.3.0

Files to Edit: 0 (without add-ons), 1 (quickstats.php with add-ons)
Templates to Edit: 1 (header)
Templates to Add: 7 (without add-ons), 8-9 (with add-ons)
Install Time: <=5 minutes

Hack History:

v1.1 Added newest 5 threads stats, tweaked all links to open in new browser window
v1.0 Initial release

Upgrade/First Install Instructions:

Download the attached zip file, extract the files, and follow the instructions in the txt file.

If you use this hack, please don't forget to click install. :cool: Any questions, feel free to ask. :)

Areku
09-22-2003, 09:27 AM
Any screenies?

X-Fan
09-22-2003, 09:34 AM
Yep, just added them to the first post :) They're a bit wider than what the pop-up window will actually be, but will still give you an idea of what the hack does.

Dean C
09-22-2003, 10:04 AM
I assume that you asked the authors for their permisson :)? The reason i ask being that I haven't seen Mystic's around here for a while :)

X-Fan
09-22-2003, 10:24 AM
No, I didn't, because their code helped sections of this hack, but I rewrote it to better suit. I actually started this hack last year, but only found time recently to finish it.

That said, though, if anyone has a problem with that, please PM me and we can discuss it.

lasto
09-22-2003, 10:30 AM
well neat will install and get back to you m8

lasto
09-22-2003, 11:16 AM
Installs fine m8 no probs with installation either + i changed a few things to do top 10 instead of 5 and done the add on you posted for the store :)

X-Fan
09-22-2003, 01:09 PM
Hey cool, glad to hear that it worked for you and that you found it easy to modify! :)

Did you include any of the listed add-ons at all?

X-Fan
09-22-2003, 01:58 PM
Okay, I found a couple things I had to fix plus I also added a suggestion from lasto to include the five most recent threads so we're now at v1.1! :)

Just follow the upgrade/install instructions in the txt file in the zip, and remember to click install if you use this hack, thanks!

lasto
09-22-2003, 05:30 PM
lo m8 wot bit is the newest thread sin as dont want to have to do all them templates again but appreciate your work on it :)

mx3
09-22-2003, 10:25 PM
lo m8 wot bit is the newest thread sin as dont want to have to do all them templates again but appreciate your work on it :)
Cool hack ^_^ I might install this one...

X-Fan
09-22-2003, 10:25 PM
Upgrade instructions are in the txt file as well :)

psico
09-23-2003, 09:17 AM
Anyone tried this in a very large forum?
Mine has 17k users and an average of 300 users online...

tnx in advance and sorry for my english...

hume
10-14-2003, 03:53 PM
can i use it for vBulletin beta x
i very like that mod,
X-Fan tell me ,i want to use this mod for vbb 3
how can i do that?

X-Fan
10-15-2003, 02:35 AM
Anyone tried this in a very large forum?
Mine has 17k users and an average of 300 users online...

tnx in advance and sorry for my english...

Mine's got around 150 or so online on average, and it runs fine without any noticeable degradation in site performance because it opens up in its own separate window.

X-Fan
10-15-2003, 02:36 AM
can i use it for vBulletin beta x
i very like that mod,
X-Fan tell me ,i want to use this mod for vbb 3
how can i do that?

Sorry, but I haven't installed vB 3 yet so I'm not sure whether it's compatible.

Red Blaze
10-15-2003, 12:58 PM
Is there a way to add the journal stats top 5 entries, and top 5 views, and Bitsys' RPG hack stats, top 5 winners?

X-Fan
10-15-2003, 01:12 PM
Is there a way to add the journal stats top 5 entries, and top 5 views, and Bitsys' RPG hack stats, top 5 winners?

They could easily be added, I'm sure, but as I don't have those hacks installed myself I'm unfamiliar with the variables etc that they use. Sorry.

Gio Takahashi
10-21-2003, 08:24 PM
You know, I'd like to see the top 5 smileys added.

Your hack is very useful and I like it. Installed.

ha ha ha that was easy to modify the file to show any number higher than 5.

www.unitedempire.net/forum/quickstats.php




Edit: Okay, now there is something wrong with it...


Edit Again: 30 minutes later...

Okay I keep on doing this hack from scratch, and it is still not working, someone mind explaining what the heck is wrong?

X-Fan
10-22-2003, 04:32 AM
Edit: Okay, now there is something wrong with it...

Edit Again: 30 minutes later...

Okay I keep on doing this hack from scratch, and it is still not working, someone mind explaining what the heck is wrong?

What did you edit from the original code?

Gio Takahashi
10-23-2003, 03:02 AM
pretty much to make it show top 15 threads and 15 new threads.

It may have been caused by the wierd format of TXT but it was proven wrong....

UPDATE

I got it to work, it works very nice so far...I'd like to see the top 10 used smileys add to this.

Oh I also looked through your file, and managed to use it on the main page to show today statistic.

www.unitedempire.net

Very nice hack indeed.

Gio Takahashi
10-24-2003, 09:36 PM
Your script is WIERD.

I never changed anything except the store hack add on, and I used Ultra Edit as well, this time (was using notepad before) and ow it doesn't work AT ALL, there is a bug in the hack.

FleaBag
11-13-2003, 01:30 AM
Working pretty nicely!

Rampag33
11-13-2003, 03:14 AM
Very nice hacc, once I find a good place to use it at with all the other damn stats I already have installed I will install it.

Good job.

X-Fan
11-13-2003, 03:35 AM
Your script is WIERD.

I never changed anything except the store hack add on, and I used Ultra Edit as well, this time (was using notepad before) and ow it doesn't work AT ALL, there is a bug in the hack.

It works, Gio, I think you may have done something wrong whilst editing it.

Try reverting back to the code you had before installing the hack, then reinstalling it.

Gio Takahashi
11-13-2003, 04:43 PM
the thing is...it works then ti doesn't work...it only works when it feel like it......

X-Fan
11-13-2003, 08:35 PM
I honestly can't think of what might be causing that. This shouldn't be affected by any other hacks, as it's a standalone (ie has its own php file, it doesn't require any other files to be modified).

Red Blaze
11-14-2003, 03:21 PM
I got a problem. It was working very well but once someone registered, I get this error.

Fatal error: Call to undefined function: useragentcheck() in /home/thesonic/public_html/forum/quickstats.php on line 153

I tried replacing the original quickstats.php, but that didn't help either.

Edit: Err.. and now it works. o.o; What's with the hack? It takes time to gather information after something's been posted/register etc?

X-Fan
11-14-2003, 09:40 PM
I got a problem. It was working very well but once someone registered, I get this error.

Fatal error: Call to undefined function: useragentcheck() in /home/thesonic/public_html/forum/quickstats.php on line 153

I tried replacing the original quickstats.php, but that didn't help either.

Edit: Err.. and now it works. o.o; What's with the hack? It takes time to gather information after something's been posted/register etc?

You need to have the UserAgentCheck 1.00 hack installed. If you don't have or don't want that hack, then just remove these lines from quickstats.php:


$loggedins=$DB_site->query("SELECT session.useragent FROM session WHERE userid=0 AND session.lastactivity>$datecut");
$numberwebrobots=0;
$loggedinrobots="";
while ($loggedin=$DB_site->fetch_array($loggedins)) {
$checkagent = $loggedin['useragent'];
$webrobot = useragentcheck($checkagent, 1);
if ($webrobot) {
$numberwebrobots++;
if (!(preg_match("/$webrobot/i", $loggedinrobots) )) $loggedinrobots .= $webrobot . ", ";
}
}
if (!empty($loggedinrobots)) $loggedinrobots = "(" . substr($loggedinrobots, 0, -2) .")";
$numberguest = ($numberguest - $numberwebrobots);


Then find this line:


$DB_site->free_result($loggedins);


And after it, add this line:


$numberguest = intval($numberguest);


Lastly, find and remove these lines from the quickstats template:


<tr>
<td bgcolor="{secondaltcolor}"><smallfont><b>Web Robots Online</b></smallfont></td>
<td bgcolor="{secondaltcolor}" align="right"><smallfont>$numberwebrobots</smallfont></td>
</tr>