vb.org Archive

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

firstrebel 01-11-2006 04:06 PM

I just unpacked the vB 3.5.3 zip file and checked includes/functions_cron.php and it is there.

Bob

DementedMindz 01-11-2006 04:07 PM

which line are u seeing this on cause i dont see it on mine at all?

SmEdD 01-11-2006 04:36 PM

Fix to show Firefox. Not 100% tested!

Find in database_agent.php:
PHP Code:

'Firefox'            => array('/Firefox\/([0-9\.]+)/i',                'Gecko',        false,        false    ), 

Replace with:
PHP Code:

'Firefox'            => array('/Firefox\/([0-9\.]+)/i',                false,        false,        false    ), 


S@NL - BlackBik 01-11-2006 05:37 PM

Quote:

Originally Posted by DementedMindz
ok i tried that and when i run it i get a error

Database error in vBulletin 3.5.3:

Invalid SQL:
LOCK TABLES psistats_cache READ, psistats_data READ;
etc.

Check posts 170 and 177 for a (temporary?) sollution for this error.

As for the unlock tables line in the functions_cron file. I didn't find it either, but i've downloaded the upgrade a couple of days after the fix and my guess is that they updated the package ;)

S@NL - BlackBik 01-11-2006 05:57 PM

Thanks SmEdD, that does the trick. Firefox shows now :)

firstrebel 01-11-2006 07:06 PM

:ermm:

I totally removed this hack, did the fix on the vB bug, then reinstalled this hack. No MySQL errors at all, but my country stats are a bit questionable, see attachment. :confused:

Bob

akanevsky 01-11-2006 07:17 PM

Quote:

Originally Posted by redtailboa
I think this is what you want:

aix = "IBM AIX"
atheos = "Atheos"
amiga = "AmigaOS"
darwin = "Darwin"
osf = "Digital"
free-bsd = "FreeBSD"
hp-ux = "HPUX"
net-bsd = "NetBSD"
open-bsd = "OpenBSD"
palm = "PalmOS"
photon = "QNX Photon"
symbian = "SymbianOS"
unixware = "UnixWare"
open-vms = "OpenVMS"
sun = "SunOs"
beos = "BeOS"
os/2 = "Os2"
irix = "IRIX"
plan9 = "plan9"
unix = "Unix"
x11 = "Unix"

I believe that covers most of the popular OS'es out there

Uh... I only meant "the most commonly used OS'es that you want me to add". Making a full list of OS'es is not my goal.

DementedMindz,
http://www.vbulletin.com/forum/bugs3...iew&bugid=2056

Zelda-King 01-11-2006 07:50 PM

Well I just tested this on my test board (which is RC3 at the moment) and I'm still getting that @" added to the database username when I run psistats_update.php. Seeing as there's at least one person with this working on 3.5.3 though, I'm at a loss as to why I'm getting this. My test board has very few plugins installed and I have no other scheduled tasks doing this.

redtailboa 01-11-2006 08:13 PM

Psionic Vision

free-bsd = "FreeBSD"
net-bsd = "NetBSD"
open-bsd = "OpenBSD"
sun = "SunOs"

Those should be good since thats what the majority of my users will be using (guessing)

DementedMindz 01-11-2006 10:29 PM

Quote:

Originally Posted by Psionic Vision

$vbulletin->db->close(); is not in that file they updated it i installed the new copy of vbulletin... i still get the error and no stats show up so im clueless on what to do now...

Rickie3 01-11-2006 10:52 PM

Quote:

Originally Posted by SmEdD
Fix to show Firefox. Not 100% tested!

Find in database_agent.php:
PHP Code:

'Firefox'            => array('/Firefox\/([0-9\.]+)/i',                'Gecko',        false,        false    ), 

Replace with:
PHP Code:

'Firefox'            => array('/Firefox\/([0-9\.]+)/i',                false,        false,        false    ), 


that done the trick working now, cheers

akanevsky 01-11-2006 11:39 PM

Quote:

Psionic Vision

free-bsd = "FreeBSD"
net-bsd = "NetBSD"
open-bsd = "OpenBSD"
sun = "SunOs"

Those should be good since thats what the majority of my users will be using (guessing)
Ok, will add.

Quote:

$vbulletin->db->close(); is not in that file they updated it i installed the new copy of vbulletin... i still get the error and no stats show up so im clueless on what to do now...
What's the problem then?

Quote:

