Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-24-2001 Last Update: Never Installs: 1
 
No support by the author.

a. open vb2/global.php

find:

PHP Code:
// ###################### Start init ####################### 
Immediately ABOVE it put any PHP counter, i using this:

PHP Code:
// ipcounter hack by CX
// config
// create these two files count.txt and ip.txt, chmod them to 777
$count_file "count.txt";
$ip_file "ip.txt";
$userip getenv('REMOTE_ADDR');  // in some fixed IP server, change this line to $userip = getenv('HTTP_X_FORWARDED_FOR');

$count_temp=file($count_file);
$ip_temp=file($ip_file);

$detail=explode("|",$count_temp[0]);
$count_t=getdate(time());
$count_day=$count_t['mday'];

if (
$detail[0]==$count_day) {
    
$detail[1]++;
    
$detail[2]++;

    
$count=count($ip_temp);
    
$check=1;
    for (
$i=0$i<$count$i++) {
        
$ip_list=str_replace("\r","",str_replace("\n","",$ip_temp[$i]));
        if (
$ip_list==$userip$check=0;
    }
    if (
$check==1) {
        
$detail[3]++;
        
$detail[4]++;
        
$fp=fopen($ip_file,"a");
        
flock($fp,3);
        
fputs($fp,$userip."\n");
        
fclose($fp);
    }
}
else {
    
$detail[0]=$count_day;
    
$detail[1]=1;
    
$detail[3]=1;
    
$detail[2]++;
    
$detail[4]++;
    
$fp=fopen($ip_file,"w");
    
flock($fp,3);
    
fputs($fp,$userip."\n");
    
fclose($fp);
}

$new=implode("|",$detail);
$fp=fopen($count_file,"w");
flock($fp,3);
fputs($fp,$new);
fclose($fp);

// end ipcounter hack 
b. edit the template footer

find in last:

PHP Code:
</smallfont>
</
p
Immediately ABOVE it put:

PHP Code:
<br><br>
page views:&nbsp;&nbsp;today $detail[1],&nbsp;&nbsp;total $detail[2].&nbsp;&nbsp;variant IP visitors:&nbsp;&nbsp;today $detail[3],&nbsp;&nbsp;total $detail[4]. 
Done!

Show Your Support

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

Comments
  #2  
Old 05-25-2001, 04:36 PM
First-Man
Guest
 
Posts: n/a
Default

Where can i see an Demo?
thx
Reply With Quote
  #3  
Old 05-25-2001, 06:41 PM
bbqfan
Guest
 
Posts: n/a
Default

see the demo.jpg:
Reply With Quote
  #4  
Old 05-25-2001, 06:55 PM
Degen
Guest
 
Posts: n/a
Default

It works on my board, but I get this at the top of my page :

Warning: file("../addons/count.txt") - No such file or directory in /home/gaminghq/public_html/forums/global.php on line 69

Warning: file("../addons/ip.txt") - No such file or directory in /home/gaminghq/public_html/forums/global.php on line 70

Warning: fopen("../addons/ip.txt","w") - No such file or directory in /home/gaminghq/public_html/forums/global.php on line 101

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 102

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 103

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 104

Warning: fopen("../addons/count.txt","w") - No such file or directory in /home/gaminghq/public_html/forums/global.php on line 108

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 109

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 110

Warning: Supplied argument is not a valid File-Handle resource in /home/gaminghq/public_html/forums/global.php on line 111

Not sure what to make of this
Reply With Quote
  #5  
Old 05-25-2001, 07:41 PM
bbqfan
Guest
 
Posts: n/a
Default

see this?
PHP Code:
$cxip_count_file "../addons/count.txt";  // check the path
$cxip_file "../addons/ip.txt";           // check the path 
check the path first plx...
i set the path of count.txt and ip.txt to "../addons/", if you like, you can change it to anything else...

or like this:

chage those two lines to:

PHP Code:
$cxip_count_file "count.txt";  // check the path
$cxip_file "ip.txt";           // check the path 
it will be ok!
Reply With Quote
  #6  
Old 05-25-2001, 07:42 PM
bokhalifa bokhalifa is offline
 
Join Date: Oct 2001
Location: U A E Dubai
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good werk
Reply With Quote
  #7  
Old 05-26-2001, 12:16 PM
Blue2000 Blue2000 is offline
 
Join Date: Oct 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i made a live counter ages ago

its posted here somwhere

i can repost it if people what it
Reply With Quote
  #8  
Old 05-26-2001, 12:56 PM
maverick1236 maverick1236 is offline
 
Join Date: Oct 2001
Location: NY
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Id like to see it
Reply With Quote
  #9  
Old 05-26-2001, 04:11 PM
TimberLand
Guest
 
Posts: n/a
Default

Anyway to make this an option only the admin can see.
Reply With Quote
  #10  
Old 05-26-2001, 05:22 PM
ztsky
Guest
 
Posts: n/a
Default

Good hack.
I'll try it on my vb page.
ccxx
Reply With Quote
Reply


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 02:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04122 seconds
  • Memory Usage 2,304KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_onlinestatus
  • (10)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete