vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB Statistic version 3.0.0 (directors Cut *g*) (https://vborg.vbsupport.ru/showthread.php?t=74603)

PcFreak 04-09-2005 03:55 PM

Quote:

Originally Posted by nso
Is there any way to disable the parts that use Javascript?

Open Template "headinclude" in your AdminCP
del this line
PHP Code:

<script type="text/javascript" src="clientscript/statistic_java.js"></script

Quote:

Originally Posted by nso
The Javascript increased my bandwidth usage with about 50%

hmm????
A 9kb file with 4 querys (normal 2 if the user counted) need so many bandwith?

You must have a board with one forum and one post and 10 vistors in the week. (If that, you have a bandwith from 100 kb the week)
Of course the javacountig need then between 30-40 kb. ;)

This script use only 2 querys. (4 querys the User was not logged befor).
For a board with 1 Millon Users it?s need not more than 0.001% of the bandwith. But the srcipt work with ervery side refresh.
I think there must be a misunderstanding by your side. You interpret you server log not correctly.

Quote:

Originally Posted by nso
Is there perhaps another script that only collects stats from the database, and not from utilizing Javascript?

It?s not possible to log resolution or plugins without javascrit (js)

PcFreak

PcFreak 04-09-2005 04:03 PM

Quote:

Originally Posted by alderwazeh
First Many thanks for the auther of this hack...
Now getting this error although the hack has been successfully instaled ?!
when I move from the stat or the vb or CMPS it gives randomly this error massege ... when I refresh ..it disapear and the pages display normaly including the stat! what is the problem and how I can fix it ?

Warning: main(./statistic/statistic_spider.php): failed to open stream: No such file or directory in /statistic_counter.php on line 99

Fatal error: main(): Failed opening required './statistic/statistic_spider.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/alderwa/public_html/vb/statistic_counter.php on line 99

Have you upload the statistic_spider.php?
There must be in the statistic directory.
On line 99 of the statistic_counter.php this file is require.
But the spider.php is missing.

Tipp: Check your statistic directory.

PcFreak

PcFreak 04-09-2005 04:29 PM

Quote:

Originally Posted by nso
Is there any way to disable the parts that use Javascript?
The Javascript increased my bandwidth usage with about 50% - something I'm not really interested in.

Is there perhaps another script that only collects stats from the database, and not from utilizing Javascript?

I will it better explain.
The statistic javscript is like a bypass.
This script is not more as an function.
The javascript started with every php. Always then, if you refresh a side.
In your logs you see then that each second file was loaded wich the javascript. (Ups thus 50% . From 10 files wich was loaded they are 5 javascript files?)

But that is not bandwith!!
The script no range bandwith.

It is possibel take the javacounter in a normal vBulletin.file.

But I imagined much more better is: Don?t touch the orginal vBulletin files.
It more simple to install this mod (and uninstall, of course . But that makes nobody;) Because this mod is simple great :))

wolfyman 04-09-2005 05:03 PM

I'm running 3.0.7, it llooks like everything is working ok - EXCEPT the cronjob. when I go to mydomain.com/forum/includes/cron/statisticupdate.php I get this error:
Fatal error: Call to a member function on a non-object in /home/me/public_html/forum/includes/cron/statisticupdate.php on line 20

Help please :)

nso 04-09-2005 05:15 PM

Quote:

Originally Posted by PcFreak
Open Template "headinclude" in your AdminCP
del this line
PHP Code:

<script type="text/javascript" src="clientscript/statistic_java.js"></script


Will this disable the javscript-required sections? I do not currently have the script installed, I deinstalled it, so I cannot check for myself.

Quote:

hmm????
A 9kb file with 4 querys (normal 2 if the user counted) need so many bandwith?
What does queries have do to with bandwidth?
You do realize that with no-cache headers, the javascript does not get cached?

Quote:

You must have a board with one forum and one post and 10 vistors in the week. (If that, you have a bandwith from 100 kb the week)
Of course the javacountig need then between 30-40 kb. ;)
Code:

Users online: 117 (78 members and 39 guests)
Users online the last 24 hours: 4668 (3644 members and 1024 guests) 
Most user online at the same time was 683, 3. February 2005 at 22:07.

Threads: 31.567, Posts: 379.803, Members: 7.406