that done the trick working now, cheers
I thought all firefoxes have "Gecko" in their ID string. If not - yes, that will work for firefoxes that do not have gecko in them... I got that Gecko thing from browscap.ini.

DementedMindz 01-12-2006 02:11 AM

Quote:

Originally Posted by Psionic Vision
What's the problem then?

that none of the stats show up cause the cron cant run cause it gives a database error.... and that fix $vbulletin->db->close(); aint in the new vbulletin files... so thats why im posting here thinking maybe you would know why it wont run the cron....

SmEdD 01-12-2006 04:55 AM

Quote:

Originally Posted by Psionic Vision
I thought all firefoxes have "Gecko" in their ID string. If not - yes, that will work for firefoxes that do not have gecko in them... I got that Gecko thing from browscap.ini.

They all do but it seems this works . . .

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

GamerJunk.net 01-12-2006 07:15 AM

After upgrade to 1.3.1 all stats get erased?

MThornback 01-12-2006 07:25 AM

Your folder names changed in this update mate....agent and flag both had "s" on them in a previous version

akanevsky 01-12-2006 08:59 PM

Quote:

After upgrade to 1.3.1 all stats get erased?
After upgrade to 1.3.0 and above from 1.2.8 and below.

Quote:

Your folder names changed in this update mate....agent and flag both had "s" on them in a previous version
That's why I ask to *revert* templates.

GamerJunk.net 01-12-2006 10:22 PM

So to upgrade what do I do? I basically uploaded all teh files again and imported the file again...

Still no stats and the bottom links aren't like they were before...

http://www.gsnforce.com/forum/psistats.php

MPDev 01-12-2006 10:37 PM

Upgraded, thanks.

One thing I added you might consider - I track the last referrer link into my site for each entry so that instead of click on www.google.com, it clicks to the last google.com referrer link into the site - this shows me what search term was used last to get to my site - or if coming from another website tells me what page actually directed the user to my site.

Having just the domain name is nice, but knowing where the referral came from is even nicer.

Since I haven't looked at the new caching code, here's what I had under the older code:

