vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - psiStats 2006 (The New vBStats for vBulletin 3.5.x - 3.8.x) (https://vborg.vbsupport.ru/showthread.php?t=127980)

akanevsky 09-30-2006 10:00 PM

psiStats 2006 (The New vBStats for vBulletin 3.5.x - 3.8.x)
 
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.

/*===================================*\
|| psiStats 2009
||
|| Author : Anton Kanevsky
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : Feb 28, 2010
||
|| Time required to install: 1 minute
|| Difficulty: easy
\*===================================*/

DESCRIPTION

A sophisticated statistics module for your vBulletin board.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


STATISTICS

File Uploads: 1
Products to Install: 1


FEATURES

Statistics Tracking:
  • General Board Statistics
  • Style Usage Statistics
  • Top Threads & Forums Statistics
  • Display Colors + Resolutions (Requires JavaScript) Statistics
  • Countries + Regions Statistics
  • Browsers + Operating Systems Statistics
  • Referring Sites Statistics
  • Referrer Statistics
  • Age & Gender Demographics

Features:
  • No code or template modifications required.
  • Modules can be enabled or disabled, as needed.
  • Statistics are updated every fifteen minutes via cron.
  • Mother site, e.g. the site where your forum is hosted, will never be listed as a referrer.
  • Only one extra query per forum page.
  • Statistics can be sorted either numerically or alphabetically.
  • Automatic Integration with Referrer Statistics (if installed)[/i]
  • Configurable number of last items for top threads / forums.
  • Allows to specify whether to show data from from forums with post counts disabled.
  • Configurable number of last items in referring site statistics.
  • Configurable gender field and responses (optional).
  • Configurable list of usergroups that can access statistics (optional).
  • Referring site statistics censure (by word) and individual site blockage.
  • Detects most popular browsers and operating systems.
  • Requires cookies for screen color depth and resolution tracking.

VERSION HISTORY

1.6.2 - stable
[+] Added recognition for Windows 7-based user agents.

1.6.1 - stable
[+] The navbar link is now shown only to those who can access the statistics.

1.6.0 - stable
[+] Added two new modules:
  • Referrer Statistics
  • Age & Gender Demographics
[+] Added Google Chrome recognition (this includes a matching icon).
[+] Added Setting to control whether top threads & forums data is gathered from forums where posts are not counted towards user post counts.
[+] Updated ip to country databases to the most recent ones.
[F] Corrected a few phrasing bugs and phrased things that were not phrased in 1.5.2.

1.5.2 - stable
[+] Added a few more translations (thanks to those who submitted these).
[+] Fixed a few bugs that were mentioned for 1.5.1.

1.5.1 - stable
[+] Added option to globally enable / disable any stats modules.
[+] Fixed bug with some staff being counted twice.
[+] All numbers are now nicely formatted.

1.5.0 - stable
[+] No more template edits, just upload the files and the product and you're ready to go.
[+] vBulletin 3.5.x - 3.8.x compatible.

1.4.4 - stable
[+] Referrering Sites now have a JS and an XML feed capability.
[+] Added a better firefox icon into the icon database.
[F] Fixed a couple of minor bugs.

1.4.3 - stable
[+] The hack now respects vBulletin's "Show Active Users" setting.
[+] The hack is now valid XHTML (all templates must be reverted).

1.4.2 - stable
[+] Corrected a bug, which caused incorrect number of moderators to be displayed.
[+] gb.gif renamed to uk.gif.

1.4.1 - stable
[+] The front page has been revised, and it now loads four times as fast regardless of the size of your database.
[+] The ip database has been updated to the revision of October 18, 2006.
[+] The flag database has been updated to the revision of October 18, 2006.
[+] Referrer statistics hack, if installed, is now detected automatically. No configuration required.
[+] Added an option to specify a custom board creation date, if not reflected correctly by the joindate of a user with lowest userid.

1.4.0 - stable
[+] The system is now cross-compatible with both vBulletin 3.5 and 3.6.
[+] The ip database has been updated to the revision of August 30, 2006.
[+] A variety of code optimizations and template corrections have been done.
[+] To keep statistics legible, the engine now only tracks the major and the minor browser versions. X.Y.Z.E is now stripped to become X.Y.

1.3.2 - stable
[+] Since more browsers support cookies than ajax, screendepth/screenresolution tracking is now done via cookies.
[+] One less query per page - e.g. now it's only one query per page.
[+] Statistics are now updated every 15 minutes rather than every hour.
[F] Fixed faulty count in cron and in region stats screen.
[F] Fixed bug which prevented the cron from being created in some cases.
[F] Fixed minor bugs which caused errors of the E_NOTICE level.

1.3.1 - stable
[F] Fixed AJAX coding error, which used synchronous ajax instead of asynchronous, evidently causing higher load.
[F] Fixed WOL error that was caused by AJAX stats update and that made it look like everyone is browsing the stats.
[F] Fixed a query in update cron.

1.3.0 - stable
[+] Yay, no more file edits! :)
[+] No more multiple queries. The hack now takes up a maximum of two (2) queries per page in contemporary browsers, and one (1) query in non-javascript browsers.
[+] New vBulletin Option: Statistics can be configured either numerically or alphabetically.
[+] Since Opera is updated way too often, the engine, from now on, will only identify the primary version marker (7,8,9 as opposed to 7.01, 7.02, 7.21, 8.01 etc).
[+] Templates and phrases are now in their own separate group.
[F] Eliminated a bug which prevented bot identification from working properly.

