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)

ap0c 04-20-2003 01:23 AM

nice Bane, thanks

irn-bru 04-20-2003 02:56 PM

I installed this hack a long time ago.

2 questions.

Is it wise to have vbstats.php?action=phpinfo
I mean anyone can check your phpinfo is this
unsafe or Iam I just paraniod :confused:

Also O when O when can we have a update please
this hack is so great and I love it. I am looking for
the style and myinfo to be updated and all the the
other neat stuff at the makers vb board..hehe.

Jacko 04-23-2003 08:43 AM

working great on a 2.2.9 modified board:

http://www.realmods.net/forum/vbstat...ction=stats&s=

Jacko 04-23-2003 09:24 AM

ok i ventured into adding some stats onto my forumhome template and this is what i added to my "index.php" file:

Quote:

// BEGIN vbStats Hack [230.01]
// Active/Non?
$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
$totalposts=$countposts['posts'];
if ($totalposts=='') { $totalposts=0; }
$totalthreads=$countthreads['threads'];
if ($totalthreads=='') { $totalthreads=0; }

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

eval("$vbstats = "".gettemplate('vbstats_forumhome')."";");
// END vbStats Hack [230.01]
then i added the following to my forumhome template:

Quote:

Active Members: $activemembers
Activity Level: $activityrate%

Total Threads: $totalthreads
Total Posts: $totalposts
Posts Today: $poststoday

Staff Members: $anum
and this is the end result:
http://www.realmods.net/stats.gif

as you can see my active users is wrong and my percentage too. my total posts and posts today are also wrong.

what have i added wrong and how can i fix this??

Cheers :cheeky:

MuSuL 04-29-2003 12:38 AM

Can this hack give me something like 5 top posters for the month and how many posts they made?

BrokenLinux 05-01-2003 04:17 PM

heh, i just read thru 75 pages and couldn't find this :P

anyways, i want to say this is an awesome hack but i have one question

Is there anyway that only the administrator can view vbstats.php?

cnczone 05-11-2003 11:35 PM

I did the add to index page, but where is a link, what am I suppose to see?

Weasel 05-13-2003 03:39 AM

Why is my active users a negative number?

http://www.almostsmart.com/forums/vbstats.php?s=

monstergamer 05-13-2003 04:22 AM

and why is Activity Level: -37600.00% so high lol

Weasel 05-13-2003 06:15 AM

I went through the code and found that he is trying to do math operations on variables that have been number_formatted, so this error occurs when the number of registered users goes above 1000 and a comma is put into the number to represent the thousands place.

To fix find this:

PHP Code:

    // 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));

    
// Newest Member 

and REPLACE with this:

PHP 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));
    
$numbermembers number_format($numbermembers);
   
$nonposters number_format($nonposters);
   
$activemembers number_format($activemembers);

    
// Newest Member 


cnczone 05-13-2003 03:07 PM

Quote:

Today at 08:15 AM Weasel said this in Post #1130
I went through the code and found that he is trying to do math operations on variables that have been number_formatted, so this error occurs when the number of registered users goes above 1000 and a comma is put into the number to represent the thousands place.

To fix find this:

PHP Code:

    // 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));

    
// Newest Member 

and REPLACE with this:

PHP 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));
    
$numbermembers number_format($numbermembers);
   
$nonposters number_format($nonposters);
   
$activemembers number_format($activemembers);

    
// Newest Member 



What php file is this in?

Larry Sanders 05-14-2003 06:53 PM

The above code is in vbstats.php.

~~~~~~~~~~~~~~

On another note, I have had v2.0.3 installed for a long time on my site. I just upgraded to v2.3. All seems well but I keep getting:

Parse error: parse error in /usr/local/etc/httpd/htdocs/Forums/global.php(313) : eval()'d code on line 6

at the top of each page. FreeBSD server - pretty standard setup without many 'hacks'.

The error disappears when I take --> include("./vbs_counter.php); <-- out of my phpinclude template.

I looked at line 6 of global.php and it reads --< $explain = 1; <---

Anyone know what the 1 is or what's happening?

http://Elsmar.com/Forums/

Any thoughts appreciated.

zajako 05-17-2003 05:06 PM

id like to get my hands on the server stats and all the other ones on talk aloud that do not come normaly.

Floris 05-18-2003 02:29 AM

When can we expect a new version for vbulletin 2.3.0 ?

NinjaBelly 05-25-2003 12:30 AM

When I add this hack it works fine in my forums but then on my vbHome lite it generates these code errors on the top of the page:

Warning: Unknown(./vbs_counter.php): failed to create stream: No such file or directory in /home/hilaryfn/public_html/global.php(929) : eval()'d code on line 6

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

Any ideas? Thanks.

ogden2k 05-26-2003 12:52 PM

Quote:

05-24-03 at 09:30 PM NinjaBelly said this in Post #1135
When I add this hack it works fine in my forums but then on my vbHome lite it generates these code errors on the top of the page:

Warning: Unknown(./vbs_counter.php): failed to create stream: No such file or directory in /home/hilaryfn/public_html/global.php(929) : eval()'d code on line 6

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

Any ideas? Thanks.

Same here...

Also, I don't like when you load a new page, it adds another count to the user's browser / OS in the stats... Shouldnt it count this per IP session?

Bane 05-26-2003 01:10 PM

for the problem with vbhome you may have to take the counter out of the phpinclude template and put it in your global.php.

ogden2k 05-26-2003 01:21 PM

Ok, can you be more specific?

Mrpolish 05-27-2003 03:04 PM

Can you include top 5 posters on you forumhome template ?

hashesh 05-29-2003 11:28 PM

I cant get the exculde userid to actually exclude.. any thoughts?

Theutus 06-11-2003 10:21 AM

I just added a copy of vbs_counter.php to my home directory. So i have a copy in home, and in /forum. I don't have any problems with it now, and it got rid of the errors.

Also, it doesn't count stuff twice when someone hits your forum, cause if they got the link to the homepage, the link to the forum is coming from your site, and your site is probably disabled as a referral.

Anybody think it's a bad idea to do it this way? Cause it worked like a charm for me. :)

97cobracpe 06-23-2003 07:16 PM

Worked like a charm! I put vbs_counter in my home directory so I wouldn't get errors on the vbHome pages. Excellent hack!

/me clicks install

voclain 06-24-2003 05:52 PM

I've read through the pages....can't decide on what I'm reading here....DOSE it work with VB 2.3.0??? or does it NOT work????

HELP????

Kirk

cnczone 06-24-2003 06:43 PM

YES is works with 2.3 look at my site http://cnczone.com and goto
site stats page.

monstergamer 06-24-2003 07:20 PM

Quote:

Today at 02:52 PM voclain said this in Post #1143
I've read through the pages....can't decide on what I'm reading here....DOSE it work with VB 2.3.0??? or does it NOT work????

HELP????

Kirk

yes running it on 2.3 my self.
the link www.monstergamer.net/vb/vbstats.php

[Fx]AssAssiN 06-26-2003 12:49 AM

nice hack!
Working perfectly.

mars 06-27-2003 06:23 AM

Ok, after managing to get through all the pages in this thread (pheww....) I'm still non the wiser.
I've seen mention of this but no real details, does anybody know how I can get the full URL of incoming referring sites as there's a few things now & again I wouldn't mind tracking back :)

On another note what's with this 'yourpaysite' that keeps showing up in a lot of peoples stats ? I ended up just adding it to my exclude list. :paranoid:

Cheerz :)

Kamui Shirou 06-30-2003 01:12 PM

<a href="http://www.talkloud.net/forums/vbstats.php?action=info" target="_blank">http://www.talkloud.net/forums/vbstats.php?action=info</a>

there are so many additional functions. do anyone know where to get they from? the style stats are pretty cool

irn-bru 06-30-2003 03:43 PM

Quote:

Today at 03:12 PM Kamui Shirou said this in Post #1148
http://www.talkloud.net/forums/vbstats.php?action=info

