Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Bane Bane is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 10-18-2001 Last Update: Never Installs: 335
 
No support by the author.

For vBulletin version: 2.3.x
Files added: vbs_counter.php, vbstats.php, vbstats_admin.php, vbstats_set.php
Files to edit: None! (all hacking is optional)
Current Version: 230.b (02.14.03 - 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/vbsta...ction=incoming
Member Referrals
http://www.talkloud.net/forums/vbsta...on=memberrefer
Top Posters
http://www.talkloud.net/forums/vbsta...ion=topposters
Top Threads/Forums
http://www.talkloud.net/forums/vbsta...ion=topthreads
Top Visitors Countries
http://www.talkloud.net/forums/vbsta...action=country


Here's the newest version, it's only been a year and a half since the last update!

Translations have been removed as it just made it easy for people to get the hack even without a license. I am hoping people who make translations will be kind enough to post here.

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

I tested this on my test forum, and on one public forum, and all went well, if there are any problems you notice please report them here as soon as possible.

-------
CHANGELOG

[230.b] Changed Active Users to fix a small bug.
[230.b] Like, tested it and stuff..
[230.a] The MySQL Row=O error is now customized to say add to the template!!!!
hopefully no more "where did I go wrong?" posts! Muahahaha!
[230.a] Fixed Upgrade Counter (?action=upgrade)
[230.a] Set Excluded URL.. Now lists URLS
[230.a] Updated Istall to be compatible with vB 2.3.0
[230.a] Changed Most Number Results to Have a , format (ie 1,000 instead of 1000)
[230.a] I decided Frosted Flakes really are pretty tasty.
[230.a] Implemented Kurafires Member Referrer Changes, thanks Kura
[230.a] Implemented Kurafires Top Posters rewrite.



DEAR GOD CHECK THE SECOND POST OF THIS THREAD BEFORE YOU ASK A QUESTION!!!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #312  
Old 11-16-2001, 05:11 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JTMON
Member Stats, Forum Stats and Last 24 Hours. I have everything showing up except for the totals. All the text and tables are there. I just don't know what to grab from vbstats.php
To get the totals you'll have to do what Bane said and hack the PHP code in that generates the totals. The variables are generated in vbstats.php. If you want them somewhere else, you need to put the code to generate the variables there.
Reply With Quote
  #313  
Old 11-16-2001, 04:19 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well when I grab the code I want from vbstats and add it just about anywhere in index.php I get a parse error on the last line of index.php which is ?>
Reply With Quote
  #314  
Old 11-16-2001, 04:23 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code I am trying to insert into index.php from vbstats.php is:

Code:
// #########################################
// vBStats by Bane Macleod (http://www.talkloud.net/)
// (c) influx9.Design
// For vBulletin version 2.0.3
// (c) 2001 Jelsoft Enterprises, Ltd.
// #########################################
// Thanks for trying out vbStats. I would appreciate you leaving
// everything as is (including gratis) and if you do that you certainly
// deserve a thank you, and I do, however I know most of you
// won't so here is the one thing I ask. Please do not claim this work
// as your own or remove the header/hack notifications. This is
// peoples work and they should get credit.
// #########################################

// ###############################
// Other Vars (DO NOT MODIFY!!!)
// ###############################

$tl_statsv="203.2";
$tl_statsu="talkloud.net/vbstats/";
$tltoday=time()-(86400);

// ###############################

require('./global.php3'); // vBulletin Globals
require('./vbslang_en.php3'); // Future Language File

if (!isset($action) or $action=="") {
  $action="stats";
}

// ###############################
//   Stats Page
// ###############################
// Hacks Incorperated:
//   Colored Users Online Hack by Afterburner
//   Top Referrer by FireFly
// ###############################
if ($action=="stats") {

// ########## Breadcrumb
$tl_title=""._STATS."";
$breadcrumb=""._SITESTATS."";

 	$statistic=$DB_site->query_first("SELECT statloc,useonnow,usequeue,usevbp,usevbpl,queuemax,color1,color2,color3,color4,acolor,scolor,mocolor,mecolor,ucolor,norefer1 FROM vbstats_options");
	  $startdate=$statistic[startdate];
	  $statloc=$statistic[statloc];
	  $useonnow=$statistic[useonnow];
	  $usequeue=$statistic[usequeue];
	  $usevbp=$statistic[usevbp];
	  $usevbpl=$statistic[usevbpl];
	  $queuemax=$statistic[queuemax];
	  $color1=$statistic[color1];
	  $color2=$statistic[color2];
	  $color3=$statistic[color3];
	  $color4=$statistic[color4];
	  $acolor=$statistic[acolor];
	  $scolor=$statistic[scolor];
	  $mocolor=$statistic[mocolor];
	  $mecolor=$statistic[mecolor];
	  $ucolor=$statistic[ucolor];
	  $norefer1=$statistic[norefer1];

// ########## 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",(1000*$activemembers/$numbermembers));

	// Newest Member
	$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
	$newusername=$getnewestusers['username'];
	$newuserid=$getnewestusers['userid'];

	// PM Totals
	$totalpms = $DB_site->query_first("SELECT count(*) as pmcount FROM privatemessage");
	$totalpm = $totalpms[pmcount];

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

	// 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];
}

// ########## Post/Thread Stats
// 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]
$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]);

