vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - HIT COUNTER! (Integrated With VB) (https://vborg.vbsupport.ru/showthread.php?t=118426)

Mr Chad 06-12-2006 10:00 PM

HIT COUNTER! (Integrated With VB)
 
If you like it click
https://vborg.vbsupport.ru/


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:
  1. Download and unzip 'plugin-pageviews.zip'
  2. Upload the folder 'Counter' into your forum directory
  3. Now open the 'Counter' folder, and CH MOD 666 the 'count.txt' file
  4. Install the plugin
  5. *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'
  6. Place '$pageviews' and/or '$pageviewstoday' in any template where ever you want to display the hit count.
Screen Shot:
http://beasttoast.com/thosting/files...iews_thumb.png - Using Total Page Views
or
http://beasttoast.com/thosting/files...iews_thumb.png - Using Total Page Views and Todays Page Views

FAQ:
  1. Q: Where do I put the '$pageviews' thing?
  2. A: Well... If you dont know how to do this then ill just give you a standard spot to put it.
    1. Open up your footer template
    2. Then Find:
      Code:

      <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
    3. And replace that with:
      Code:

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

This hack was based on ZIKI-SET's hack.

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

Quote:

Live Example (Look at my footer): http://beasttoast.com

Don't see it:confused:

Mr Chad 08-10-2006 02:39 PM

Quote:

Originally Posted by Derekclarke
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

Quote:

Originally Posted by Invalid ID
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.

Code:

  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

Quote:

Originally Posted by thetopday21122 (Post 1201018)
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

Quote:

Originally Posted by Tom_S (Post 1203388)
Screen shots are dead images and links

Yes and he explained why in posts above ;)
Quote:

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:

Quote:

<?
$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

Quote:

Originally Posted by LisaD1 (Post 1203360)
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" if you have no idea what you are doing.

thetopday21122 03-15-2007 12:06 AM

Thanks.


All times are GMT. The time now is 03:28 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.02362 seconds
  • Memory Usage 1,805KB
  • 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
  • (3)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete