PDA

View Full Version : Miscellaneous Hacks - HIT COUNTER! (Integrated With VB)


Mr Chad
06-12-2006, 10:00 PM
If you like it click
https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=118426)


Installation Time: <2 mins
Template Edits: 1
Plugins: 1
VB Version: 3.6.0
Live Example (Look at my footer): http://beasttoast.com

Description:
This is a basic hit counter. It uses a little php script and a text file to store the hits (no DB because it would be too stressful). Also you dont have to display the hits on every page you could just put it on your forumhome template, and it will still count all the hits :cool:

Installation Instructions:
Download and unzip 'plugin-pageviews.zip'
Upload the folder 'Counter' into your forum directory
Now open the 'Counter' folder, and CH MOD 666 the 'count.txt' file
Install the plugin
*Optional* If you want to be able to display the page views for today just create a Scheduled Task like this:

Title: 'Page Views'
Hour: '23'
Min: '59'
File Name: './counter/counter_daily.php'
Place '$pageviews' and/or '$pageviewstoday' in any template where ever you want to display the hit count.Screen Shot:
http://beasttoast.com/thosting/files/1/pageviews_thumb.png (http://beasttoast.com/thosting/files/1/pageviews.PNG) - Using Total Page Views
or
http://beasttoast.com/thosting/files/1/dailyviews_thumb.png (http://beasttoast.com/thosting/files/1/dailyviews.PNG) - Using Total Page Views and Todays Page Views

FAQ:
Q: Where do I put the '$pageviews' thing?
A: Well... If you dont know how to do this then ill just give you a standard spot to put it.
Open up your footer template
Then Find:
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
And replace that with:
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]<br>total page views: $pageviews, page views today: $pageviewstoday</div>
If you like it click
https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=118426)

