Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
psiStats 2006 (The New vBStats for vBulletin 3.5.x - 3.8.x) Details »»
psiStats 2006 (The New vBStats for vBulletin 3.5.x - 3.8.x)
Version: 1.6.2, by akanevsky akanevsky is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 01-01-2006 Last Update: 02-27-2010 Installs: 301
DB Changes Uses Plugins Auto-Templates
Additional Files Translations  
No support by the author.

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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #222  
Old 01-13-2006, 12:12 AM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 46 bytes) in /home/sites/extremefitness/web/forum/includes/psistats/database_ip/217.php on line 1622
hmmmmm.... More than 50mb? Wow.

Code:
ini_set("max_execution_time", 0);
ini_set("memory_limit", "128M");
in psistats_update.php was needed.
Reply With Quote
  #223  
Old 01-13-2006, 12:16 AM
GamerJunk.net's Avatar
GamerJunk.net GamerJunk.net is offline
 
Join Date: Jan 2004
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I removed the class_core edit...yet I don't know what other edits there were....

Because my avatars are messed up and there is no updates....even after manualy running psistats_update.php
Reply With Quote
  #224  
Old 01-13-2006, 12:18 AM
GamerJunk.net's Avatar
GamerJunk.net GamerJunk.net is offline
 
Join Date: Jan 2004
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vision do you have a copy of the old version so I can manually go back and remove all edits, because reverting templates would be bad for me because I have custom templates and edits.
Reply With Quote
  #225  
Old 01-13-2006, 01:54 AM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i still get no stats to show up... i guess i may have to uninstall this one...
Reply With Quote
  #226  
Old 01-13-2006, 02:37 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DementedMindz
i still get no stats to show up... i guess i may have to uninstall this one...
Too buggy for my tastes...and reverting for every update (which for awhile there was hourly)....I don't think so....I like most of your hacks....and they work great, but this one i'm uninstalling.....
Reply With Quote
  #227  
Old 01-13-2006, 11:38 AM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

North America and US IP addresses do not appear to be working properly; I have almost no US traffic being reported whereas before the update it was 70% of my traffic. The stats for IPs also seem low, I'm not so sure this section is working very well and identifying countries as well as it was in the previous version. (I have 6x the traffic from Trinidad and Tobago than the US according to my current stats!)

One thing to check if you get no stats - if you already had a cron job #14, the insert for this cron would have failed and you'd never get a stats update. I would suggest putting a NULL in place of the 14 as cron's cronid field is an auto increment and you do not need to specify the cron job number.

Code:
INSERT INTO cron
VALUES ( NULL, 1136665500, -1, -1, -1, 'a:1:{i:0;i:25;}', './includes/cron/psistats_update.php', 1, 'psiStats 2006 Hourly Update' )
Reply With Quote
  #228  
Old 01-13-2006, 01:02 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

More IP info. I get data like this (when printing out some added debug code to see them $item['count'] for each entry:

Code:
211540739 -> US -> 1 ->17
212681730 -> US -> 1 ->17
214962100 -> US -> 1 ->17
215641169 -> US -> 1 ->17
215650894 -> US -> 1 ->17
215630563 -> US -> 1 ->17
215698855 -> US -> 1 ->17
215837282 -> US -> 1 ->17
215915896 -> US -> 1 ->17
201656985 -> US -> 1 ->17
2097169078 -> JP -> 1 ->17
2155237942 -> US -> 3 ->17
2157127178 -> US -> 2 ->17
and this line:

Code:
                                        $updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
Would seemingly only be adding 1 to the value, not 1 for every instance of US in the list.

I changed it to this:

Code:
                                if (isset($database_country["$coucode"]))
                                {
                                        $item['count'] += $updatecache["country_||_$coucode"][1];
                                        $updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
                                }
                                break;
So that multiple "US" (or any other) entries would have a cumulative effect on the total. This appears to be working, however, your historial data prior to this change will be very inaccurate and should be erased.

I also added line for all the other totals - I'm working to confirm this is works.

Code:
                                // MDP
                                $itemcnt = $item['count'] + $updatecache["browser_||_$browser[bstring]"][1];
                                $updatecache["browser_||_$browser[bstring]"] = array($existingcache["browser_||_$browser[bstring]"]['count'], $itemcnt, $existingcache["browser_||_$browser[bstring]"]['cmisc']);
                                
                                // MDP
                                $itemcnt = $item['count'] + $updatecache["os_||_$browser[os]"][1];
                                $updatecache["os_||_$browser[os]"] = array($existingcache["os_||_$browser[os]"]['count'], $itemcnt, $existingcache["os_||_$browser[os]"]['cmisc']);
Code:
                                        // MDP
                                        $item['count'] += $updatecache["referrer_||_$item[cdata]"][1];
                                        $updatecache["referrer_||_$item[cdata]"] = array($existingcache["referrer_||_$item[cdata]"]['count'], $item['count'], $existingcache["referrer_||_$item[cdata]"]['cmisc']);
Code:
                                        // MDP
                                        $item['count'] += $updatecache["screendepth_||_$depthstring"][1];
                                        $updatecache["screendepth_||_$depthstring"] = array($existingcache["screendepth_||_$depthstring"]['count'], $item['count'], $existingcache["screendepth_||_$depthstring"]['cmisc']);
Code:
                                // MDP
                                $item['count'] += $updatecache["screenresolution_||_$item[cdata]"][1];
                                $updatecache["screenresolution_||_$item[cdata]"] = array($existingcache["screenresolution_||_$item[cdata]"]['count'], $item['count'], $existingcache["screenresolution_||_$item[cdata]"]['cmisc']);
Reply With Quote
  #229  
Old 01-13-2006, 01:40 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MPDev, thanks that fixed it with me. I am just curious why we should do it to the rest of them as well as I have had no problem . . .
Reply With Quote
  #230  
Old 01-13-2006, 01:45 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added them just to be sure, I didn't want to run verifications across each data type to see if there are cases where more than 1 record exists for each item.

i.e. if the browser cache has more than one entry per browser (as there was more than one entry per country), then the numbers in the browser cache are also not correct. If there is only 1 browser record, 1 os record, then it wouldn't be a problem.

However, I am faily sure my Windows XP stats were way too low, so I added it to be sure.
Reply With Quote
  #231  
Old 01-13-2006, 01:59 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL @ Win XP . . . I didn't even relize it but mine are really low too. Thanks for the fixes and hope you get your search string text ported over soon.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05896 seconds
  • Memory Usage 2,347KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete