HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome to TinyPortal. Please login or sign up.

July 24, 2024, 11:18:14 PM

Login with username, password and session length
  • Total Posts: 195,347
  • Total Topics: 21,237
  • Online today: 80
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 49
  • Total: 49

Counter block

Started by evillair, March 01, 2006, 04:38:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I downloaded the php counter from:

Follow the very simple instuctions to install.

My html block code is:
<SCRIPT LANGUAGE="Javascript" SRC=""><!--

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:
// Enable referer validation? 1 = YES, 0 = NO
$check_referer = 1;
// Domains that are allowed to access this script
$referers = array ("localhost","");



Excellent find. Using it now for total page views.


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

<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

dosent work for me? i uploaded the counter to the smf directory

and put in this script

<SCRIPT LANGUAGE="Javascript" SRC="http://www./"><!--

and set the box to   javascript/html

any ideas on what i did wrong?


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:

alan s

nope still dosent work , created its own directory and set the permissions to 755 ( it would only go to that )


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).

alan s

for some reason i cant get it past 755.............