This hack was based on ZIKI-SET (https://vborg.vbsupport.ru/member.php?u=117597)'s hack (https://vborg.vbsupport.ru/showthread.php?t=109523).

Ntfu2
06-13-2006, 01:22 AM
wouldnt your previous version work the same? Or was stuff changed.

Just wondering for when i upgrade to 3.6 i wanna know if it'll be a neccasity for the 3.6 version :)

Mr Chad
06-13-2006, 02:46 AM
The plugin was changed.

everything else will work the same.

so if you upgrade your VB version you shouldnt need to install this one if you have the previous one aready installed.

Snake
06-14-2006, 04:55 PM
Thank you!

Mr Chad
06-15-2006, 04:23 AM
no problem, if there are any issues feel free to post em.

Mr.D
07-06-2006, 04:14 AM
screenshots dont work???

Derekclarke
07-08-2006, 08:43 PM
Does not work on VB 3.6 Beta 4.

Warning: Unknown(./counter/counter.php): failed to open stream: Permission denied in /global.php(353) : eval()'d code on line 5

Fatal error: (null)(): Failed opening required './counter/counter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/global.php(353) : eval()'d code on line 5

RaceJunkie
08-10-2006, 12:54 PM
Live Example (Look at my footer): http://beasttoast.com


Don't see it:confused:

Mr Chad
08-10-2006, 02:39 PM
Does not work on VB 3.6 Beta 4.

Warning: Unknown(./counter/counter.php): failed to open stream: Permission denied in /global.php(353) : eval()'d code on line 5

Fatal error: (null)(): Failed opening required './counter/counter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/global.php(353) : eval()'d code on line 5
CHMOD the counter folder, I no longer support any of my hacks right now. Swiched servers and had to re-do my whole site thats why you dont see the demo or the images anymore.

biggyme13
08-11-2006, 12:19 AM
How come it counts in 2's? I see 12,020 page views, and then I refresh, and I see 12,022, refresh again 12,024, and so on. I'm the only one on..

iran.gs
08-11-2006, 11:50 AM
this killed my whole forum :( now even after uninstalled i get this :(
Warning: Unknown(./counter/counter.php): failed to open stream: Permission denied in /global.php(357) : eval()'d code on line 91

Fatal error: (null)() [function.require]: Failed opening required './counter/counter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/waus/public_html/forum/global.php(357) : eval()'d code on line 91

iran.gs
08-11-2006, 11:58 AM
the worst i seen lol i had to uninstall it i wont recomend this one to anyone

wolfyman
08-15-2006, 03:00 AM
can I see a screenshot?

Invalid ID
10-12-2006, 01:40 AM
No hit counter was found on your forum. Is this invisible or just a hoax?

da420
10-12-2006, 01:51 AM
No hit counter was found on your forum. Is this invisible or just a hoax?

A few posts up the author explained why you don't see it.

Mr Chad
01-07-2007, 04:41 AM
ok then...

Been Told
01-27-2007, 09:05 PM
Nice and easy does it. Thanks very much, it's just what I needed. :up: :up: :up: :D

cam2
02-08-2007, 06:54 PM
Where do I install this so it shows in the stats box?

adhari_com
02-09-2007, 02:22 PM
Thanx cool one, u just forgot to close the second file.

fclose ($c2);

Mr Chad
02-09-2007, 02:25 PM
woops :D

FRANKTHETANK 2
02-27-2007, 11:24 AM
good shit just added to my site thanks

ravencr
03-04-2007, 02:39 PM
Does this count unique visitors or everyone?

Chris

thetopday21122
03-11-2007, 06:41 PM
I like the idea but how do I get it into my Statistics box instead of my footer?

giovannicosta
03-11-2007, 07:15 PM
does it work for vb 3.6.5?

ravencr
03-11-2007, 11:14 PM
I decided to use statcounter.com and it works perfectly and has a ton of stuff it provides all for free.

Chris

Kap O
03-13-2007, 10:22 PM
I Like the Hack

LisaD1
03-14-2007, 03:16 PM
I like the idea but how do I get it into my Statistics box instead of my footer?

Edit the forumhome template.
Works good. I think I have the same count by 2 issue, but for now I will leave it and just divide it if I want to know the true count LOL

Tom_S
03-14-2007, 03:51 PM
Screen shots are dead images and links

LisaD1
03-14-2007, 04:32 PM
Screen shots are dead images and links

Yes and he explained why in posts above ;) Swiched servers and had to re-do my whole site thats why you dont see the demo or the images anymore.

Tom_S
03-14-2007, 05:33 PM
Ummm...He posted that in August of 2006. It really don't explain it. ;)

Here is his website
http://beasttoast.com

Sorry Chad....Just trying to encourage the screenshots back ;)

perju
03-14-2007, 06:15 PM
My counter is counting by 2's. Why is this?

Tom_S
03-14-2007, 08:53 PM
I dunno. I just installed it to see if it did. It does. 2x2

Tom_S
03-14-2007, 09:01 PM
Open counter/counter_daily.php and replace it all with this:


<?
$file="./counter/count.txt";
if ($c=fopen($file, "r+")) {
$count=fgetss($c, 255);
fclose ($c);
}
$file2="./counter/yesterday_count.txt";
if ($c2=fopen($file2, "r+")) {
fputs($c1, $count);
fclose ($c1);
}
?>


This counter is as you said just a basic hit counter. It will count on every page reload. Nice mod for some but I can't use it. Too many people like reloading pages to watch numbers grow.

thetopday21122
03-14-2007, 10:43 PM
Edit the forumhome template.
Works good. I think I have the same count by 2 issue, but for now I will leave it and just divide it if I want to know the true count LOL

Thanks.

New Question: Does this count the hits for every day?

Also, what does he mean by: Now open the 'Counter' folder, and CH MOD 666 the 'count.txt' file?

Tom_S
03-14-2007, 11:38 PM
You really need to read this thread. It isn't that long. As for uploading the file folder you need to use FTP. As for CHMOD to 666 you need to google "CHMOD (http://catcode.com/teachmod/)" if you have no idea what you are doing.

thetopday21122
03-15-2007, 12:06 AM
Thanks.