Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 06:08:10 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 58
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 2
Guests: 49
Total: 51

Author Topic: Counter block  (Read 19667 times)

0 Members and 1 Guest are viewing this topic.

evillair

  • Guest
Counter block
« on: March 01, 2006, 09:38:07 AM »
I downloaded the php counter from: http://www.phpjunkyard.com/php-text-hit-counter.php

Follow the very simple instuctions to install.

My html block code is:
Code: [Select]
<SCRIPT LANGUAGE="Javascript" SRC="http://www.pixelmorgue.com/counter/counter.php?page=index"><!--
//--></SCRIPT>

Once I registered 1 hit I went to the /logs folder on my ftp and changed the number to the current hits of the website (I added the ones from the stats page).

It only counts the "index.php" (if you add page=index.php that is) not any of the other hits for example "index.php?action=forum" won't be counted.

I also enabled the referal stuff.
in counter.php I edited the following lines:
Code: [Select]
// Enable referer validation? 1 = YES, 0 = NO
$check_referer = 1;
// Domains that are allowed to access this script
$referers = array ("localhost","pixelmorgue.com");

Thanks

gerrymo

  • Guest
Re: Counter block
« Reply #1 on: March 02, 2006, 04:17:57 AM »
Excellent find. Using it now for total page views.

gerrymo

  • Guest
Re: Counter block
« Reply #2 on: March 02, 2006, 06:20:55 AM »
I've also added their link manager. Works perfectly. Only one problem is that you have to add the style.css in manually to the public part. By default its is only for the Admin area. Simply add
Code: [Select]
<link rel="STYLESHEET" type="text/css" href="style.css">
To the Header under the Title Tags, and alter it to suit you theme.

alan s

  • Guest
Re: Counter block
« Reply #3 on: March 06, 2006, 05:53:17 AM »
dosent work for me? i uploaded the counter to the smf directory   http://cknetworx.com/~/whiplash/smf/counter.php

and put in this script

<SCRIPT LANGUAGE="Javascript" SRC="http://www./cknetworx.com/~/whiplash/smf/counter.php?page=index"><!--
//--></SCRIPT>

and set the box to   javascript/html

any ideas on what i did wrong?

gerrymo

  • Guest
Re: Counter block
« Reply #4 on: March 06, 2006, 06:24:29 AM »
It needs to be in its own directory with permissions set to 777 as it writes its log files to there. Install it in a directory called counter, and use the code from the first post, it will work then.

Put the directory in your site root: yourdomain.com/counter
« Last Edit: March 06, 2006, 06:30:40 AM by gerrymo »

alan s

  • Guest
Re: Counter block
« Reply #5 on: March 06, 2006, 06:29:34 AM »
nope still dosent work , created its own directory and set the permissions to 755 ( it would only go to that )

alan s

  • Guest
Re: Counter block
« Reply #6 on: March 06, 2006, 06:36:12 AM »

gerrymo

  • Guest
Re: Counter block
« Reply #7 on: March 06, 2006, 06:58:26 AM »
You'll need to get it to 777. If it wont go to 777 via FTP, you could try through cPanel, or your online file manager (if you have one).

crip

  • Guest
Re: Counter block
« Reply #8 on: March 06, 2006, 07:24:08 AM »
lol

alan s

  • Guest
Re: Counter block
« Reply #9 on: March 06, 2006, 07:31:43 AM »
for some reason i cant get it past 755.............