PDA

View Full Version : [Release v2.0.3] vbStats


Bane
Fri 19th Oct '01, 10:08am
For vBulletin version: 2.0.3
Files added: vbs_counter.php, vbstats.php, vbstats_admin.php, vbstats_set.php
Files to edit: None! (all hacking is optional)
Current Version: 203.2 (10.21.01 - 3am CST)

What does it do? Tracks + Displays Visitors Browser
Tracks + Displays Visitors OS
Tracks Referring Sites
Tracks Total Hits
Tracks Top Posters
Tracks Top Forums
Tracks Top Threads
Displays a Massive Amount of Stats
Link Queue!
Install File!
Un-Install File
Intergration with vBPortal 2.x/3.x
Members,Staff,Active,Non-Active,Activity Level,Newest Member,Top Referrer
Threads,Posts,PMs,Thread Views,Page Views
(vBPortal) News Stories,Comments,Weekly Surveys
(vBPortal 3.x) Link Categories, Links
More but I'm tired of typing already


Check the samples:
Stats
http://www.talkloud.net/forums/vbstats.php
Incoming Referrals
http://www.talkloud.net/forums/vbstats.php?action=incoming
Member Referrals
http://www.talkloud.net/forums/vbstats.php?action=memberrefer
Top Posters
http://www.talkloud.net/forums/vbstats.php?action=topposters
Top Threads/Forums
http://www.talkloud.net/forums/vbstats.php?action=topthreads
Top Visitors Countries
http://www.talkloud.net/forums/vbstats.php?action=country


Well, here it is :) Thank you all so much for waiting around!

If you happen to run a German or Chinese board I have translations for you here ( Click Me! (http://www.talkloud.net/vbstats/download.php)) if not the current version is below.

Special Note: I am about as far as it gets from a PHP guru. This is my first hack or addon or whatchamacallit. If this somehow nukes your system Im quite apologetic, but I know you will all be smart enough to BACK UP YOUR DATABASE BEFORE INSTALLING THIS.. I have faith :) Brad and Chen have both checked this out and given their stamps on it but that doesnt mean it will all Gel for you. Be smart, back it up.

Install: There is a self install file that takes care of the templates and tables, simply unzip the package and upload it (with paths) to your vbulletin directory. Then run the install. Please be sure you add your site (yoursite.com) to the excluded urls in the CP. If you dont your site will get counted as a referrer and that can get messy.

Demo: You can of course see the demo at http://www.talkloud.net/ however if you'd like to see it in use on some other boards check out vbstats page (http://www.talkloud.net/vbstats) where I will try to keep a list of installs for you to check out. If you do install it please let me know so I can put your site up!

Thanks for using my addon and I hope it all goes well for you! :D

-------
Changed v203.2

This update its probably best to just uninstall and install again. Thats why im putting this update out so fast. So you dont get a lot of stats piled up and then have to erase them all :D

Simply upload the new php files and run the install (Choose option uninstall, then install)

- Removed Hard Coded Colors (replaced blue with $color4)
- Added Link to Link Queue Help (The ? before the link queue)
- Added ability to exclude forums (in vbstats_set.php)
- Added ability to exclude MULTIPLE forums [Really!] Thanks to FireFly!
- Added normalfont to top listings (sorry)
- Removed link to showmods.php (kiers hack)

I haven't changed the translated language versions yet. Give me some time on those :( I'm working on a better country detection scheme for the next release. It will be an upload and forget it release.

Download fixed :(

Bane
Fri 19th Oct '01, 10:08am
This Space Reserved for Already Asked Questions:

In my referrer list my site shows up as a referrer?
In your control panel for vbStats, add your forum name (no www!) to the exclude URLs. If you wish to add other domains you don't want tracked on the referrer list, add these here as well.
eg - www.microsoft.com = microsoft.com


My vbstats shows Division by Zero repeated on the top!
You may want to check to insure you included the vbscounter.php file in your phpinclude template.
include("./counter.php");


Where can I change the colors, settings, etc..?
If you made the admin cp hack then you can change it in your control panel under the new option vbStats Settings.

If not go run the file vbstats_set.php, it should be in your vBulletin admin directory.


I have opted not to modify any VB php files, so how do I add these domains to the exclude list?

Simply point your browser to your vb admin directory address and run the file vbstats_set.php?action=add


What are excluded domains anyhow?

Excluded domains are domains that are not counted as referrers. They wont show up in your referrer list or on the link queue.

What versions does it work with?

Currently working splendid on all 2.x versions to date. Though if you are running anything before 2.0.3 you should make sure you have done the security fix.

Dakota
Fri 19th Oct '01, 10:17am
Do you know if it will work on vb2.0.1?

btw...very nice hack

Bane
Fri 19th Oct '01, 10:30am
Originally posted by Dakota
Do you know if it will work on vb2.0.1?

It should work great on 2.0.1 as well yes :D

MarkB
Fri 19th Oct '01, 10:37am
Uploading it as I type... :)

MarkB
Fri 19th Oct '01, 11:03am
Looking good... http://www.ultimatemetal.com/forum/vbstats.php

:) Installation was a breeze! Thanks for such a great add-on!!

amykhar
Fri 19th Oct '01, 11:09am
working like a charm :)

http://www.eaforums.com/vbstats.php

Amy

BradC
Fri 19th Oct '01, 11:20am
Worked great for me to!

Great job Bane! :)

amykhar
Fri 19th Oct '01, 11:21am
Ok. Found a minor gripe. I can fix it for mine, but you might want to fix this in the real thing as well.

I don't think hidden forums should be listed on the list of popular threads and forums. I also tweaked it so that categories don't show up in the popular forums list. That's probably just personal preference though. :)

It's a wonderful hack, and I thank you.

Amy

CoolaShacka
Fri 19th Oct '01, 11:33am
all the links in CP and www.myforum.com/vbstats.php shows me a blank Page.
Why?

amykhar
Fri 19th Oct '01, 11:39am
Here's a tip for active forums :D

Before I could type in the excluded domains, I got several hits from them. When I excluded them, they still remained in the database, just didn't accrue new hits.

I had to go manually remove them from the database to get them off the list.

Such is the price of popularity :D

Amy

Bane
Fri 19th Oct '01, 11:39am
amykhar: I will see how the private forums are done and fix that. also the excludes :)

CoolaShacka: Are you actually linking to www.myforum.com/vbstats.php?

floleb7
Fri 19th Oct '01, 11:51am
Warning: Supplied argument is not a valid MySQL result resource in /home/latriade/public_html/forum/vbstats.php on line 87
1146: Table 'latriade_ezogroup.vbstats_counter' doesn't exist


why he try to see in db latriade_ezogroup ?
in my config files of vb it's latriade_forum so i don't understand

CoolaShacka
Fri 19th Oct '01, 11:55am
sure.
just look here: URL edited

Dontom
Fri 19th Oct '01, 11:57am
getting a blank page? You are using the translated Version!
be sure to change
require("../vbslang_en.php"); to point to the appropiate languagefile (appears in 3 different files)
Tom

Bane
Fri 19th Oct '01, 12:06pm
Originally posted by floleb7
Warning: Supplied argument is not a valid MySQL result resource in /home/latriade/public_html/forum/vbstats.php on line 87
1146: Table 'latriade_ezogroup.vbstats_counter' doesn't exist


why he try to see in db latriade_ezogroup ?
in my config files of vb it's latriade_forum so i don't understand

Umm.. not sure why it would since it uses the connect from your vbulletin board.

CoolaShacka
Fri 19th Oct '01, 12:07pm
Thanks Bane... this Hack is great
Danke Dontom... Dein Tip war Gold Wert.

floleb7
Fri 19th Oct '01, 12:11pm
Originally posted by Bane


Umm.. not sure why it would since it uses the connect from your vbulletin board.

all the table was create but i have this msg and the table are in latriade_forum not in latriade_ezogroup

Bane
Fri 19th Oct '01, 12:13pm
Originally posted by Dontom
getting a blank page? You are using the translated Version!

Fixed this in the downloads.. Thanks Tom :D How was the translation? ok?

orca
Fri 19th Oct '01, 12:33pm
Erm where do I change the color3 etc.? :D

Bane
Fri 19th Oct '01, 12:39pm
If you made the admin cp hack then you can change it in your control panel.

If not go run the file vbstats_set.php, it should be in your vbulletin admin directory.

orca
Fri 19th Oct '01, 12:41pm
I'm so st...Anyway, the color blues is hardcoded, why?

Well, it's a great hack. It's just the blue which looks a bit ugly...

Bane
Fri 19th Oct '01, 1:03pm
LOL, sorry about that orca, I will fix that. For now you can change it in the templates. :)

DarkReaper
Fri 19th Oct '01, 1:36pm
Arrgh...could ya fix the blue? :)

What's the link queue? And it doesn't appear to be counting hits or anything for me. I keep going to pages on the forums but it says 0 for everything.

Bane
Fri 19th Oct '01, 1:42pm
Where is black hardcoded?

As far as the blue you can change this in the templates for now, I will fix this very soon.

For those who dont like that. Should I just make it a $color3 or give it its own class?

Don ->LKSAB
Fri 19th Oct '01, 1:46pm
Works great :-)

www.lksab.com/forum/vbstats.php

One small problem!!!
Click on [Countries].
Alot of hits from El Salvador.
But all of thoes hits are from Sweden not from El salvador!!!

/Don

BigSjedow
Fri 19th Oct '01, 1:47pm
7. Be sure to add this line to your phpinclude template:

include("vbs_counter.php");


in what file is that ?? Or were ??

DarkReaper
Fri 19th Oct '01, 2:05pm
Don't remember seeing that include in the instructions...added it and its working fine :)

What is the link queue?

BigSjedow: You add that line to your phpinclude template.

Bane
Fri 19th Oct '01, 2:14pm
Originally posted by Don ->LKSAB
But all of thoes hits are from Sweden not from El salvador!!!

Hmm.. Sweden has the code <se> El Salvadors is <se> not sure why they would show up, unless its the same person and he set up his encoding to el salvador?

BigSjedow: In your vB admin panel click on style and in the fonts/colors/etc.. you can find the phpinclude template fairly easily.

DarkReaper: yoursite.com/pathtovbstats/vbstats.php?action=help#LinkQueue

amykhar
Fri 19th Oct '01, 2:17pm
Originally posted by Bane


Hmm.. Sweden has the code <se> El Salvadors is <se> not sure why they would show up, unless its the same person and he set up his encoding to el salvador?



Uh Bane? Read what you just posted :D se = se

DarkReaper
Fri 19th Oct '01, 2:19pm
Ah, cool. Would there be any way to make it configurable so the hit numbers won't be shown, as with some other things, but percentages will? Or have a way to make it so admins and super mods can view all the stats, but regular members/guests can only see percentages? I'm not into having the hit counts on my site public knowledge :)

Bane
Fri 19th Oct '01, 2:19pm
LMAO El Salvador = SV :p Sorry about that.

Don ->LKSAB
Fri 19th Oct '01, 2:19pm
Its not the same people!!

The most of my users are from sweden.
And all of us show up as El Saldvador.

/Don

Bane
Fri 19th Oct '01, 2:31pm
Originally posted by DarkReaper
Ah, cool. Would there be any way to make it configurable so the hit numbers won't be shown, as with some other things, but percentages will? Or have a way to make it so admins and super mods can view all the stats, but regular members/guests can only see percentages? I'm not into having the hit counts on my site public knowledge :)

I will look at doing this. See how much effort it is :D

Don: I realize they arent the same. Im not sure why they are registering as El Salvador. When you go to my country page (http://www.talkloud.net/forums/vbstats.php?action=country) is it showing any Sweden hits? Or moving up El Salvador?

Don ->LKSAB
Fri 19th Oct '01, 2:42pm
Went to your page.
Did some refresh and El Salvador mooved up 5 hits.
No Sweden.

/Don

Bane
Fri 19th Oct '01, 2:53pm
I really have no idea why this is occuring, I know its the encoding but until I have a steady way of checking each I dont know what to do about it. Since I don't have anyone from El Salvador to test this for me I suppose you could change the table in PHPMyAdmin from El Salvador to Sweden.

I know the codes are correct in the script. And the detection process works as well (or seems to) I have a problem with some people coming up with english encoding that shouldnt, but until now the only people that occured with were people that were *using* english encoding.

Don ->LKSAB
Fri 19th Oct '01, 3:15pm
Can i change the countries in the setup script and run it again??

/Don

Bane
Fri 19th Oct '01, 3:19pm
If you run the uninstall first that will work yes..

jrwap
Fri 19th Oct '01, 3:21pm
Great Hack.

It was very easy to install and works well. I must agree, the text colors should be configurable.

Thanks,

-JRW

Don ->LKSAB
Fri 19th Oct '01, 3:32pm
Did a uninstall changed Sweden/El salvador in the install script.

And then renamed the flag files.

Now it works greate!!!!

/Don

Pilot
Fri 19th Oct '01, 3:36pm
I installed it but have some questions/comments.

Step 5 - need to clarify that subdirectories under /images are used.

Step 7 - took me a little while to find this as I don't know much about templates.

Step 8 - Don't know where to do this - I have opted not to modify any VB php files - ie not to install the optional hacks - so how do I add these domains to the exclude list?

(Why is this needed anyhow?)

Can you also explain how to add the optional hacks in the "install.txt" file so I can later revisit this without re-running the install script?

It looks good - some problems - it shows 2301 threads new in last 24 hours and 36 new views (no way!).

I think the last 24 hr views and threads numbers might be mixed up.

PS - What is a link queue? What is the "activity level"?

Any idea of the performance overhead of this hack?

How much still works if you leave out the phpinclude part (which presumably cuts the overhead)?

You definitely need to exclude hidden forums (order value of 0) and obviously don't show information about threads that they can't normally see (eg forums they have no access to).

The security issues are rather problematic and I can't let my users see this until they are sorted.

Great hack for admins though. When you update it please include instructions on what's needed to upgrade for existing users of the hack.

Bane
Fri 19th Oct '01, 3:46pm
Added to Asked Questions

I have opted not to modify any VB php files, so how do I add these domains to the exclude list?

Simply point your browser to your vb admin directory address and run the file vbstats_set.php?action=add

What are excluded domains anyhow?

Excluded domains are domains that are not counted as referrers. They wont show up in your referrer list or on the link queue.


Can you also explain how to add the optional hacks in the "install.txt" file so I can later revisit this without re-running the install script?

Good Idea

I think the last 24 hr views and threads numbers might be mixed up.

Will check

Any idea of the performance overhead of this hack?

No one that has installed it has noticed anything.

Bane
Fri 19th Oct '01, 3:48pm
the phpinclude part is what updates the counter.

Take that out it wont track countries, referrers, browser, os, etc.. only what vB tracks by default.

Dunny
Fri 19th Oct '01, 3:50pm
Database error in vBulletin: Invalid SQL: SELECT statloc,useonnow,usequeue,usevbp,usevbpl,queuemax, color1,color2,color3,acolor,scolor,mocolor,mecolor ,ucolor,norefer1 FROM vbstats_options
mysql error: Table 'dog.vbstats_options' doesn't exist
mysql error number: 1146
Date: Friday 19th of October 2001 12:26:53 PM
Script: /forum/vbstats.php
Referer:

i messed up i think, any idea what its telling me matey?

Bane
Fri 19th Oct '01, 3:55pm
Did you run the install? :D

Thomas P
Fri 19th Oct '01, 4:18pm
Two thumbs up,
terrific hack and definetely worth the waiting!
Thanks a bunch bane and contributing users,
-Tom

ColdFusion
Fri 19th Oct '01, 4:31pm
Works great on 2.00 as well :D

RobAC
Fri 19th Oct '01, 4:33pm
i'm still getting a ton of division by 0 errors and I made sure that the addition was made to the phpinclude template. And the file is uploaded....i've tried several combinations in the phpinclude file and nothing works. any ideas?

RobAC
Fri 19th Oct '01, 4:34pm
Never mind. Figured it out. Nice job! :D

Dunny
Fri 19th Oct '01, 4:37pm
yep good work mate, I got it sorted...and yes I did run the install, give me some credit here :D

TheComputerGuy
Fri 19th Oct '01, 4:48pm
Very Nice HACK Bane, I hope to have it on WebMafiaForums Fully installed in jut a few minutes...images take so long on a 56k

badmeetsevil-
Fri 19th Oct '01, 5:00pm
Great hack! Love it!

patvdv
Fri 19th Oct '01, 5:00pm
Just installed the vbstats (superb) hack. But the hits generated from my *.be (belgium) domain are counted against Germany (*.ge). Any ideas?

Don ->LKSAB
Fri 19th Oct '01, 5:08pm
Do a uninstall and change the country names :-)

Then rename the flag images.

/Don

Bane
Fri 19th Oct '01, 5:17pm
Belgium lists fine on mine.

Are you using German encoding?

patvdv
Fri 19th Oct '01, 5:18pm
I don't know if that will work because the install script has the right values:

Belgium -> .be
Germany -> .de (not .ge, my mistake)

How would swapping these around fix things?

patvdv
Fri 19th Oct '01, 5:20pm
Bane,

My Internet Explorer is set to 'en-us'. Or do you mean something else?

Dalius
Fri 19th Oct '01, 5:22pm
I LOVE YOU BANE

;)

Bane
Fri 19th Oct '01, 5:23pm
When you installed windows and picked a country I suppose :D

I am going to rewrite the way it detects countries. I thought encoding would be much better but it seems a mess.

Bane
Fri 19th Oct '01, 5:23pm
Originally posted by Dalius
I LOVE YOU BANE

;)

I feel the love! :D :D :D

patvdv
Fri 19th Oct '01, 5:26pm
I'll be eagerly awaiting the new country dedection method :)

Dalius
Fri 19th Oct '01, 5:36pm
I'll install it later, i'm having probs with my databse! :(

Pilot
Fri 19th Oct '01, 5:47pm
My country list looks fairly accurate. Whatever you do some people will wrongly use the defaults which tend to be the US.

Bane
Fri 19th Oct '01, 5:59pm
I'm going to release a new version in just a minute with the forum exclusions, fixed the hard coded colors, etc..

As far as the countries, Im going to write a two tiered system for that to try to make it as accurate as possible, but that will be a while.. my head hurts atm :) Gonna play some football.

patvdv
Fri 19th Oct '01, 6:01pm
How about Alka Seltzer? :D

Bane
Fri 19th Oct '01, 6:20pm
New Version in first post..

Changed v203.2
- Removed Hard Coded Color
- Added Link to Link Queue Help
- Added ability to exclude forums
- Added normalfont to top listings

badmeetsevil-
Fri 19th Oct '01, 6:21pm
Bain, I want you to bare my children.

I love you man.

Bane
Fri 19th Oct '01, 6:22pm
Originally posted by badmeetsevil-
Bain, I want you to bare my children.
I love you man.

I'll love ya right back if you spell my name right :D

DarkReaper
Fri 19th Oct '01, 7:06pm
I ran the upgrade script and then went to change the options:

Database error in vBulletin Control Panel: Invalid SQL: SELECT startdate,exforum,statloc,flagloc,useflags,useonno w,usequeue,usevbp,usevbpl,refermax,queuemax,toppos tmax,topthreadmax,recruitmax,incbar1,incbar2,incba r3,incbar4,incbar5,incbar6,norefer1,norefer2,color 1,color2,color3,acolor,scolor,mocolor,mecolor,ucol or FROM vbstats_options
mysql error: Unknown column 'exforum' in 'field list'
mysql error number: 1054
Date: Friday 19th of October 2001 10:58:05 PM
Script: /forums/admin/vbstats_set.php

DarkReaper
Fri 19th Oct '01, 7:13pm
Arg. I just did an uninstall and reinstall. When I tried to reinstall:


Database error in vBulletin Control Panel: Invalid SQL: CREATE TABLE vbstats_options (
startdate varchar(255) NOT NULL,
exforum varchar(255) NOT NULL,
statloc varchar(255) NOT NULL,
flagloc varchar(255) NOT NULL,
useflags smallint(6) NOT NULL,
useonnow smallint(6) NOT NULL,
usequeue smallint(6) NOT NULL,
usevbp smallint(6) NOT NULL,
usevbpl smallint(6) NOT NULL,
refermax smallint(6) NOT NULL,
queuemax smallint(6) NOT NULL,
toppostmax smallint(6) NOT NULL,
topthreadmax smallint(6) NOT NULL,
recruitmax smallint(6) NOT NULL,
incbar1 smallint(6) NOT NULL,
incbar2 smallint(6) NOT NULL,
incbar3 smallint(6) NOT NULL,
incbar4 smallint(6) NOT NULL,
incbar5 smallint(6) NOT NULL,
incbar6 smallint(6) NOT NULL,
norefer1 smallint(6) NOT NULL,
norefer2 smallint(6) NOT NULL,
color1 varchar(10) NOT NULL,
color2 varchar(10) NOT NULL,
color3 varchar(10) NOT NULL,
color4 varchar(10) NOT NULL,
acolor varchar(10) NOT NULL,
scolor varchar(10) NOT NULL,
mocolor varchar(10) NOT NULL,
mecolor varchar(10) NOT NULL,
ucolor varchar(10) NOT NULL
vbs_field1 varchar(255) NOT NULL
vbs_field2 varchar(255) NOT NULL
vbs_field3 varchar(255) NOT NULL
)
mysql error: You have an error in your SQL syntax near 'vbs_field1 varchar(255) NOT NULL
vbs_field2 varchar(255) NOT NULL
vbs_fiel' at line 33
mysql error number: 1064
Date: Friday 19th of October 2001 11:08:49 PM
Script: /forums/admin/install_vbstats.php?s=&step=3

DarkReaper
Fri 19th Oct '01, 7:17pm
Jeez...bugs galore ;)

In the install file:


$DB_site->query("CREATE TABLE vbstats_options (
startdate varchar(255) NOT NULL,
exforum varchar(255) NOT NULL,
statloc varchar(255) NOT NULL,
flagloc varchar(255) NOT NULL,
useflags smallint(6) NOT NULL,
useonnow smallint(6) NOT NULL,
usequeue smallint(6) NOT NULL,
usevbp smallint(6) NOT NULL,
usevbpl smallint(6) NOT NULL,
refermax smallint(6) NOT NULL,
queuemax smallint(6) NOT NULL,
toppostmax smallint(6) NOT NULL,
topthreadmax smallint(6) NOT NULL,
recruitmax smallint(6) NOT NULL,
incbar1 smallint(6) NOT NULL,
incbar2 smallint(6) NOT NULL,
incbar3 smallint(6) NOT NULL,
incbar4 smallint(6) NOT NULL,
incbar5 smallint(6) NOT NULL,
incbar6 smallint(6) NOT NULL,
norefer1 smallint(6) NOT NULL,
norefer2 smallint(6) NOT NULL,
color1 varchar(10) NOT NULL,
color2 varchar(10) NOT NULL,
color3 varchar(10) NOT NULL,
color4 varchar(10) NOT NULL,
acolor varchar(10) NOT NULL,
scolor varchar(10) NOT NULL,
mocolor varchar(10) NOT NULL,
mecolor varchar(10) NOT NULL,
ucolor varchar(10) NOT NULL
vbs_field1 varchar(255) NOT NULL
vbs_field2 varchar(255) NOT NULL
vbs_field3 varchar(255) NOT NULL
)");


SHOULD BE

$DB_site->query("CREATE TABLE vbstats_options (
startdate varchar(255) NOT NULL,
exforum varchar(255) NOT NULL,
statloc varchar(255) NOT NULL,
flagloc varchar(255) NOT NULL,
useflags smallint(6) NOT NULL,
useonnow smallint(6) NOT NULL,
usequeue smallint(6) NOT NULL,
usevbp smallint(6) NOT NULL,
usevbpl smallint(6) NOT NULL,
refermax smallint(6) NOT NULL,
queuemax smallint(6) NOT NULL,
toppostmax smallint(6) NOT NULL,
topthreadmax smallint(6) NOT NULL,
recruitmax smallint(6) NOT NULL,
incbar1 smallint(6) NOT NULL,
incbar2 smallint(6) NOT NULL,
incbar3 smallint(6) NOT NULL,
incbar4 smallint(6) NOT NULL,
incbar5 smallint(6) NOT NULL,
incbar6 smallint(6) NOT NULL,
norefer1 smallint(6) NOT NULL,
norefer2 smallint(6) NOT NULL,
color1 varchar(10) NOT NULL,
color2 varchar(10) NOT NULL,
color3 varchar(10) NOT NULL,
color4 varchar(10) NOT NULL,
acolor varchar(10) NOT NULL,
scolor varchar(10) NOT NULL,
mocolor varchar(10) NOT NULL,
mecolor varchar(10) NOT NULL,
ucolor varchar(10) NOT NULL,
vbs_field1 varchar(255) NOT NULL,
vbs_field2 varchar(255) NOT NULL,
vbs_field3 varchar(255) NOT NULL
)");


Thanks for the excellent hack, regardless! :)

Bane
Fri 19th Oct '01, 7:45pm
Whoops :( All fixed in the new upload..

Delhaze
Fri 19th Oct '01, 8:48pm
Problem:
All browsers are being picked up as "Other".
(Windows 2000 Server SP2. PHP 4.06 isapi)

I changed getenv("HTTP_USER_AGENT") to $GLOBALS["HTTP_USER_AGENT"] and it seems to fix it.

This also effect the OS detection.

Is it likely to effect others as well ?
If so what else should I try changing.

Also how would I keep unconfirmed users from showing up as newest member.

Bane
Fri 19th Oct '01, 8:52pm
Check out vbstats.php?action=info

This is what I used to check vars. if these work they work :) If not you need to change that setting in your code.


The new user thing is actually the same code vb uses on the forumhome.

Delhaze
Fri 19th Oct '01, 9:07pm
All blank. :(

Anymore no why getenv isn't working on my server, maybe a php.ini change needed ?

Oh yes, forgot I'd modified the new user thing there already.

Delhaze
Fri 19th Oct '01, 9:11pm
Just found this on php.net.

Note: This function does not work in ISAPI mode

Thats a bit of a bummer to say the least.

drumsy
Sat 20th Oct '01, 3:14am
How about an uninstall, does that come equipped???

WizyWyg
Sat 20th Oct '01, 3:40am
I just downloaded it and THERE is no install_vbstats.php in the zip file.

I downloaded it again, to be sure and nope, no install_vbstats.php

Nemesis77
Sat 20th Oct '01, 4:01am
I installed this for a friend on his board. I'm testing it now by trying different browsers, but all browsers are being picked up as Internet Explorer.

I tried change the getenv to $Global is suggested in a previous post but still didn't work. ANy other Ideas

Great hack BTW. thanks

BigSjedow
Sat 20th Oct '01, 5:10am
Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 158

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 164

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 161

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 185

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 147

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 138

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 144

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 141

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 135

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 150

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 153



still get these

floleb7
Sat 20th Oct '01, 7:49am
Originally posted by BigSjedow
Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 158

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 164

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 161

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 185

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 147

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 138

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 144

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 141

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 135

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 150

Warning: Division by zero in /usr/local/psa/home/vhosts/experienced.nl/httpdocs/VBB/vbstats.php on line 153



still get these


7. Be sure to add this line to your phpinclude template:

include("vbs_counter.php");

floleb7
Sat 20th Oct '01, 7:51am
why vbstats don't use style colors ?
if there are 2 or more styles you cannot have perfect color for each

floleb7
Sat 20th Oct '01, 7:52am
http://www.latriade.net/forum/vbstats.php

if i use vbstats thru admin pannel there is no prob to see but directly i have allways this.

Silviu
Sat 20th Oct '01, 8:16am
I have two questions for you:

a) what is the phpinclude template? where can i find it? what is its name? :)

b) it seems that vbstats is working partially (except "division by zero" part), but after i've performed all changes described in installation script, i've realized that there is no link inserted in forum control panel or somewhere. are there any changes to be performed to see vbstats link directly on forum instead of typing it manually?

Thanks in advance.

amykhar
Sat 20th Oct '01, 10:35am
Bane, I hate to be a nudge, but private forums still show up in the top forums list. The code for the query looks the same. I'll poke around a bit and see if I can't figure out the query you want. :)

Amy

Pogo
Sat 20th Oct '01, 10:42am
Silviu a) The name of the phpinclude template is phpinclude. You will find it in the template part of your CP.

b) Just insert a link die vbstats.php where you want to see it.

Ifrani
Sat 20th Oct '01, 11:48am
Originally posted by amykhar
Bane, I hate to be a nudge, but private forums still show up in the top forums list. The code for the query looks the same. I'll poke around a bit and see if I can't figure out the query you want. :)

Amy