// ########## Visits Today
$vbs_atviews = $DB_site->query_first("SELECT count FROM vbstats_date WHERE date = '$vbs_date'");
$todayviews = number_format($vbs_atviews[count]);
Reply With Quote
  #315  
Old 11-16-2001, 04:40 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JTMON
The code I am trying to insert into index.php from vbstats.php is:

require('./global.php3'); // vBulletin Globals
You don't need that line. It's already called at the top of index.php
Reply With Quote
  #316  
Old 11-16-2001, 06:55 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, I had noticed that and removed that. I also tried putting the variables part up at the top of index.php with the other variables and then the relevant other vbstat code below elsewhere in index but every time I get a parse error on whatever line number ?> happens to be on. What exactly does a parse error means. Doesn't that mean I coded something wrong?
Reply With Quote
  #317  
Old 11-16-2001, 08:24 PM
|DarkManX|'s Avatar
|DarkManX| |DarkManX| is offline
 
Join Date: Oct 2001
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by SWFans.net
I just copied a few of the variable's defenition lines into index.php, and set it up like you are trying to, though its under my "Currently Online" display.

http://www.swforums.net/forum

that is awesome man, how did you do that?
Reply With Quote
  #318  
Old 11-16-2001, 09:10 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

I just placed this code into my index.php:

PHP Code:
// Total Thread Views
$boardviews=$DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread");
$totalviews=number_format($boardviews['threadviews']); 
Above the "//get newest member" section, then built a table row like loggedinusers in forum home and put the things I wanted inside it, all done in the forumhome template
Reply With Quote
  #319  
Old 11-16-2001, 09:12 PM
|DarkManX|'s Avatar
|DarkManX| |DarkManX| is offline
 
Join Date: Oct 2001
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by SWFans.net
Thanks.

I just placed this code into my index.php:

PHP Code:
// Total Thread Views
$boardviews=$DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread");
$totalviews=number_format($boardviews['threadviews']); 
Above the "//get newest member" section, then built a table row like loggedinusers in forum home and put the things I wanted inside it, all done in the forumhome template

i think you should make this a mini-release


i am not smart enough to figure all that myself......but i am smart enough to follow detailed directions
Reply With Quote
  #320  
Old 11-16-2001, 09:16 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if vbstats added this to global.php, or if I did, but this is in there above the "// ###################### Start sessions #######################" section.

PHP Code:
// ########## Visits Today
$vbs_atviews $DB_site->query_first("SELECT count FROM vbstats_date WHERE date = '$vbs_date'");
$todayviews number_format($vbs_atviews[count]);

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

// Views
$boardviews $DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread");
$totalviews number_format($boardviews[threadviews]); 
Now that I think about it a little, moving it to index.php, might speed my forums up some, if it was in fact me that put it there. Those database queries don't need to be in global and thus run on every page load for threads forums and all. :x
Reply With Quote
  #321  
Old 11-16-2001, 09:25 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for making me look into that. I was right, I moved the code I had in global.php to index.php, and now threads load considerably faster again.

I placed the section I quoted from global.php to the same place, just after, I had the other code in index.php.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05725 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete