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=112998)

Mr Chad 04-13-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: This actually works on 3.5.0 - 3.5.4
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:
https://vborg.vbsupport.ru/ - Using Total Page Views
or
https://vborg.vbsupport.ru/ - 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.

Ziki 04-14-2006 01:41 PM

This is cooler than the old version of mine.:)

Mr Chad 04-14-2006 01:47 PM

Quote:

Originally Posted by ZIKI-SET
This is cooler than the old version of mine.:)

I'm glad you like it. I scrapted some of your code :). Was gettin sick of the idea of loading an image. Because it reminded me of one of those bootleg free hit counter sites.

finn snor 04-14-2006 02:31 PM

Does this only work as a total views ?

Im looking for a way get a counter in my calendar that makes it possible for me to see how many that have seen the frontpage of calendar and total views of each event.

Can this handle that ?

Mr Chad 04-14-2006 02:41 PM

nope. You would want to use https://vborg.vbsupport.ru/showthread.php?t=109523.

or

If you replace the contents of the plugin XML file with:
PHP Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
    <plugin active="1" product="vbulletin">
        <title>pageviews</title>
        <hookname>calendar_start</hookname>
        <phpcode><![CDATA[require_once('./counter/counter.php');]]></phpcode>
    </plugin>
</plugins>

Then that would only display the pageviews of the calander side. (this is not an extensive hack... Just something quick.)

Ntfu2 04-14-2006 07:21 PM

I followed instructions, placed it in my footer, and i've got nothing

Mr Chad 04-14-2006 07:56 PM

hmm. let me recheck the files

Mr Chad 04-14-2006 08:03 PM

Quote:

Originally Posted by Ntfu2
I followed instructions, placed it in my footer, and i've got nothing

Installed it on my second board... Works fine, only reason it doesnt work for you could be that you have one or both of these installed:

-Template Cache System
-Plugin Accelerator

and you have not refreshed the Cache for the templates or/and refreshed the plugin system.

Ntfu2 04-14-2006 10:53 PM

Quote:

Originally Posted by chatbum
Installed it on my second board... Works fine, only reason it doesnt work for you could be that you have one or both of these installed:

-Template Cache System
-Plugin Accelerator

and you have not refreshed the Cache for the templates or/and refreshed the plugin system.


Let me check

Nope, if you'd like i can PM you with some login details to check stuff out, i'm stumped


Edit, I fixed by CHMOD the count.txt file to 666 after upload

Mr Chad 04-14-2006 11:54 PM

Ok its good to see we got that resolved :)


All times are GMT. The time now is 09:18 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.02190 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete