Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
HIT COUNTER! (Integrated With VB) Details »»
HIT COUNTER! (Integrated With VB)
Version: 1.00, by Mr Chad Mr Chad is offline
Developer Last Online: Apr 2009 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.0 Beta 1 Rating:
Released: 06-12-2006 Last Update: Never Installs: 49
 
No support by the author.

If you like it click


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

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:
- Using Total Page Views
or
- 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


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

Show Your Support

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

Comments
  #32  
Old 03-14-2007, 06:15 PM
perju perju is offline
 
Join Date: Feb 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My counter is counting by 2's. Why is this?
Reply With Quote
  #33  
Old 03-14-2007, 08:53 PM
Tom_S Tom_S is offline
 
Join Date: Jan 2007
Location: VA Beach
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dunno. I just installed it to see if it did. It does. 2x2
Reply With Quote
  #34  
Old 03-14-2007, 09:01 PM
Tom_S Tom_S is offline
 
Join Date: Jan 2007
Location: VA Beach
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #35  
Old 03-14-2007, 10:43 PM
thetopday21122 thetopday21122 is offline
 
Join Date: Feb 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LisaD1 View Post
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?
Reply With Quote
  #36  
Old 03-14-2007, 11:38 PM
Tom_S Tom_S is offline
 
Join Date: Jan 2007
Location: VA Beach
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #37  
Old 03-15-2007, 12:06 AM
thetopday21122 thetopday21122 is offline
 
Join Date: Feb 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
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 07:51 PM.


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.04726 seconds
  • Memory Usage 2,267KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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