vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbStats (https://vborg.vbsupport.ru/showthread.php?t=30751)

Bane 02-10-2003 01:13 PM

We already included it :)

BigCheeze 02-10-2003 02:30 PM

Quote:

Originally posted by Bane


1) % of users that have posted. And yes its loopy.
2) Any you like, its not really used atm save for the countries section.

LOL! Ok thanks! Great hack anyways though! :D

Is there anyway to make the VBStats.php display page display the left column from VBPortal? I have linked the VBStats as my main stats now, and it is just a little disorienting I think (not enough to make me think about not using it though :D).

Thanks again!!

Bane 02-10-2003 11:49 PM

I've honestly forgotten how vbPortal works. :( I'm sure it could be done however.

KuraFire 02-11-2003 11:37 AM

ah, okay :)

KuraFire 02-12-2003 01:35 PM

Quote:

Originally posted by Bane
We already included it :)

Have you also included my code optimization for the Top Posters section, btw?

Did I ever give that to you?

Cos it now uses only 3 queries to list the top-all, top last month and top last 24h posters, instead of the 45 that your original vBStats code used.....

gameplanetz 02-12-2003 03:59 PM

Quote:

Originally posted by KuraFire



Have you also included my code optimization for the Top Posters section, btw?

Did I ever give that to you?

Cos it now uses only 3 queries to list the top-all, top last month and top last 24h posters, instead of the 45 that your original vBStats code used.....

care to share? :)

Bane 02-12-2003 06:23 PM

I dont think you did. Feel free to send it to my email if yous still have it. Im pretty sure we redid that section but never know heh.

KuraFire 02-13-2003 09:01 AM

Quote:

Originally posted by gameplanetz


care to share? :)

Sure:

https://vborg.vbsupport.ru/showthrea...threadid=48869

gameplanetz 02-13-2003 01:19 PM

Quote:

Originally posted by KuraFire


Sure:

https://vborg.vbsupport.ru/showthrea...threadid=48869

wouw thanks Kura :)

KuraFire 02-14-2003 10:00 AM

you're welcome ^_^

OpalCat 02-14-2003 02:33 PM

Is the file in the original post the current version?

Bane 02-15-2003 04:25 AM

I am upgrading the file for the 2.3.0 release now. Expect it to be done tonight/this morning.

Bane 02-15-2003 04:27 AM

Quote:

Originally posted by Hwulex
Bane: Quick note mate. If you look at the countries on your own vbStats, you've got United Kingdom twice! :s


Not my fault :) Thats because UK has 2 seperate lang encoding types:

GB and UK

I didnt pick either :p

Floris 02-15-2003 11:32 AM

Installed on 2.2.9 again
and works great.

limey 02-15-2003 03:45 PM

PHP Code:

// BEGIN vbStats Hack [230.01]
// Active/Non?
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=$snonposters['users'];
$activemembers=$numbermembers-$nonposters;
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));

// Staff
$anum mysql_num_rows(mysql_query("select * from user WHERE usergroupid=5 or usergroupid=6 or usergroupid=7"));

// Total
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=$countposts['posts'];
if (
$totalposts=='') { $totalposts=0; }
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=$countthreads['threads'];
if (
$totalthreads=='') { $totalthreads=0; }

// Today [FireFly]
$tltoday=time()-(86400);
$getpoststoday=$DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline>='$tltoday'");
$poststoday=$getpoststoday[count];
$getthreadstoday=$DB_site->query_first("SELECT count(*) AS count FROM thread WHERE dateline>='$tltoday'");
$threadstoday=$getthreadstoday[count];

// Views
$boardviews $DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread");
$totalviews number_format($boardviews[threadviews]);

eval(
"$vbstats = "".gettemplate('vbstats_forumhome')."";");
// END vbStats Hack [230.01] 

I get parse errors with this code bit.

Bane 02-15-2003 03:48 PM

I would have to see the parse errors :( I didnt mean to keep this in the install actually, it was something for someone else. But we might as well fix it.

Bane 02-15-2003 03:53 PM

Quote:

Originally posted by limey
PHP Code:

eval("$vbstats = "".gettemplate('vbstats_forumhome')."";"); 



should be:

PHP Code:

eval("\$vbstats = \"".gettemplate('vbstats_forumhome')."\";"); 


limey 02-15-2003 04:45 PM

ooo that code adss 7 queries..no thnx :)

that fixed the parse errors though and it works...i took it out tho.

Bane 02-17-2003 07:51 PM

Guess we will see after 2.3.0 if this release is as painless as it seems :p

smestas 02-19-2003 08:28 AM

I have the stats running fine but I am having problems blocking the following refer address from "stats_set.php" this is the error?

Any help will be appreciated!

-----------------------------------------------
Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: UPDATE vbstats_options SET startdate='952001',exforum='0',statloc='images/stats',flagloc='images/flags',useflags=1,useonnow=1,usequeue=1,usevbp=0,u sevbpl=0,refermax=30,queuemax=10,toppostmax=10,top threadmax=10,recruitmax=20,incbar1=10,incbar2=20,i ncbar3=50,incbar4=100,incbar5=200,incbar6=500,nore fer1=alfabb.com,norefer2=alfabb.com,color1='black' ,color2='red',color3='blue',color4='blue',acolor=' Red',scolor='Teal',mocolor='Green',mecolor='Blue', ucolor='Grey'
mysql error: Unknown table 'alfabb' in field list

mysql error number: 1109

Date: Wednesday 19th of February 2003 02:26:07 AM
Script: http://www.alfabb.com/bb/forums/bb/f...bstats_set.php
Referer: http://www.alfabb.com/bb/forums/admin/vbstats_set.php
-------------------------------------------------

peanut666 02-19-2003 01:08 PM

cheers man i installed this hack went like a dream
was so glad as im a complete newbie

one question how would i add a link to it from my forum

PennylessZ28 02-19-2003 03:18 PM

Quote:

Originally posted by Bane
[B]DEAR GOD CHECK THE SECOND POST OF THIS THREAD BEFORE YOU ASK A QUESTION!!!!
ROFLMAO, I know its not topic related, but that has to be the funniest thing I've read on this forum all day.

:laugh: How do I install this?

:tired: nah j/k, excellent work man, I really enjoy this.

TheComputerGuy 02-20-2003 12:01 AM

I installed Teck's VBHomeLite...and I have this hack installed prior. I get this error

Warning: Failed opening 'vbs_counter.php' for inclusion (include_path='') in /home/runaked/public_html/global.php(746) : eval()'d code on line 6

The only thing on line 6 is "error_reporting(7);"

SHould I be asking you or Teck?

monstergamer 02-20-2003 07:05 AM

i really like this mod :)
thanx

PennylessZ28 02-21-2003 11:25 AM

I've been reading this thread for the later half of the day. I don't see my problem truely adsressed.

I installed this fresh on a hacked version of vbulletin 2.3.0

It works fine for the most part http://www.hr3rdgen.org/forum/vbstats.php

Here are my questions, I made it to page 66. I read your faq I even clicked the link so yes, I downloaded the file, I read through it, Nope, way off target.

I would like to call the stats up on other pages besides stats.php.

IE: On my forumhome for example.

Also is it possible to run stats.php from outside my root dir.

Could I then call up say Members Stats and Thread Stats on an vbindex page?

Lay on the line. I saw your post on how to display it on the main page, well that doesn't display anything. I didn't see anything showing me how to call up the information

I'm looking for an $whatever

So am I restricted to the STATS.php page or can I call up certain things on different pages?
:banana:

Bane 02-21-2003 06:29 PM

I talked to TECK a while back asking him about any incompatibilities with vbhome. I know it can work with vbhome but I believe its the phpinclude section giving it trouble. You might try calling the counter from inside global.php instead of phpinclude.

HR3dGen - meh. Ok, the problem with installing it on the vb forum page is it adds *7* queries to that page. Maybe you should wait on that just a bit. What sections were you wanting on other pages?

paratek 02-22-2003 03:02 PM

Quick question, do you allow your users to see the stats? I have installed vbstats and i can view the stats no prob, however i do not see any link to the stats out side of the admin control panel.

Is this something i need to put in myself?

Dave

Hellburn 02-22-2003 05:59 PM

Hi,

i have updated vbStats to the currently version. Now at "Member Stats:" he show me "Active: 2" always, bevor i update it was working perfectly. I have a great board and much posters. Active user 2 is not correctly.

Member Stats completly:

Member Stats:
Members: 3,764 | Staff: 13 | Active: 2 | Non-Active: 1,954 | Activity Level: 66.67%

i have installed the update yesterday. thanks for help

Hellburn

Kamui Shirou 02-26-2003 03:31 PM

great hack. but where can i find the user styles addon?

Almax 02-27-2003 02:37 PM

Installed no probs on 2.29 thanx
1 question tho how do i make vbstats viewable ONLY by admin & mods ?

Bane 02-27-2003 11:05 PM

Almax - I will add a switch for this in the next version.

Kamui - This will also come in the next version, though the code should be functional now.

Hellburn - this Im not sure why its happening for you. Since that code shouldnt have been changed at all.

paratek - Yes I do dave, if you go to http://www.talkloud.net/ you will notice there is a link from the left menu to the stats. This could however go in wherever you want it to be. Maybe in the next versions documentation I will add this in.

sabret00the 02-28-2003 08:02 AM

when will the next version be getting released ;)

Hellburn 02-28-2003 09:35 AM

@Bane When i change this:

Quote:

// How Many?
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);

// Active/Non?
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=number_format($snonposters['users']);
$activemembers=number_format($numbermembers-$nonposters);
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));
with this:

Quote:

// How Many?
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=$numbersmembers['users'];

// Active/Non?
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=$snonposters['users'];
$activemembers=$numbermembers-$nonposters;
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));
it is working perfectly. I think the problem is "number_format".

amykhar 03-01-2003 02:17 AM

Bane, I did a clean install on 2.2.9 and active is not working for me either. I'll poke around with it a bit and see what I can find.

amykhar 03-01-2003 02:26 AM

Fixed.

in vbstats.php find:

Code:

// ########## Member Stats
        // How Many?
        $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
        $numbermembers=number_format($numbersmembers['users']);

        // Active/Non?
        $snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
        $nonposters=number_format($snonposters['users']);
        $activemembers=number_format($numbermembers-$nonposters);
        $activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));

replace with:
Code:

        // How Many?
        $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
        $numbermembers=$numbersmembers['users'];

        // Active/Non?
        $snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
        $nonposters=$snonposters['users'];
        $activemembers=$numbermembers-$nonposters;
        $activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));


Bane 03-01-2003 08:41 AM

Fixed in the zip in the first post, thanks amy & hellburn.

The change made was.

Find:
Code:

// ########## Member Stats
        // How Many?
        $numbersmembers=$DB_site->query_first('SELECT count(*) AS users,max(userid) AS max FROM user');
        $numbermembers=number_format($numbersmembers['users']);

        // Active/Non?
        $snonposters=$DB_site->query_first('SELECT count(*) AS users,max(userid) AS max FROM user WHERE posts=0');
        $nonposters=number_format($snonposters['users']);
        $activemembers=number_format($numbermembers-$nonposters);
        $activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));


Replace with:
Code:

// ########## Member Stats
        // How Many?
        $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
        $numbermembers=$numbersmembers['users'];

        // Active/Non?
        $snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
        $nonposters=$snonposters['users'];
        $activemembers=$numbermembers-$nonposters;
        $activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));
       
        // Equate [Added Post 230.b to resolve Active Users issues]
        $activemembers=number_format($activemembers);
        $nonposters=number_format($nonposters);
        $numbermembers=number_format($numbermembers);


Hellburn 03-01-2003 09:40 AM

Working fine.

monstergamer 03-01-2003 10:29 PM

works fine for me :)
http://www.monstergamer.net/vb/vbstats.php
come sign up if you like

Xyphen 03-03-2003 02:00 PM

Works Perefectly Fine on vB2.3.0!! Great Work Bane :)

Bane 03-04-2003 09:03 AM

Has anyone had any troubles getting this to work with vbHome?


All times are GMT. The time now is 09:24 AM.

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.02128 seconds
  • Memory Usage 1,849KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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