1.2.8 - beta
[+] Removed 5 queries during the stats recording.
[+] Countries mapped to valid cia abbreviations and the countrybit template has been updated.
[+] Added missing Fiji flag (Thanks to firstrebel!)
[F] Eliminated a bug which prevented the thread and post limit from having any effect.
[F] Eliminated a bug which prevented the browser identification from working properly in some cases.

1.2.7
[F] Corrected online users count.
[F] Corrected staff count.
[F] Eliminated the style stats bug, which originated from users who had invalid styles saved in their profiles.
[F] Eliminated the posts per day bug.
[F] Renamed "gb.gif" to "uk.gif"
[F] Renamed "Oceania" region to "Australia and Oceania".
[F] Only threads and forums to which the user has permissions are displayed in top threads and forums.

1.2.6
[F] Minor template fix.

1.2.5
[+] Rewritten Browser and OS detection (previosly somebody else's module was used).
[F] For staff stats, only primary usergroups are now counted.

1.2.1
[+] New "Usergroups Allowed To View Stats" admincp option.
[+] Navigation split in two rows, for greater view
[+] Crawlers now have a browser picture associated with them.
[F] Eliminated Tracking of Empty Referrers.
[F] Updated country database with a number of missing countries, including UK.
[F] Minor fix to style statistics screen, applying to styles that are not used.

1.2.0
First Official Release.

1.1.0
Development release; Excess queries, phrases, and code has been removed.

1.0.0
Development release; All phrases that were hard-coded were moved into the phrase system.

The installation manual is contained within the attached file.

IF YOU LIKE MY HACK, PLEASE CLICK INSTALL

akanevsky 10-01-2006 01:55 PM

FAQ

Q: How do I install the product XML?
A: http://www.vbulletin.com/docs/html/plugin_system

Q: Stats do not get updated.
A: Stats are updated once every 15 minutes (not instantly).

Q: Can I limit viewing of the stats to certain usergroups?
A: Yes. Go to vBulletin Options -> psiStats 2006 and edit that.

Q: It's not tracking full referrer URLs, only domains.
A: That's how it is designed. It will not be changed.

Q: A country flag is missing.
A: There are some missing flags, yes. If you have a flag icon of the same format, it'll be much appreciated if you can send it to me.

Q: I get a LOCK TABLES error...
A: Make sure you have set proper permissions for the MySQL user. To find out how to set MySQL permissions, contact your hosting provider.

Q: This and that isn't working properly...
A: Shh! First, make sure that you have the latest version installed, and doble check that you have done all the steps correctly. If you are 100% sure in both, post your problem.

kenanulas 10-01-2006 02:00 PM

second mine:D
thanks

Deepdog009 10-01-2006 02:05 PM

Kbp 2 Kbp4 :D


Beauts *** Checkmate :cool:

akanevsky 10-01-2006 02:21 PM

Question to everyone:

On some large boards, the browser stats parts get very large due to the fact that there is a lot of different browser versions. What approach would you guys recommend to shorten that list?

Example of a long list: http://waw-df.com/forum/psistats.php

Edit:

I changed it not to track more than the major and the minor versions. E.g., if a version if X.Y.Z, it'll only track X.Y. To reset browser stats, run this query:

[SQL]DELETE FROM `psistats_data` WHERE `ctype` = 'browser'[/SQL]

hotwheels 10-01-2006 02:36 PM

wow, simply amazing work..........again

Thanks so much for sharing your mod's with us. It seem's simply flawless.

I attatched a working image of it from my site. AMAZING.

morrow 10-01-2006 02:41 PM

Download doesn't work

akanevsky 10-01-2006 02:43 PM

Try again, I've been updating the file.

Endurer 10-01-2006 02:47 PM

Awesome mod. Can I change the update interval? It can become resource intensive for fairly large boards therefore I'd like to increase the update time.. Is it possible?

akanevsky 10-01-2006 02:47 PM

Quote:

Originally Posted by Endurer
Awesome mod. Can I change the update interval? It can become resource intensive for fairly large boards therefore I'd like to increase the update time.. Is it possible?

The smaller the update time, the less is the load. :) 15 minutes is the optimal delay for large boards esspecially.