Code:

                                                                $db->query_write("
                                                                        UPDATE " . TABLE_PREFIX . "psistats_referrer
                                                                        SET count = count + 1, dateline = '" . TIMENOW . "', refline = '". $db->escape_string($_SERVER["HTTP_REFERER"]) ."'
                                                                        WHERE referrer = '" . $db->escape_string($referrerdata['host']) . "'
                                                                ");


GamerJunk.net 01-12-2006 11:29 PM

When I try to view an avatar...

I get this error..

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT * FROM vb3_psistats_country WHERE code = 'US' LIMIT 1;

MySQL Error : Table '*********vb.vb3_psistats_country' doesn't exist
Error Number : 1146
Date : Thursday, January 12th 2006 @ 08:27:10 PM
Script : http://www.gsnforce.com/forum/image....ine=1137115255
Referrer : http://www.gsnforce.com/forum/image....ine=1137115255
IP Address : 198.68.128.190
Username :
Classname : vb_database



This is only for uploaded avatars....not ones already on my server that I put through the admincp

MPDev 01-13-2006 12:12 AM

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.

GamerJunk.net 01-13-2006 12:16 AM

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

GamerJunk.net 01-13-2006 12:18 AM

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.

DementedMindz 01-13-2006 01:54 AM

i still get no stats to show up... i guess i may have to uninstall this one...

MThornback 01-13-2006 02:37 AM

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.....

MPDev 01-13-2006 11:38 AM

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' )


MPDev 01-13-2006 01:02 PM

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']);


SmEdD 01-13-2006 01:40 PM

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 . . .

MPDev 01-13-2006 01:45 PM

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.

SmEdD 01-13-2006 01:59 PM

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.

FFMG 01-13-2006 02:11 PM

Quote:

Originally Posted by MThornback
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.....

It?s a bit of a shame; I am also uninstalling that one.
The stats are way off, no Firefox, hardly any windows users and not that many people from the US. How can I trust any of the other stats?

But more importantly I keep getting DB errors from time to time, I am not saying that psiStats has anything to do with it, but since I installed it I have been getting emails about lost connections.

I will comeback and check in a few weeks, hopefully the beta testing would have been done.

FFMG

MPDev 01-13-2006 02:14 PM

You need to make the Firefox fix on the previous page for Firefox to get picked up.

S@NL - BlackBik 01-13-2006 02:27 PM

Yep, that did the trick, I can confirm that.

I'm sticking with this hack. I'm sure Psionic Vision is gonna improve it.
It is looking good and when he gets feedback he can improve the hack.
But when everybody is uninstalling he doesn't get feedback :)

I've installed the updates as mentioned above and that seemes to work.

FFMG 01-13-2006 02:36 PM

Quote:

Originally Posted by S@NL - BlackBik
Yep, that did the trick, I can confirm that.

I'm sticking with this hack. I'm sure Psionic Vision is gonna improve it.
It is looking good and when he gets feedback he can improve the hack.
But when everybody is uninstalling he doesn't get feedback :)

I've installed the updates as mentioned above and that seemes to work.

As you can see in this thread I did try to help, (albeit only a tiny bit).
But the problem with the database is proving too much for me.
How can I keep a hack running when it _might_ be the one causing db errors.

Also, this hack is about statistics, how can I use it, (and in turn help improving it), when most of the stats I have already gathered are useless to me.

Even putting aside the bugs, the actual gathering of the data is incorrect, what other stats could be wrong? My referrer?

FFMG

MPDev 01-13-2006 05:05 PM

I don't see any database errors cropping up and I run 1,000+ users online at a time.

Another issue I noticed, the region percentage don't add up. In looking at psistats.php there are two lines:

Code:

$total_count = fetch_sum($getcountries);
and

Code:

$total_count                                          += $country['count'];
It appears that double counting is going on - if I comment out the second line, then the percentages in the regions appear correct.

redtailboa 01-13-2006 05:37 PM

One more suggestion, please add Mozilla as a browser to the list

akanevsky 01-13-2006 06:06 PM

You people don't get a simple thing. I'll write it in big font, maybe that will help you understand it.

Aside from coding, I have a LOT of other things to do in my life. The fact that I do not respond does not mean that you haven't been heard. There is no need to post the same suggestion more than once.

Those of who you, who are speaking in a demanding tone (and I am not speaking about anyone specifically, you know who you are), you are most likely one of those pathetic people who has no life, who sits at the computer 24/7, and for whom a delayed update - where "delayed" stands for "less frequent than 2 hours" - is an "omg #$^ it's the #$&@^$% end of the world". If that's the case - that's your problem, not mine. Just know that you are (or soon will be) the one and only reason that I will forfeit support of ALL my free hacks, or make this hack the last free hack you'll ever see coming from me. If I do so, you'll regret it for the rest of your life, esspecially things that will come henceforth. If you do not want that to happen, sit the **** back and be patient.

Now that I said it, thanks to those of you who have given suggestions and code fixes - you know who you are - I will review (and, if needed, address) them whenever I have time. And the latter might not happen until after two or three weeks. Thank you for your patience and understanding.

discussionarena 01-13-2006 06:43 PM

hello
What could be the reason why my stats don't show no visits at all ?

thanks

gothicuser 01-13-2006 06:47 PM

Quote:

Originally Posted by Psionic Vision
You people don't get a simple thing. I'll write it in big font, maybe that will help you understand it.

Aside from coding, I have a LOT of other things to do in my life. The fact that I do not respond does not mean that you haven't been heard. There is no need to post the same suggestion more than once.

Those of who you, who are speaking in a demanding tone (and I am not speaking about anyone specifically, you know who you are), you are most likely one of those pathetic people who has no life, who sits at the computer 24/7, and for whom a delayed update - where "delayed" stands for "less frequent than 2 hours" - is an "omg #$^ it's the #$&@^$% end of the world". If that's the case - that's your problem, not mine. Just know that you are (or soon will be) the one and only reason that I will forfeit support of ALL my free hacks, or make this hack the last free hack you'll ever see coming from me. If I do so, you'll regret it for the rest of your life, esspecially things that will come henceforth. If you do not want that to happen, sit the **** back and be patient.

Now that I said it, thanks to those of you who have given suggestions and code fixes - you know who you are - I will review (and, if needed, address) them whenever I have time. And the latter might not happen until after two or three weeks. Thank you for your patience and understanding.

You pathetic child..... UNINSTALLED!!!!

redtailboa 01-13-2006 06:49 PM

FYI, to get freebsd to show up make the following change:

Look for :
Code:

        'Free BSD'                              =>      'free-bsd',
And change to :
Code:

        'Free BSD'                              =>      'freebsd',


All times are GMT. The time now is 04:33 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.01750 seconds
  • Memory Usage 1,875KB
  • 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
  • (14)bbcode_code_printable
  • (4)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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