I hope u find it soon... It isn`t nice to see the private Forums in the statistics...

Lesane
Sat 20th Oct '01, 1:37pm
aah....a very tight hack man, thnx. The hack runs very good and very well only 1 lil problem:

You have a link by the numbers of staff by Members Stats:
showmods.php?s=

Showmods.php dont exists :(

DarkReaper
Sat 20th Oct '01, 1:42pm
That's another addition called "Show admin groups"

do a search for it :)

Silviu
Sat 20th Oct '01, 1:52pm
10x Pogo. :)

Btw, i've added ShowMods and it's working pretty smooth. Bane, great job with this hack.

amykhar
Sat 20th Oct '01, 1:55pm
Here's a bit of what you want to do to exclude private forums. Find in vbstats.php:

$topthreadmax=$incoming[topthreadmax];

Insert this right after that:
$eaex = $DB_site->query_first("SELECT exforum FROM vbstats_options");

Then, change the various popular threads and forums queries. example:

$topthread3 = mysql_query("select * from forum where allowposting<>0 and forumid not in ($eaex[exforum]) order by replycount DESC limit $topthreadmax");

This just a rough draft of a fix. I suggest you all wait until Bane updates before fixing this yourself unless you know what you are doing. :)

Amy

Bane
Sat 20th Oct '01, 2:35pm
Whoops, I slept a bit late today.. let me wake up and look at all the problems a bit.

Bane
Sat 20th Oct '01, 3:15pm
Amy: I put the old file right back in.. its fixed now.

drumsy: Uninstall works splendid.

WizyWyg: When you extract the zip, it will be pathed. When you go into the directory you unzipped into, take a look into the /admin directory. the install_vbstats.php file should be in there.

Floleb7: Style colors would have been great, I probably should have used only that. But I wanted the numbers configurable seperately. I should mention again however that since vbstats is made for vbulletin, everything is modified by templates. You will find the vbstats templates in the same place as the rest of them, you can change the colors there if you wish.

Silviu: The division by zero error is from having no info, when you include the file in your phpinclude or global.php you will stop getting that error :) and just make a link off your forums to vbstats.php and you should be fine.

Lesane: Thats Kiers showmods.php hack... I guess my way of saying everyone should have it :p

Delhaze: :D Thanks for your button program, hehe, it doesn't work for me, but what an addition to the community!.. I would love once I get this working for everyone in a stable manner to figure out the switches with you to make it work on windows based servers, feel free to grab my ICQ or shoot me an email. I believe this would benefit some others as well.

Thanks to everyone for picking up my slack a bit. The download is updated (again) I'm still working on a better country detection method that doesnt default to .com and such. Once again thanks for being patient with me.

The new color4 and exforum settings can be set in the control panel.

Justice
Sat 20th Oct '01, 5:22pm
ah, finally the long awaited stats hack.

Is the private forums thing fixed in the install? I'll wait til then before installing...

thanks Bane

dxb
Sat 20th Oct '01, 6:09pm
first of all thank you very much for this lovely hack Bane

I'm having troble with the memberrefer and I've seen the same problem with Don ->LKSAB on the second page of this hack

http://www.lksab.com/forum/vbstats.php?action=memberrefer

and it dose not seem to be tracking the memberrefer

other than that everything is working fine

Bane
Sat 20th Oct '01, 6:25pm
Justice: You can exclude forums you dont wish to show by entering the forumid in the control panel. :D

dxb: Do you have the referral system turned on in vbulletin? Check this in options.

dxb
Sat 20th Oct '01, 6:45pm
yes it was turned off and i turned it on and tried sending email using the refer system but still no change in the memberrefer list

Bane
Sat 20th Oct '01, 6:53pm
dxb I just registered.. but didnt see the referrer box?

MarkB
Sat 20th Oct '01, 6:57pm
Originally posted by Bane
Justice: You can exclude forums you dont wish to show by entering the forumid in the control panel. :D

I've tried that for categories, which were showing up, but no luck... any ideas?:) Or is it a different tweak?

Still lovin' it! :p

dxb
Sat 20th Oct '01, 7:03pm
I'm sorry Bane I dont know what you mean ... where your supposed to see the reffere box do you mean the user info page

Bane
Sat 20th Oct '01, 7:15pm
MarkB: I just tried it on my forum and it works? It excludes any forumid I put in.

dxb: When a user registers, if the referrer system is on it will show a box that says [referrer] where you can put who referred you to the board. I saw no such box?

When you check referrers in your vB Admin panel does it show anything? [Users | Referrals]

dxb
Sat 20th Oct '01, 7:35pm
Silly me Bane I was trying to register while I'm logged on

anyway the conflict is cleared :) now it's working fine ...

and I love your work :)

thanks

Bane
Sat 20th Oct '01, 8:27pm
dxb: Glad it's all worked out for you man. :)

Is the new version working fine for everyone?

Delhaze
Sat 20th Oct '01, 8:51pm
I will be happy to work with you to solve the current Win2K issues. I'm a little busy right now with vbutton online but I will contact you shortly.

Bane
Sat 20th Oct '01, 8:58pm
Sounds good Del :)

DarkReaper
Sat 20th Oct '01, 9:23pm
Eh...I'm running Win2k...what are the issues?

amykhar
Sat 20th Oct '01, 10:25pm
Bane,
The control panel has the place to input excluded forums; however, nothing in the queries for the top threads and posts in vbstats.php checks for those excluded forums.

I patched mine, but I checked your zip again, and it's still not there. My hidden forums show up when I use your vbstats.zip.

Perhaps you haven't got the right vbstats.php in the zip?

Amy

Bane
Sat 20th Oct '01, 10:42pm
Amy: I just downloaded from the zip on here.. and found the line..

For your forums you dont have on line 463?
$topthread3 = mysql_query("select * from forum where allowposting <> 0 $exclude1 order by replycount DESC limit $topthreadmax");

When did you download this zip?

MarkB
Sun 21st Oct '01, 1:41am
Hiya

I just double checked mine, even made sure the forum id's were in numerical order, and they're still showing up...

If you look, 'The Hosted' (which is a category) is showing when I don't want it to - could it be because I want forums within it to show?

http://www.ultimatemetal.com/forum/vbstats.php?action=topthreads

Bane
Sun 21st Oct '01, 1:45am
I notice on the bottom yours still says vbStats 2.01, did you try the new download out? You should just have to reupload the files, but it may fix your problem.

jrwap
Sun 21st Oct '01, 1:51am
It says "vbStats 203.1 created by Bane for Talkloud.NET" for me and it is still showing the private forums. I did put the forum id's in the control panel and its still not working.
I don't know much about this, but I know that Overgrow's search engine hack correctly excludes private forums. You may want to look at that code.

Other than that, this is a great hack.

Thanks,

-JRW

Bane
Sun 21st Oct '01, 1:56am
erg.. typo for me.. if your hack says 203.1 it will *not* exclude the proper forums. Try the new download and see if you have more success. It is v.203.2

MarkB
Sun 21st Oct '01, 1:58am
Originally posted by Bane
I notice on the bottom yours still says vbStats 2.01, did you try the new download out? You should just have to reupload the files, but it may fix your problem.

I have 203.1 running (same version??), and thought I'd uploaded the latest one. I'll double check though :)

MarkB
Sun 21st Oct '01, 2:00am
Originally posted by Bane
erg.. typo for me.. if your hack says 203.1 it will *not* exclude the proper forums. Try the new download and see if you have more success. It is v.203.2

Ach so! Ok, shall double check :) Wee!

jrwap
Sun 21st Oct '01, 2:10am
Do I have to do an uninstall and then reinstall? I simply uploaded the 5 files and its still showing private forums as well as threads from private forums. This is for 203.2

Also, is there any reason why forum categories show up? I would think that categories that don't act as forums wouldn't show.

-JRW

Bane
Sun 21st Oct '01, 2:12am
I'm gonna go ahead and look at overgrows.. this was working correctly earlier and now is not. :( Give me about an hour.. sorry folks

MarkB
Sun 21st Oct '01, 2:12am
I had to uninstall and reinstall for mine to work - but one category I've 'disabled' is still showing :(

But not to matter :) It's a small niggle in an otherwise-excellent hack! :D

jrwap
Sun 21st Oct '01, 2:16am
Yeah, I had one private forum removed (was actually the category), but the actual forum still shows up along with the threads from that forum.

I'll check back tomorrow. Thanks for the support !!

-JRW

Bane
Sun 21st Oct '01, 2:22am
Originally posted by MarkB
I had to uninstall and reinstall for mine to work - but one category I've 'disabled' is still showing :(

But not to matter :) It's a small niggle in an otherwise-excellent hack! :D

Let me get this straight.. lol, yours is working except for one category?

Sukij
Sun 21st Oct '01, 3:44am
HI..

Just finish install 203.2. (New install)

1. After click on Staff : xx link, the browser shows

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

2. The Exclude Forum is not seem to work. Even I put the Forum ID, it's still show in Forum/Thread page.

Please help.

Bane
Sun 21st Oct '01, 3:47am
The staff link will only work if you have Kier's Showmods hack installed.. was fairly stupid of me to leave it in there, but there it is..

The excluded forums I am working on right now.

MarkB
Sun 21st Oct '01, 3:56am
Originally posted by Bane


Let me get this straight.. lol, yours is working except for one category?

Two categories now... VERY weird :)

Nemesis77
Sun 21st Oct '01, 4:20am
I installed this for a friend on his board. I'm testing it now by trying different browsers, but all browsers are being picked up as Internet Explorer.

I tried change the getenv to $Global is suggested in a previous post but still didn't work. ANy other Ideas

Great hack BTW. thanks

MApI
Sun 21st Oct '01, 8:21am
FANTASTIC hack, man. Works greatly, with easy and troubleless installation. Thnks !!!

Bane
Sun 21st Oct '01, 8:46am
I uploaded the newest package :D It works swell on my board. Let me know what you all think. The problem wasnt it not excluding forums but that it would only exclude the first one :(

That is fixed :) FireFly gave me a hand with it last night. It also doesnt show catagories by default now. (I hope :p)

The other thing I fixed is taking out the default link to kiers showmods hack.

Assuming this version works Im open for suggestions from here.

floleb7
Sun 21st Oct '01, 9:06am
the stats change with server date or vb settings ?

Bane
Sun 21st Oct '01, 9:16am
Server

floleb7
Sun 21st Oct '01, 9:24am
hum how i can modify this for setting in my update time ?

Bane
Sun 21st Oct '01, 9:44am
What exactly are you trying to update?

floleb7
Sun 21st Oct '01, 9:46am
hum nothing i was thinking that stats will update each 24H
little mistake :D

Lesane
Sun 21st Oct '01, 10:22am
Originally posted by Bane
Lesane: Thats Kiers showmods.php hack... I guess my way of saying everyone should have it :p
[/B]

hehe :), aight...thnx

amykhar
Sun 21st Oct '01, 10:56am
Bane,
I just grabbed the latest download :) You got it. Works great.

Amy

Cruz
Sun 21st Oct '01, 10:57am
silly me....fixed it :D

RobAC
Sun 21st Oct '01, 11:42am
Bane,

Did you add any new features to the latest update? :D

Bane
Sun 21st Oct '01, 11:52am
Mostly that the exclude Forums work properly :D

Also removed the showmods thing.

I'm taking suggestions now for 203.3 or 204.1 whichever the case may be. :p

Silviu
Sun 21st Oct '01, 12:34pm
I've edited vbstats status template to re-insert the link to Kier's ShowMods... Perhaps you should ask in the install script if this link should be inserted or not into the status page because many of us have already Kier's hack and it's not very cool to remove this link for good. :)

Suggestions:

a) Show user's posts counts for every forum category
b) Display total posts count for every forum category
c) Statistics about attachments (per user, per forum, per total)
d) Extend tops by adding aditional pages :)

All these are not quite useful in many cases, but what the heck, i'm trying right? :p

jrwap
Sun 21st Oct '01, 1:43pm
Seems to work great now.

Thanks alot,

-JRW

Scott MacVicar
Sun 21st Oct '01, 4:00pm
i just noticed that the session is not passed in any part of vbstats, this has caused problems with some of my users and they just get logged out after visiting the stats page.

Animaniac1217
Sun 21st Oct '01, 4:12pm
I compeltely rewrote the thread section so that it doesn't show threads the user does not have access to. If anyone is interested PM me and we could work something out, since it took a lot of time.

Bane
Sun 21st Oct '01, 11:00pm
Originally posted by PPN
i just noticed that the session is not passed in any part of vbstats, this has caused problems with some of my users and they just get logged out after visiting the stats page.

I will fix this in the next version PPN.. Sorry about that :(

Originally posted by Animaniac1217
I compeltely rewrote the thread section so that it doesn't show threads the user does not have access to. If anyone is interested PM me and we could work something out, since it took a lot of time.

I wasnt aware they were still showing up, if they are it should be a pretty simple fix, I'm not sure what would have taken you "a lot of time" and what something exactly are you trying to "work out"?

TheComputerGuy
Sun 21st Oct '01, 11:06pm
i got mine working

VBSTATS powered by Bane (http://www.webmafiaforums.com/vbstats.php)

BluSmurf
Sun 21st Oct '01, 11:19pm
This has got to be one of the most famous hacks ever!!! Thanx alot to Bane :p

Here's my suggestions to the next update
1) Change the detect country encoding to IP detection. That should fix the correct country listing. If it is unable to dns the IP and get the country then it should be categorize as unknown country :D (maybe set it as an option for users who want this since it might create a heavy load during peak period)

2) Hit count by unique IP and also forums impressions.

I'm still using the first version and it's working great, will update once this features are implemented ;)

Bane
Sun 21st Oct '01, 11:30pm
Computer Guy: Looks great :) Some path problems with your flag images though?

BluSmurf: What Im going to try to do for countries is allow people three choices.

1 - DNS Country Detection (no .com .net etc.. all non country are reverse - thus unknown)

2 - Encoded detection scheme (as used now, in all its flawed glory)

3 - Two tiered (Check DNS if non identified check encoding)

I will have uniques tracked in the next version, I believe, may be a few days =D

Sukij
Sun 21st Oct '01, 11:57pm
HI..

If the Forum is behind the Firewall, can it still detect the correct countries ?

I have serveral internal staff access to Forum from Singapore, Malaysia but all show in United State or United Kingdom. There is no Singapore or Malaysia shown in the statistics.

What should I do ?

DarkReaper
Sun 21st Oct '01, 11:57pm
What about the option of hiding the numbers except to admins, and only showing moderators/members the percentages?

Bane
Mon 22nd Oct '01, 12:03am
Sukij: Not sure on the firewall, but the country detection schemes are messed up anyway. In the next version I will fix this.

DarkReaper: I will look at this as well.

patvdv
Mon 22nd Oct '01, 7:13am
Bane,

If you are looking for sites to add to your vbstats page:

http://www.baanboard.com/baanboard/vbstats.php (it's Belgian :))

DarkReaper
Mon 22nd Oct '01, 4:23pm
Suggestion: In addition to logging domain referrals, log the actual pages that have the link. I get mildly frustrated when some of the referral domains are something such as "pub51.eboard.com," as that doesn't tell me a whole lot :)

amykhar
Mon 22nd Oct '01, 5:09pm
Yes, I agree that the actual page would be lovely :)

Amy

Bane
Mon 22nd Oct '01, 5:16pm
The thing I thought with this was that I didnt want it to overfill the Database, Maybe if it is a seperate table from the link queue/referrer list and only kept a defineable numer of entries I will do this.

I do like the idea though :D (http://www.talkloud.net/forums/member.php?s=&action=getinfo&userid=1)

wajones
Mon 22nd Oct '01, 5:58pm
Nice job on the vbStats Bane. Installed along with vbPortal with no problems.

DarkReaper
Mon 22nd Oct '01, 6:06pm
Well, you could do it similar to the way vBulletin forums are setup. Subforums have a pointer to their parent forum -> seperate pages on a domain have a pointer to their domain :)

Bane
Mon 22nd Oct '01, 6:14pm
Oh, its not linking I have a problem with.. lets say a forum like.. oh.. eva2000s animeboard (hehe) was to install it.. they get who knows how many referrals.. within a month they have 10k rows or more filled with it.. and the more junk in the database the slower it goes.. etc.. I will just put another table in with a referrer storage limit.

DarkReaper
Mon 22nd Oct '01, 6:15pm
Er..yea, I was just about to suggest a limit :)

When can we expect to see the new version?

Any progress on hiding the actual hit counts?

Bane
Mon 22nd Oct '01, 6:20pm
Dunno, I'm trying to take a little time on this.. dont want to have to update the file 50 times because I keep screwing them up again. :p

MarkB
Mon 22nd Oct '01, 7:09pm
I have a site that pulls news headlines from one of my forums, and they get the following error (along with the news bits):

Warning: Failed opening 'vbs_counter.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/ultimatm/public_html/forum/global2.php(235) : eval()'d code on line 11


Any way to suppress the error? :confused:

Bane
Mon 22nd Oct '01, 7:14pm
what is global2.php?

If its a second global file you use for just that purpose you can remove the include from the phpinclude template and do it in the global.php instead and you shouldnt get the error anymore?

MarkB
Mon 22nd Oct '01, 7:48pm
I actually fixed it by using the full path to vbs_counter.php (since the news page was in another directory) :)

Mark

Bane
Mon 22nd Oct '01, 7:51pm
=) Glad you got it worked out.. The new version is working well for you then?

MarkB
Mon 22nd Oct '01, 8:28pm
It's still showing forums I've requested it not to, but if you've released a newer version than what I have, that might be why... :)

JJR512
Tue 23rd Oct '01, 4:53am
In the "Exclude vbStats URL" part of what's installed into the Admin CP, I put my URL in (as "jjr512.com", no quotes), but when I check it, it once again says "domain.com". It seems this field is not saving. Any ideas?

JJR512
Tue 23rd Oct '01, 4:57am
Also, about the setting for "Date Statistics Begin" setting. The default is "952001". What is the format for this field...is it MDYYYY (Sept. 5, 2001) or DMYYYY (May 9, 2001) or something else? How would I put in October 22, 2001?

JJR512
Tue 23rd Oct '01, 5:00am
Another question. On the stats page, on the Top Posters section, how are the numbers generated? I ask because in the "Ever" part, for me it says my post count is 9873. My post count is 9553; if you click on the link of my name to see my profile, that's the number it shows. It looks like everyone's post counts are wrong.

fury
Tue 23rd Oct '01, 5:02am
Forgive me if this error has already been pointed out, but I just skimmed through the posts in this thread.

I tried installing, and got a mysql error and an internet explorer crash, so I couldn't copy down the error.

I called the script again, hit uninstall, and here's what I got:

Database error in vBulletin Control Panel: Invalid SQL: ALTER TABLE user DROP INDEX referrerid
mysql error: Can't DROP 'referrerid'. Check that column/key exists
mysql error number: 1091
Date: Tuesday 23rd of October 2001 02:55:11 AM
Script: /forum/admin/install_vbstats.php?s=&step=2
Referer: http://localhost/forum/admin/install_vbstats.php?

So then I tried to reinstall it. Here's what I got:

Database error in vBulletin Control Panel: Invalid SQL: CREATE TABLE vbstats_counter (
type varchar(80) NOT NULL,
var varchar(80) NOT NULL,
count int(10) unsigned NOT NULL
)
mysql error: Table 'vbstats_counter' already exists
mysql error number: 1050
Date: Tuesday 23rd of October 2001 02:53:02 AM
Script: /forum/admin/install_vbstats.php?s=&step=3
Referer: http://localhost/forum/admin/install_vbstats.php?

It will not go any further in the install process, so I'm pretty much stuck. The board still works, so I'm sure the database hasn't been corrupted.

Note: This is on a different board than the one in my sig.

patvdv
Tue 23rd Oct '01, 7:22am
I would have to second JJR512's remarks. The number of posts on my stats page are also wrong. vbstats is showing more than posts than the actual number????

I noticed in second instance that it is only for myself. Could this be linked to posts that have been deleted? Is vbstats showing the total number of posts ever made, regardless whether they still exist or not?

amykhar
Tue 23rd Oct '01, 8:28am
Originally posted by JJR512
In the "Exclude vbStats URL" part of what's installed into the Admin CP, I put my URL in (as "jjr512.com", no quotes), but when I check it, it once again says "domain.com". It seems this field is not saving. Any ideas?

It is saving :) Check your database. That field will allow you to enter more domains to exclude. For example, my forums have two domains. I can exclude both of them.

Amy

amykhar
Tue 23rd Oct '01, 8:29am
Originally posted by JJR512
Another question. On the stats page, on the Top Posters section, how are the numbers generated? I ask because in the "Ever" part, for me it says my post count is 9873. My post count is 9553; if you click on the link of my name to see my profile, that's the number it shows. It looks like everyone's post counts are wrong.

I believe it is looking at actual posts for a given period. Do you have some forums where posting doesn't count towards the post counts? That would cause the problem you are seeing.

Amy

amykhar
Tue 23rd Oct '01, 8:32am
Fury,
Go to phpmyadmin, and manually delete the extra tables that were created. Then, go to your control panel and manually delete the new templates. Then try to reinstall :)

Amy

Bane
Tue 23rd Oct '01, 9:15am
Originally posted by JJR512
In the "Exclude vbStats URL" part of what's installed into the Admin CP, I put my URL in (as "jjr512.com", no quotes), but when I check it, it once again says "domain.com". It seems this field is not saving. Any ideas?

This is saving, it just allows you to put in multiple domains, I really need to work on the entry method :(

Originally posted by JJR512
Also, about the setting for "Date Statistics Begin" setting. The default is "952001". What is the format for this field...is it MDYYYY (Sept. 5, 2001) or DMYYYY (May 9, 2001) or something else? How would I put in October 22, 2001?

Whatever you want it to, It is just used for a couple of "Since 09-04-2001" type things, for display only so whatever format you like.

Originally posted by JJR512
Another question. On the stats page, on the Top Posters section, how are the numbers generated? I ask because in the "Ever" part, for me it says my post count is 9873. My post count is 9553; if you click on the link of my name to see my profile, that's the number it shows. It looks like everyone's post counts are wrong.

Right now it is counting the number of posts in forums that dont increment post counts. For example if you have a testing forum where post counts dont go up with posts it will count that too.

Amy: Thanks for the help :D

amykhar
Tue 23rd Oct '01, 9:31am
Originally posted by Bane

Amy: Thanks for the help :D

What can I say? I'm a morning person. :D

Amy

GenSec
Tue 23rd Oct '01, 11:13am
There are templates for vbstats_styles :)

Bane
Tue 23rd Oct '01, 11:18am
Do you have it in use somewhere? I changed it around a bit (the code) I have mine up and running finally at http://www.talkloud.net/forums/vbstats.php?action=styles can I see yours? (http://www.talkloud.net/forums/index.php)

GenSec
Tue 23rd Oct '01, 11:31am
It's here (http://www.2x2online.com/forum/vbstats.php?action=styles) It works. And you can try any style by one click

Bane
Tue 23rd Oct '01, 11:33am
Very nice! The only thing I will change is to use the bars from the rest of vbStats. Thanks for the style :D

GenSec
Tue 23rd Oct '01, 11:44am
Originally posted by Bane
The only thing I will change is to use the bars from the rest of vbStats.
Sure you are! I also changed some codes. ;)
I added banned users
// Banned
$bannum = mysql_num_rows(mysql_query("select * from user WHERE usergroupid=39"));

And new users today $getnewusertoday=$DB_site->query_first("SELECT count(*) AS count FROM user WHERE joindate>='$tltoday'");
$newusertoday=$getnewusertoday[count];

patvdv
Tue 23rd Oct '01, 11:56am
Hi Amy,

I think the posts problem is indeed explained by forums that do not count towards the post count. Thanks for sharing that insight :)

GenSec
Tue 23rd Oct '01, 12:14pm
There is simle solution
In $topposters1.="<tr><td width=100% bgcolor=$bgcolor><smallfont><a href=\"member.php?action=getinfo&userid=$user1[userid]\">$result1[username]</a></td><td bgcolor=$bgcolor align=right nowrap><smallfont>$user1[posts] / </smallfont></td><td bgcolor=$bgcolor align=right><smallfont>$threads1</smallfont></td></tr>";

replace $user1[posts] with result1[posts]

amykhar
Tue 23rd Oct '01, 12:18pm
Something I would love to see added:

I have seen some tracking systems be able to tell what people searched for on the various search engines in order to find my site. Anyone know how to go about doing this?

Amy

Bane
Tue 23rd Oct '01, 12:29pm
Right now I am adding tracking for full URLs other than some weird issue with the vbPortal front page not logging the full URL statement and hitting everything else fine that seems to be in order.

The search engine thing will be harder. I will look at it though.

GenSec: I will change that in the new version :) Thanks for the tips! =D Also I'm going to add patvdvs site to the listing, is it ok if I add yours?

GenSec
Tue 23rd Oct '01, 12:35pm
Sure! If anyone decide to learn Russian :D

GenSec
Tue 23rd Oct '01, 12:43pm
I use the external service which provide this info.
You can try to use the stats of your hosting server

Bane
Tue 23rd Oct '01, 2:48pm
Wondering what I'm doing? hehe.. working hard on the next version.. thats what.

Some people asked for full url tracking, so I'm putting it in. For a preview go here:

http://www.talkloud.net/forums/test.php

Description Follows
http://talkloud.net/forums/images/stats/red_dot.gif - Disabled Pressing this will delete the referral
http://talkloud.net/forums/images/stats/green_dot.gif - Mouse over to get the date and time of the referral
http://talkloud.net/forums/images/stats/urlgo.gif - click here to get a group listing of the hits this site has sent you.

Listing of the URL refferer - Click here to go to the page that referred to you.
(link) - Click here to view the page they linked to!

JJR512
Tue 23rd Oct '01, 3:27pm
Originally posted by GenSec
There is simle solution
In $topposters1.="<tr><td width=100% bgcolor=$bgcolor><smallfont><a href=\"member.php?action=getinfo&userid=$user1[userid]\">$result1[username]</a></td><td bgcolor=$bgcolor align=right nowrap><smallfont>$user1[posts] / </smallfont></td><td bgcolor=$bgcolor align=right><smallfont>$threads1</smallfont></td></tr>";

replace $user1[posts] with result1[posts]

Should the replacement be result1[posts] as you said, or should it have the $ symbol, so $results1[posts]?

Also, none of my forums are set up to not count towards post totals.

CoolaShacka
Tue 23rd Oct '01, 9:50pm
Great! I love this "full url tracking" funktion. :)

Now I have some vbstats settings Requests:

1. 24h reloadblocking would be great. (1 IP should count just one time/day)
2. Including User Groups and Permissions. (not anybody should be able to see the vbstats. Just Admins, Mods, and some Usergroups)

CoolaShacka
Tue 23rd Oct '01, 9:51pm
*hicks* :D

Animaniac1217
Tue 23rd Oct '01, 11:44pm
Originally posted by Bane



I wasnt aware they were still showing up, if they are it should be a pretty simple fix, I'm not sure what would have taken you "a lot of time" and what something exactly are you trying to "work out"?

What you ahd done (in a later version, that I didn't modify) was that you allowed certain forums to be blocked. I wrote code that will only show if you have access. So if you have access you will see the forum and it's threads, if not you will not see them, and you see everything else just the same. This is for the top 10.

GenSec
Wed 24th Oct '01, 3:22am
Originally posted by JJR512


Should the replacement be result1[posts] as you said, or should it have the $ symbol, so $results1[posts]?

Also, none of my forums are set up to not count towards post totals.
It should be $results1[posts], which show the same amount of posts as vB from user's data, not from post database.

JJR512
Wed 24th Oct '01, 3:42am
Tried it, had no effect on the post counts displayed.

Bane
Wed 24th Oct '01, 4:05am
JJR512: Have you pruned threads? I'm looking at my board and it seems to be just the difference of how many posts in the test board.

Maybe try updating the counters?

GenSec
Wed 24th Oct '01, 4:06am
O, sorry. I forgot to say that above this you shoud change

$result1=$DB_site->query_first("SELECT username FROM user WHERE userid=$user1[userid]");
to
$result1=$DB_site->query_first("SELECT username,posts FROM user WHERE userid=$user1[userid]");

Bane
Wed 24th Oct '01, 4:06am
Originally posted by Animaniac1217
What you ahd done (in a later version, that I didn't modify) was that you allowed certain forums to be blocked. I wrote code that will only show if you have access. So if you have access you will see the forum and it's threads, if not you will not see them, and you see everything else just the same. This is for the top 10.

Just to be clear.. You are trying to sell a slight mod to my hack?

Bane
Wed 24th Oct '01, 4:08am
GenSec: If that works for JJR512 I will put it in the next release :p btw, your link in your sig doesnt work?

JJR512
Wed 24th Oct '01, 4:13am
Originally posted by Bane
JJR512: Have you pruned threads? I'm looking at my board and it seems to be just the difference of how many posts in the test board.

Maybe try updating the counters?
Nope, I've never pruned. Updating counters didn't do anything; in fact, I even ran a script provided by someone else here a while ago that updates every member's post count with the actual number of posts on record for that member in the database. Sometimes the post count record does get a bit off. My post count came out to be the same thing, though.

Originally posted by GenSec
O, sorry. I forgot to say that above this you shoud change

$result1=$DB_site->query_first("SELECT username FROM user WHERE userid=$user1[userid]");
to
$result1=$DB_site->query_first("SELECT username,posts FROM user WHERE userid=$user1[userid]");

OK, I did that and now my correct post count is displayed. So thanks! But there is still one problem left: I am at the top of the list, but the second person has more posts than I do.

GenSec
Wed 24th Oct '01, 4:17am
Originally posted by Bane
GenSec: your link in your sig doesnt work?
It's common vB problem. Double http://
:)

GenSec
Wed 24th Oct '01, 4:53am
Originally posted by JJR512

But there is still one problem left: I am at the top of the list, but the second person has more posts than I do.
Frankly, I like to have 2 type stats:
based on all posts & based on user counted posts
But if you prefer the last one
change in topposters to $toppost1=$DB_site->query("SELECT *
FROM user
ORDER BY posts DESC
LIMIT $toppostmax");
$bgcolor="{firstaltcolor}";
while ($user1=$DB_site->fetch_array($toppost1)) {
$result_1=$DB_site->query_first("SELECT COUNT(*) AS threads
FROM thread WHERE postuserid=$user1[userid]");
$threads1=$result_1['threads'];
$topposters1.="<tr><td width=100% bgcolor=$bgcolor><smallfont><a href=\"member.php?action=getinfo&userid=$user1[userid]\">$user1[username]</a></td><td bgcolor=$bgcolor align=right nowrap><smallfont>$user1[posts] / </smallfont></td><td bgcolor=$bgcolor align=right><smallfont>$threads1</smallfont></td></tr>";
if ($bgcolor=="{firstaltcolor}") {
$bgcolor="{secondaltcolor}";
} else {
$bgcolor="{firstaltcolor}";
}
}

GenSec
Wed 24th Oct '01, 5:00am
Btw this code will count not only posts, but also the threads;)

epi
Wed 24th Oct '01, 10:14am
i am new to the vbulliten community and i need some help
i followed the instructions on how to install this hack but it does not show up on my we page.

1. where do i put the code so their is a link to the stats under the view new posts link, and what is the code

2. where do i add websites to exclude from the count

please be specific

Bane
Wed 24th Oct '01, 12:36pm
Let me answer number 2 first. If you made the changes to the vb Admin CP you click Exclude vbStats URL in your admin CP. If not set your browser to view http://yourdomain.com/forums/admin/vbstats_set.php?action=add

A screen will come up with Add New Excluded URL simply place the domain you wish to exclude in the text entry box. repeat as needed.

As for where to link it on your site, that is a matter of taste. As an example you could open your forumhome template and find You last visited: $bbuserinfo[lastvisitdate].and change it to You last visited: $bbuserinfo[lastvisitdate].<br>
<a href="vbstats.php">View Forum Statistics</a>

epi
Wed 24th Oct '01, 1:06pm
thanks a lot that worked great.
another question can you make it display different version of windows instead of all the other operating systems.

DarkReaper
Wed 24th Oct '01, 4:23pm
What features will the new version contain, and when do you think it'll be released?

Bane
Thu 25th Oct '01, 10:17am
Hopefully we can see a new version this weekend. For now the only set items for inclusion are:

- GenSecs code fix for top posters
- added fullreferrer logging to the counter (lines 146-153 vbs_counter.php)
- Added Popular Styles! (Thanks ztsky!)
- Sessionhash problems should be fixed
- Some Code Cleaning

I am looking to add some other things (Im still looking at your idea for admin only number viewing) but I just got a time limited contract so I have to pay the bills first.

GenSec
Thu 25th Oct '01, 3:37pm
I added to vbstats a small addition which creates flag for every user.
It' very simple and takes only 5 min to install

Si9naL-9
Thu 25th Oct '01, 5:31pm
Maybe you gurus, can help me...

I installed this brilliant hack for stats.. had it running perfectly..

went to bed.. woke up to this...

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/forums/vbstats.php on line 283

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/forums/vbstats.php on line 284

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/forums/vbstats.php on line 285

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/forums/vbstats.php on line 287

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/forums/vbstats.php on line 288
Table 'zeropingforums.nuke_links_links' doesn't exist






Does this mean anything to anyone???


Many thanks ...

dxb
Thu 25th Oct '01, 9:45pm
a funny problem

everything is fine with the stats page except one thing

the last 24 hours

new threads

I noticed this on the test forum and the main forum too

and the image that I attached is for the test forum and I'm the only person who posts anything in that forum so the number of new threads is 1000% wrong :)

Bane
Thu 25th Oct '01, 11:05pm
Originally posted by Si9naL-9
Does this mean anything to anyone???

j00 have no vbPortal installed methinks

Bane
Thu 25th Oct '01, 11:06pm
Originally posted by dxb
new threads
My you post a lot!

glenn001
Thu 25th Oct '01, 11:57pm
Running php3 and have modified the files appropriately and the installation was successful, even checked all the files to make sure. However when browsing to the forum home page I get the following error...

Call to unsupported or undefined function array_reverse() in ./vbs_counter.php3 on line 53

Have also called the include function for vbs_counter.php3

Anyone have any ideas? If php3 is unsupported is there an equivalent install script for this hack?

Thanks!

glenn001
Fri 26th Oct '01, 12:30am
Originally posted by glenn001
Running php3 and have modified the files appropriately and the installation was successful, even checked all the files to make sure. However when browsing to the forum home page I get the following error...

Call to unsupported or undefined function array_reverse() in ./vbs_counter.php3 on line 53

Have also called the include function for vbs_counter.php3

Anyone have any ideas? If php3 is unsupported is there an equivalent install script for this hack?

Thanks!

Actually I have found the solution. If anyone else is running php3 and has this problem you can replace the function,

array_reverse($rhost);

with,

for (end($rhost); $key = key($rhost); prev($rhost) ) {
$value = $rhost[$key];
}


Awesome hack :D

Sarge
Fri 26th Oct '01, 1:06am
This hack works great for me. Easy install

JJR512
Fri 26th Oct '01, 1:15am
I noticed earlier an odd conflict with another of ethank's hacks, the subforums hack that shows a linked list of any subforums a forum has under the description for the parent forum.

In a category view, any forums with subforums shows the linked list twice, like here (http://forums.jjr512.com/forumdisplay.php?s=&forumid=19). Note the first forum you see there, Mindless Blabbering, has one subforum named Stupid Jokes, but "Sub-forums: Stupid Jokes" appears twice, the second below the first.

This didn't happen prior to installing this mark individual forum read hack.

dxb
Fri 26th Oct '01, 7:50pm
hey come on Bane ...I didnt post anything in that forum for more than one month

anyway this what I tried doing I updated the counters ---> nothing happened

my forum was imported from UBB and as i remember the number of threads at that time it was close to 5000

anyway this is what I did to solve the problem

i changed this code in vbstats.php

$threadstoday=$getthreadstoday[count];

to this

$threadstoday=$getthreadstoday[count] - 5572;

yes the problem is solved but I dont think thats the best solution :) for it


=====================

one more thing whats with the license statment at the bottom of the vbulletin board it says

Powered by: vBulletin Version 2.something ;-)

dose that mean that they are getting ready to release 2.0.4

Bane
Fri 26th Oct '01, 9:22pm
DXB: I'll look at that problem.. its odd though.. it tacks that number on everyday? You cant be the only person whos installed the hack that converted from UBB so I'm hoping someone else can tell me if they are having the same problem.

I'm sorry if the support for this has been a little shady. Most of the PHP/MySQL I know I learned from doing this, so it was mostly trial and error putting it together. I'm trying my best to get it all sorted and add the new features everyone is requesting (thanks for the emails and PMs btw :)) but you will have to forgive me if I am a bit slow.

Another thing I've noticed since writing this hack is Im appearing on a lot of peoples "IM him if my vb screws up" lists. And Im usually too nice to say no :( Hard to keep up with everything

Freddie said in a couple days on 2.0.4 methinks?

MarkB
Fri 26th Oct '01, 9:49pm
I'm looking forward to the next version of vbStats, Bane :) I appreciate all the work you're putting into it!

dxb
Fri 26th Oct '01, 9:58pm
thanks for the answer Bane and hey your doing an excellent job here

thanks for everything :)