morrow 10-01-2006 03:19 PM

Very nice hack! I've installed it with no issues so far. Thanks for your hard work.


<--! Clicks Install --> :)

Phooey 10-01-2006 03:28 PM

Awesome. I'm so glad you decided to make this for 3.6.X. Definately one of my favorite hacks.

/installs

gedsta 10-01-2006 03:37 PM

installed and thx

Yorixz 10-01-2006 03:39 PM

Very glad it's updated now, installed here as well!

Ronak 10-01-2006 04:00 PM

Was Waiting for this hack for a long time to be released !! Awesome :) Nominated !! for MOTM

akanevsky 10-01-2006 04:02 PM

Quote:

Originally Posted by Ronak
Was Waiting for this hack for a long time to be released !! Awesome :) Nominated !! for MOTM

Thanks, much appreciated. :)

hotwheels 10-01-2006 04:37 PM

Quote:

Originally Posted by Ronak
Awesome :) Nominated !! for MOTM

I second that click..... :D

Foxter 10-01-2006 04:38 PM

Anthony, your hack is brilliant as ever! Thank you so much! :)

BruceWest 10-01-2006 04:51 PM

Installed! Thanks so much! I'll let you know how things turn out.

hotwheels 10-01-2006 05:30 PM

For those running php portals and want this in the drop down quick links, just add
PHP Code:

<tr><td class="vbmenu_option"><a href="/forums/psistats.php$session[sessionurl_q]">$vbphrase[psistats_link]</a></td></tr

underneath
PHP Code:

<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr

in your p_block_navbar.....works like a champ.

Darat 10-01-2006 05:31 PM

I've installed this and everything seems to be working but in "Countries:"
it isn't reporting anyone from the UK? I've just checked and several of our UK Members are posting (I'm also posting from the UK). I've checked the IP addresses and they do resolve to the UK. Any ideas?

gedsta 10-01-2006 05:31 PM

Hi

Have installed and it would appear that all the UK members are showing as North America, is there anything i need to do or will it sort itslef out?

Great hack btw

lexx27 10-01-2006 05:42 PM

I get this error

Quote:

Database error in vBulletin 3.6.1:

Invalid SQL:
LOCK TABLES psistats_cache READ, psistats_data READ;

MySQL Error : Access denied for user 'webz'@'localhost' to database 'webz_gr_-_forum'
Error Number : 1044
Date : Sunday, October 1st 2006 @ 09:30:46 PM
Script : http://www.webz.gr/forum/ajax_cron.php?rand=469666
Referrer :
IP Address : 212.251.121.219
Username : guest
Classname : vb_database

zendiver 10-01-2006 05:43 PM

I am playing around with this on my test site and receive this when I go to 'Referring Stats Statistics' in the vBulleting Options part of the ADMINCP

The referring sites database is empty.

Also, when going to the statistics, it seems that only the first row of links work, the rest of them shows NO data.

Using 3.5.4 and 3.6 on my test sites.

akanevsky 10-01-2006 05:47 PM

Quote:

Originally Posted by gedsta
Hi

Have installed and it would appear that all the UK members are showing as North America, is there anything i need to do or will it sort itslef out?

Great hack btw

It may report some countries incorrectly, there's nothing that can be done about it. The most likely cause is that the IP traces to North America - but the party responsible for it is your ISP.

Quote:

Originally Posted by lexx27
I get this error

Please make sure that you have LOCK and UNLOCK permission turned on for your mysql user. If you don't know how to check that, please contact your hosting provider.

Quote:

Originally Posted by zendiver
I am playing around with this on my test site and receive this when I go to 'Referring Stats Statistics' in the vBulleting Options part of the ADMINCP

The referring sites database is empty.

Also, when going to the statistics, it seems that only the first row of links work, the rest of them shows NO data.

Using 3.5.4 and 3.6 on my test sites.

As stated in the first reserved post, the statistics are updated every 15 minutes. So the stats will appear after a while.

zendiver 10-01-2006 05:56 PM

Thanks Andrew...I went ahead and tried to run the cron from the AdminCP and got a db error...I will wait. :)