Bandwidth usage per day: ~1GB (increased to ~1,5GB the three days I had the hack installed)

Also the 'hits' (files sent from the server to the users) increased with about 50/100%.

Quote:

This script use only 2 querys. (4 querys the User was not logged befor).
For a board with 1 Millon Users it?s need not more than 0.001% of the bandwith. But the srcipt work with ervery side refresh.
I think there must be a misunderstanding by your side. You interpret you server log not correctly.
Again, what does queries have to do with bandwidth usage? This is an increase in CPU-cycles, not the amount of bits and bytes transfered.

Quote:

It?s not possible to log resolution or plugins without javascrit (js)
I am very well aware of this. I am not interested in logging that information. I'm simply interested in a script that shows top posters/top threads/top views/etc. (information that is allready located in the database)

nso 04-09-2005 05:18 PM

Quote:

Originally Posted by T3MEDIA
Bandwith or server resources? I am asking not being sarcastic.

JavaScript is downloaded by the visitor and executed on the users computer - Downloading it does not increase the CPU-load any more than, say, a standard HTML-file.
It does however require bandwidth to download a file from an external server - that is also what I am saying.

All that aside, my Dual Xeon 2.4 GHZ dedicated server can handle a couple of filetransfers and/or queries before you start to see it's behaviour change :)

PcFreak 04-09-2005 06:53 PM

Quote:

Originally Posted by by PcFreak in the first Post of this thread

How operates the vB statistics 3.0.0?
The vB statistics 3.0.0 consist of two essential parts


One part is to log each visitor, serarchengines and keywords, browserlanguages, browser plugins, referer ect.
The other part show Information of the existing vB database

If you want just show Information of the existing vB database .
Don?t activate the counter.

Quote:

==============================
== step 6 ==
==============================

Now let's activate the statistics and count of visitors
---------------------------------------------------------------------
6.1) Open Template "headinclude" in your AdminCP
add the following code at the end of the template in the last line!
---------------------------------------------------------------------

<script type="text/javascript" src="clientscript/statistic_java.js"></script>

---------------------------------------------------------------------
6.2) Open Template "phpinclude_start" in your AdminCP
add the following code at the end of the template in the last line!
---------------------------------------------------------------------

include("./statistic_counter.php");
Delete this lines.
But I do not understand nevertheless your JavaScript problem.
There are a lot of other js scripts active in vB. Even in the headinclude.

Or I have an understanding problem.
Did you mean java (not the Island or the coffee) ;) or did you mean "js" (JavaScript)

@wolfyman
This is line 20 in your statisticupdate.php
PHP Code:

$DB_site->query("DELETE FROM " TABLE_PREFIX "statistic_log_java    WHERE last_logtime < " . (TIMENOW 3600)); 

I am not shure, why you get an error.
Have you del the statistic_log_java table in you db?

PcFreak

Lionel 04-09-2005 11:29 PM

I just got an email about the database. Notice that the referrer is yahoo, and the error is from homepage which was up (am sure of that) at the time it happened.

What should I make out of this database error?
Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT counter
FROM statistic_searchengine_keywords
WHERE keywords = 'haiti news\'

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''haiti news\'' at line 3

mysql error number: 1064

Date: Saturday 09th of April 2005 08:21:31 PM
Script: http://www.site.com/
Referer: http://search.yahoo.com/search?p=haiti+news%5C&ei=UTF-8&fr=FP-tab-web-t-224&fl=0&x=wrt
Username: Unregistered

nso 04-10-2005 01:18 AM

Quote:

Originally Posted by PcFreak
There are a lot of other js scripts active in vB. Even in the headinclude.

Yes there is. And they all use bandwidth off course - like your javascript. Your javascript is massive and uses a lot of bandwidth on top of the allready required bandwidth.

Grosse file -> grosse bandwidth usage <-- semi deutch :)

PcFreak 04-10-2005 07:57 AM

Quote:

Originally Posted by Lionel
I just got an email about the database. Notice that the referrer is yahoo, and the error is from homepage which was up (am sure of that) at the time it happened.

What should I make out of this database error?

Search in your /statistic/statistic_searchengines.php
(Line round 221)

found:
PHP Code:

$keyword_found ereg_replace("'","",$keyword_found);      //Abfangen eines Fehlers der auftreten kann wenn ' Keyword vorkommt 

replace with:
PHP Code:

    $keyword_found ereg_replace("'","",$keyword_found);      //Abfangen eines Fehlers der auftreten kann wenn ' Keyword vorkommt    
    
$keyword_found eregi_replace("\"""",$keyword_found); //Abfangen eines Fehlers der auftreten kann wenn \ Keyword vorkommt 

PcFreak

Lionel 04-10-2005 10:08 AM

Thank you.

sv1cec 04-10-2005 11:08 AM

Quote:

Originally Posted by PcFreak
Search in your /statistic/statistic_searchengines.php
(Line round 221)

found:
PHP Code:

$keyword_found ereg_replace("'","",$keyword_found);      //Abfangen eines Fehlers der auftreten kann wenn ' Keyword vorkommt 

replace with:
PHP Code:

    $keyword_found ereg_replace("'","",$keyword_found);      //Abfangen eines Fehlers der auftreten kann wenn ' Keyword vorkommt    
    
$keyword_found eregi_replace("\"""",$keyword_found); //Abfangen eines Fehlers der auftreten kann wenn \ Keyword vorkommt 

PcFreak

Is there a reason why you suggest ereg_replace for the ' and eregi_replace for the \?

Rgds

Lionel 04-10-2005 11:51 AM

Looks like some search engines are sending in those characters. And those are no nos for script.

sv1cec 04-10-2005 03:18 PM

I understand that, and I had this problem long ago, but what I do not understand is why use one function for the ' and the case-sensitive eregi_replace for the \.

And it is most probably not an issue with the search engine sending those characters, as much as the user typing a phrase and then hitting the \ before the Enter key, as they complete their typing. The \ is close to the Enter key.

YLP1 04-11-2005 02:38 PM

I must say that this mod is AWESOME...and coming from a newbie to VB and PHP....I was able to install this without a hitch!!!

Paypal donation time for sure...

I have a question about the statistics folder in the forum install directory...was I suppose to upload the sides folder and these files?: statistic_browser_os.php; statistic_searchengines.php; and statistic_spider.php?

Oops one other question...what does the statitis_counter.php do (in forum root)? Is this like a page counter? If so, how do I get it to show?

Thanks again ...

PcFreak 04-11-2005 03:54 PM

copy this three files in in forum root:
e.g.
-forum/statistic.php
-forum/statistic_counter.php
-forum/statistic_java_counter.php

the other files must stay in the forum/statistic/ folder with the same file structure. (do not change)

The image directory of the distribution package should be uploaded to the ./statistic directoy (forum/statistic)

The statistic_counter.php is the most important file.
This file counts and logs all the statisic data.

PcFreak

sv1cec 04-11-2005 05:14 PM

Hey PcFreak, care to answer my question?

JoeLouie 04-11-2005 05:29 PM

Is there a way to show the average posts per day on the main statistics page? You have the total posts, and the days since the forum was put online... so I can't imagine that it would be anything too difficult. Any way of implementing this? I know that it's a very easy calculation to figure out on my own with a calculator, but if I don't need a calculator, it's even better :)

Great hack btw :D

PcFreak 04-12-2005 01:51 AM

Quote:

Originally Posted by sv1cec
Hey PcFreak, care to answer my question?

Upps... Sorry
Quote:

Originally Posted by sv1cec
what I do not understand is why use one function for the ' and the case-sensitive eregi_replace for the \.

The reason is: I don?t know a better solution.
Some people look for term like "hello\" or "'Freaks`s statistic is the best' " in the engines.

But the routine is not case-sensitive. It is implemented only if a search machine were actually found.

Quote:

Originally Posted by JoeLouie
Is there a way to show the average posts per day on the main statistics page?

Hmm..
I think you can use this code: e.g
PHP Code:

$average_post_ per_day $total_threads $testtage;
$average_post_ per_day vb_number_format($average_post_ per_day5); 

Put them into your forum.php under this line:
PHP Code:

$total_views vb_number_format($total_views_check);                                    //Alle HITS (wie oft wurden die Beitraege gelesen) 

Then you can use this new var "$average_post_ per_day" in the statistic template. (not tested ;))

PcFreak

JoeLouie 04-12-2005 02:58 AM

Quote:

Originally Posted by PcFreak
Hmm..
I think you can use this code: e.g
PHP Code:

$average_post_ per_day $total_threads $testtage;
$average_post_ per_day vb_number_format($average_post_ per_day5); 

Put them into your forum.php under this line:
PHP Code:

$total_views vb_number_format($total_views_check);                                    //Alle HITS (wie oft wurden die Beitraege gelesen) 

Then you can use this new var "$average_post_ per_day" in the statistic template. (not tested ;))

PcFreak

Thanks, I'll give that a shot and fool around with it if it doesn't work. I'm comfortable messing around with code that's already there... it's when I've gotta figure out the code on my own that give me trouble :)

ChrisLM2001 04-12-2005 08:05 AM

OMG!

<floored>

This is the Mother-of-all-Stats mods.

Installed and working flawlessly!

Chris

sv1cec 04-12-2005 08:44 AM

A minor issue, but something you might want to have a look at:

In the System Check, there are two references to the user's monitor resolution. One is "Your Monitor Resolution" and the other is "Your max. Monitor Resolution (depending on taskbar)".

When I run my system check, I get 1280x1024, which is my monitor resolution, but in the max. resolution I get 1280x996 ! Something does not compute here. The max. can't be smaller than the used one. My max. monitor resolution is 2048x1536.

Rgds

JoeLouie 04-12-2005 04:25 PM

Quote:

Originally Posted by sv1cec
When I run my system check, I get 1280x1024, which is my monitor resolution, but in the max. resolution I get 1280x996 ! Something does not compute here. The max. can't be smaller than the used one. My max. monitor resolution is 2048x1536.

Rgds

Max monitor resolution = monitor resolution - taskbar size. It's the maximum space that the window can take up.

JoeLouie 04-12-2005 04:33 PM

Btw, thanks PcFreak, I got the Avg Posts Per Day and Threads Per Day all figured out :)

Although I noticed something weird. Your statistics mod is showing a different total posts and total threads than my main forum page is. Not sure of the exact numbers, but it's showing 100-ish less posts and 30-ish less threads. Any idea what's up with that?

Nevermind... I just figured it out. The main forum page shows the true totals... the statistics mod shows the total of the posts and threads that you can see, so it doesn't include the posts and threads in hidden forums. Am I right?

sv1cec 04-13-2005 03:35 PM

Quote:

Originally Posted by JoeLouie
Max monitor resolution = monitor resolution - taskbar size. It's the maximum space that the window can take up.

Ah, thanks, I didn't know that! I learn as I get older!

Rgds

kevinrstruck 04-13-2005 08:43 PM

First let me say, very impressive hack. Well worth the short time to install. I am having a problem with my CRON job. I get this error when it runs:

Warning: main(./includes/cron/statisticsupdate.php): failed to open stream: No such file or directory in /admincp/cronadmin.php on line 56

Fatal error: main(): Failed opening required './includes/cron/statisticsupdate.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kevinstr/public_html/forums/admincp/cronadmin.php on line 56

Line 56 of cronadmin.php reads as this:

Code:

require_once($nextitem['filename']);

TTG 04-14-2005 02:36 PM

My Top 20 Referrer domains are being updated with relevant url's but the dates showing are all January / February 2005 !?

msimplay 04-14-2005 05:05 PM

there was an arcade addin for the last version of the statistic hack will that be back ?

jeepinator 04-15-2005 02:39 AM

OK, I sent you 5 eurothingies. Can we get a version that doesn't end in .00? :banana:

PcFreak 04-15-2005 02:55 AM

Quote:

Originally Posted by kevinrstruck
Warning: main(./includes/cron/statisticsupdate.php): failed to open stream: No such file or directory in /admincp/cronadmin.php on line 56

Fatal error: main(): Failed opening required './includes/cron/statisticsupdate.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kevinstr/public_html/forums/admincp/cronadmin.php on line 56

Line 56 of cronadmin.php reads as this:

Code:

require_once($nextitem['filename']);

The name of the file is statisticupdate.php and not statistic"s"update.php.

Quote:

Originally Posted by TTG
My Top 20 Referrer domains are being updated with relevant url's but the dates showing are all January / February 2005 !?

LOL ;)
At the moment, i have no answer. The timestamp entry for the ref url?s in the db is just time().
Quote:

Originally Posted by msimplay
there was an arcade addin for the last version of the statistic hack will that be back ?

May in the next version.

PcFreak

EvilHawk 04-16-2005 09:42 AM

Installed and working flawlessly!

Thanks!

TTG 04-16-2005 01:49 PM

Started to get this database error :-
Database error in vBulletin :

Link-ID == false, connect failed
mysql error:

mysql error number: 0

created by
Code:

http://www.thetechguys.co.uk/retreat/statistic_java_counter.php?&colordepth=32?=76&resolution=1280x1024&maxresolution=1280x1024&cookies=true&flash=true&mediaplayer=true&java=true&shockwave=true&realplayer=false&quicktime=true&acrobat=false&svg=false

Lizard King 04-16-2005 01:56 PM

Quote:

Originally Posted by TTG
Started to get this database error :-
Database error in vBulletin :

Link-ID == false, connect failed
mysql error:

mysql error number: 0

created by
Code:

http://www.thetechguys.co.uk/retreat/statistic_java_counter.php?&colordepth=32?=76&resolution=1280x1024&maxresolution=1280x1024&cookies=true&flash=true&mediaplayer=true&java=true&shockwave=true&realplayer=false&quicktime=true&acrobat=false&svg=false

That is nothing to do with this hack. You have to check with your hosting. Your mysql server is unreachable right now.

Jenta 04-17-2005 04:25 AM

what would be the best way to use this if you used vbadvanced as your homepage instead of your forum?

it would be best to track visitors at the root of your site if your forum is in a subdirectory

Crapaddict 04-17-2005 06:29 PM

Quote:

Originally Posted by MissKalunji
when i got to my statistic it says...
Forums online since: 12-31-1969 at 19:00 (12813 days)
This forum was installed by:


???????? how i can fix it?

Anyone got an idea on this one?

Crapaddict 04-17-2005 07:03 PM

On my forums, i integrated the link to the statistics in the indexpage (forums home)

like this:
*open template forumhome
*find:
Code:

<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
        <tr>
                <td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>

and replace with:
Code:

<a href=statistic.php><phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase></a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
        <tr>
                <td class="alt2"><a href=statistic.php><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></a></td>

about 20 seconds work :P

kevinrstruck 04-18-2005 06:26 PM

[QUOTE=PcFreak]The name of the file is statisticupdate.php and not statistic"s"update.php.


Duh...Thanks. Another stupid mistake on my part.

apfparadise 04-20-2005 09:33 PM

I LOVE this hack, have had it installed for a month now. One problem. In the Referrals (my most important section, new site) it shows my url also. I have tried to remove it from the list in Admin CP, and it does it when you enter it, but then it's back again. The list in the Admincp shows a blank screen in that part, no URLs listed, but it shows the "last time updated" part correctly. But it's empty, so it still shows all versions of my url, including:
http://aquatic-photography.com/ .....
www.aquatic-photography.com ....

How do I permanently remove it so that I can see an accurate list of referrals.

PcFreak 04-21-2005 03:49 AM

@apfparadise
There are two ways:

The first way:

Under "Options for Statistics Main Page" in AdminCP use: "aquatic-photography.com" as your own Domainname.

The second way:

################################################## ####################
************************************************** ********************
**If you want to exclude more than one domainname from beeing logged**
************************************************** ********************
################################################## ####################
-----------------------
open:
-----------------------
statistic_counter

-----------------------
Search for:

-----------------------

PHP Code:

//#########################################################################################################        
//Um weitere Domains auszuschliessen dieses Format benutzen 

-----------------------
add above:
-----------------------


PHP Code:

if (strpos(strtolower($DER_REFERER), "your-new-excluded-domain.com") === false

-----------------------
Attention:
-----------------------

Type the Domainname without http://www in the beginning!
just: your-new-excluded-domain.com

You can add Domainnames as much as you want to be excluded.
Use the same way as mentioned above.


Note:
In the next version of the statistic you can excluded domains, url?s ect. via Admin CP ;)

PcFreak

kthlnwrnr 04-24-2005 01:41 AM

I am having this weired problem. When I gat to step three (./forum/admincp/statistic_templates_install.php) the installation totally haults and I get a http 500 internal server error. What should I do to fix that?


All times are GMT. The time now is 07:24 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.02587 seconds
  • Memory Usage 1,918KB
  • 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
  • (7)bbcode_code_printable
  • (13)bbcode_php_printable
  • (28)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