there are so many additional functions. do anyone know where to get they from? the style stats are pretty cool

The coder is still working on these additional functions. I am sure
they will be comeing soon, he has posted in this thread somewere if you can find it in the 77 pages !!!

All I know of is this,

http://www.mangaboard.com/forums/vbs...hp?action=info

J-J 07-02-2003 08:32 PM

Quote:

06-23-03 at 09:16 PM 97cobracpe said this in Post #1142
Worked like a charm! I put vbs_counter in my home directory so I wouldn't get errors on the vbHome pages. Excellent hack!

* 97cobracpe clicks install

Can you pls tell me how you did that?
I still get the error on the vbhome page.

thx

cnczone 07-11-2003 03:31 PM

HELP, my stats page has been working great and then I went to turn off the Use vbPortal Weblinks Additions? and then I get this
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cnczone/public_html/vbstats.php on line 353

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cnczone/public_html/vbstats.php on line 354

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cnczone/public_html/vbstats.php on line 355

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cnczone/public_html/vbstats.php on line 357

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/cnczone/public_html/vbstats.php on line 358
Table 'cnczone_cnczoneforum.nuke_links_links' doesn't exist

Host Directory 07-14-2003 05:00 PM

Does anyone know how to add the other options available in the demo version - http://www.talkloud.net/forums/vbstats.php ( [Stats] [Referring Sites] [User Styles]
[Posters] [Forums/Threads] [Attachments] [Recruiters]
[Browser/OS] [Display] [Time Zones] [Regions]
[Errors] [Your Info] [Search] )?

I would really like to add the time zones and the other options.

Also does anyone know how to place the the referring urls box on my forum homepage and add a statistics link to the page?

Currently there seems no way for my visitors to reach the stats page.

Thanks for any help in advance.

Host Directory 07-15-2003 04:33 PM

Quote:

11-18-01 at 10:51 PM Bane said this in Post #341
I put up a new zip with that removed.. kindof a stupid mistake on my part since I took out the top referrer bit in the display. It didnt come up on the test board since I never turned on the referrer system.

Please note, If you want to add the top referrer to your front page you can add the following code..

PHP Code:

// Set this to ids you dont want counted, seperated by , 0 for none
$norefer1="0";

// Top Referrer
    
if ($usereferrer) {
        
$topref $DB_site->query_first("SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
                        LEFT JOIN user ON (users.referrerid = user.userid)
                        WHERE users.referrerid <> 0 AND
                        user.userid NOT IN (
$norefer1)
                        GROUP BY users.referrerid
                        ORDER BY referrals DESC
                        LIMIT 1"
);
    
$tl_refid $topref[userid];
    
$tl_refname $topref[username];
    
$tl_refnum $topref[referrals];


And in your vbstats_forumhome template add:

Code:

<smallfont>Top Referrer: <b><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$tl_refid">$tl_refname</a></b> (<smallfont color="$tl_color1">$tl_refnum referrals!</smallfont>)
&nbsp;[<a href="vbstats.php?s=$session[sessionhash]&action=memberrefer">Full List</a>] &nbsp; [ <a href="misc.php?s=$session[sessionhash]&action=faq&page=2#referrals">Help</a> ]</smallfont>


This is not fully tested as Im about to go to lunch but it should work dandy. The non referrer top stats is in the zip sorry about the messup.



I don't really understand what i am supposed to be with the above code, i did download the zip file and have uploaded to my site and added the template, but there still is no stats on my homepage - www.hostcompanies.com/forums

Have i missed something?

Any help really really appreciated.

Host Directory 07-19-2003 11:15 PM

I am having an awful lot of trouble trying to work out addon forumhome hack which is downloaded from here - https://vborg.vbsupport.ru/showthrea...06#post201406.

I have done exactly as the instructions have stated but nothing has changed on my homepage.

I noticed that others have had this problem,

First - https://vborg.vbsupport.ru/showthrea...821#post213821

Now the solution mentioned here is something about changing
PHP Code:

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

Something about the 'external' name of this 'bit' was actually $vbstats and not $vbstats_forumhome as I tried to insert before into forumhome template

I tryed changing the above code to
PHP Code:

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

Still nothing changed on my forum homepage.

So i began my search again and i found this,

Second - https://vborg.vbsupport.ru/showthrea...465#post232465

Bane mentioned something about adding $vbstats in the forumhome template?

I really dont understand.... :(

Could someone help me.... id really really appreciated it, i have spent hours going through the posts 1 by 1 and after about 60 and racking my brain to try to understand the solution i am near to giving up.

Can anyone help ...?

Problem Fixed, for anyone wishing to display the stats on their homepage this is what you do - in clear instructions

1) Goto this post and download the attachment ( addon forumhome.zip ) - https://vborg.vbsupport.ru/showthrea...06#post201406.

2) Inside the instructions, you must add some code to your index.php file. Add the code and now search for - // Today [FireFly]

Just after that code insert
PHP Code:

$tltoday=time()-(86400); 

( if you dont, it means your 24 stats on your homepage wont work properly.

3) Follow the instructions in the attachment and make the template vbstats_forumhome with the code provided.

4) Now here comes the confusing part - it also was not mentioned in the instructions - Find the template forumhome ( under the Forum Home Page Templates catagory ) . At this point it is important to point out that forumhome is NOT the same template as the one you just made in the instructions.

5) In the forumhome template add $vbstats where you want your stats to appear on your forum homepage. For people not familiar with php code, some good advice is to find $birthdaybits and add $vbstats below this.

6) Now go to your forum and you can see how the stats have been added. Even for people that do not know php code, you should be able to work out how to change where the stats appear by going back to the forumhome template and changing the location of $vbstats

7) Be pleased you did not spent 20 hours plus working this out like i did

:ogre:

kristiesks 07-20-2003 04:24 AM

Hopefully someone can help me. I DLed the stuff, read the install readme and followed all the directions. Up until Step 7 I had no problems at all, and I did successfully finish & upload all file hacks.

What happened with step 7 is that although I DID follow the directions and added

include("./vbs_counter.php"); to my phpincludes template, so that my template looks like this:

// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
include("./vbs_counter.php");

when I click "view vb stats" in my control panel I get this message:

vbStats Error!
Be sure to add this line to your phpinclude template:

include("./vbs_counter.php");

you can find you phpinclude template in your vbulletin
admin panel and in the menu templates click |edit| you
should click on the set you wish to edit and scroll down
until you see the name: phpinclude

Your template should look something like this:

// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
include("./vbs_counter.php");
__________________________________________________ _

I don't know what to do. I've triple checked to make sure that I added that line, and my phpincludes template looks EXACTLY like what the error page says it should. The vbstats config and the exclude URL pages work perfectly.

I read through the first 17 pages of this thread looking to see if any other users experienced this same problem but I didn't find any, sorry if I overlooked something and am asking this question again.

Hope someone can help, thanks! :)

Host Directory 07-20-2003 10:54 PM

Does anyone know how i may get the Link Queue to appear on my homepage?

I have already installed the addon forumhome hack, i would like to have the Link Queue appear in my forum homepage along with the other vbstats statistics - http://www.hostcompanies.com/forums/

Does anyone know how to do this?

bolynn 07-21-2003 05:53 AM

I have some broken images on the vbstats.php page....Im not sure why...

its under browsers:

and

Operating system:

Besides that the hack worked fine...I dont think im going to use it, but I wanted to play with it on my test site..

thanks in advance for help on images problem..

Buczilla 07-26-2003 03:27 AM

Thanks a lot Bane... this really helps!

ev0lute 07-26-2003 05:17 PM

call to undefined

ev0lute 07-26-2003 05:29 PM

sorry about my last reply, i had an error that said, called to undefined function adminlog()


All times are GMT. The time now is 02:09 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.02646 seconds
  • Memory Usage 1,887KB
  • 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
  • (1)bbcode_code_printable
  • (8)bbcode_php_printable
  • (8)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