akanevsky 10-01-2006 06:15 PM

Quote:

Originally Posted by zendiver
Thanks Andrew...I went ahead and tried to run the cron from the AdminCP and got a db error...I will wait. :)

You'll wait for what? The error is caused by server configuration, and I explainded how to fix it in my previous post.

gedsta 10-01-2006 06:17 PM

thx for previous answer

however now i have

Members: 1274 | Staff: 17 (2 admins, 15 s-mods, 0 mods) | Active: 718 |

It has assigned all the normal mods to super mods - any ideas?

zendiver 10-01-2006 06:25 PM

Quote:

Originally Posted by Psionic Vision
You'll wait for what? The error is caused by server configuration, and I explainded how to fix it in my previous post.

I own my server and have no problems with LOCK / UNLOCK...what I meant when I said, "I will wait" is for the 15 minute interval to pass. :D

akanevsky 10-01-2006 07:44 PM

Quote:

Originally Posted by gedsta
thx for previous answer

however now i have

Members: 1274 | Staff: 17 (2 admins, 15 s-mods, 0 mods) | Active: 718 |

It has assigned all the normal mods to super mods - any ideas?

It counts people that have IS_MODERATOR permission turned on in their usergroup as supermoderators (except admins, of course).

Quote:

I own my server and have no problems with LOCK / UNLOCK...what I meant when I said, "I will wait" is for the 15 minute interval to pass.
So, did it pass yet? :)

zendiver 10-01-2006 07:50 PM

Quote:

Originally Posted by Psionic Vision
{snip}So, did it pass yet? :){/snip}

Yes sir, it sure did my friend...thank you. Now I am going over the information shown in each of the stats....will let you know what I find. ;)

Excellent MOD Andrew....Good work!

akanevsky 10-01-2006 08:05 PM

Quote:

Originally Posted by zendiver
Yes sir, it sure did my friend...thank you. Now I am going over the information shown in each of the stats....will let you know what I find. ;)

Excellent MOD Andrew....Good work!

I beg you a pardon, but who is Andrew?

zendiver 10-01-2006 08:27 PM

Sorry about that 'ANTHONY'...client that just left my office was named Andrew....please accept my apologies. :D

eNforce 10-01-2006 08:39 PM

I had the 3.5.4 version and loved it.

Install went smoothly on my 3.6 board, thanks!

Snake 10-01-2006 08:44 PM

Thanks a bunch! I was waiting for this.

Emanet-Kaos 10-01-2006 08:46 PM

awsome hack thanks :O)

Darat 10-01-2006 08:50 PM

Quote:

Originally Posted by Psionic Vision
It may report some countries incorrectly, there's nothing that can be done about it. The most likely cause is that the IP traces to North America - but the party responsible for it is your ISP.

...snip...

I'm seeing exactly the same problem - manually checking the IP traces of the UK members they are all resolving to the UK.

akanevsky 10-01-2006 09:00 PM

Quote:

Originally Posted by zendiver
Sorry about that 'ANTHONY'...client that just left my office was named Andrew....please accept my apologies. :D

No problem. :)

Quote:

Originally Posted by Darat
I'm seeing exactly the same problem - manually checking the IP traces of the UK members they are all resolving to the UK.

Please give me some sample IP addresses of yours and I'll see if there is anything that can be done.

smoknz28 10-01-2006 09:29 PM

Very well done! ;)

Thank you for sharing this code with the rest of us. :D

Mark

oberheimhaven 10-01-2006 09:40 PM

Per usuall!! Another Kick @ss Hack!!! Thxs for the hard work and the awesome errorless hack zero issues in 3.6.0
Thxs again
MarkAnthony
MusiciansQuarters!!!:cool:


All times are GMT. The time now is 06:19 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.01780 seconds
  • Memory Usage 1,863KB
  • 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
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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