1
pipwax
Web Stats Module
  • 2006/11/11 1:36

  • pipwax

  • Not too shy to talk

  • Posts: 132

  • Since: 2005/9/12


I have installed the Istats Module (web stats) It shows but is not counting. I have added the javascript code in the footer, but it is not counting.
===========================read me doc.=================
i-Stats v1.02
===============

Records anonymous data as supplied by the users browser (via javascript).

Based on::
PHP i-Stats Version 1.5
developed By Sam Tang (sam@hkscript.com)


Installation
===============

Upload all files to a directory called exoops/modules/istats on your server.

Run E-Xoops admin, and install 'Web Stats' module.

Give access to groups as required.

Add the following code to the footer of your pages by using::
(Admin, Meta Generator, Footer Settings)
[ still effective even if theme changed ]





Do not put a line break in the istat.src line!!

And don't forget to change 'yourdomain.com' to your sites domain.

Job done!!


Counter
==============
To use i-Stats as a counter, add the following two lines to your themes.php file(s):

include_once(XOOPS_ROOT_PATH . '/modules/istats/include/function.php');
$result = CountDays();

This gives access to the following figures:
$result['days'] The number of days that stats are available for
$result['total'] The total number of visitors
$result['ava_day'] The average number of visitors per day
$result['ava_hour'] The average number of visitors per hour
$result['ava_week'] The average number of visitors per week
$result['ava_mth'] The average number of visitors per month
$result['max_date'] The busiest day
$result['max_daycount'] The number of visits on the busiest day
$result['today'] The number of visitors so far today
$result['this_week'] The number of visitors so far this week
$result['this_mth'] The number of visitors so far this month
$result['max_week'] The busiest week, as year # week number "2003 # 47"
$result['max_weekcount'] The number of visitors in the busiest week
$result['max_mth'] The busiest month
$result['max_mthcount'] The number of visitors in the busiest month
$result['totalpages'] The total number of pages served

For example:

There have been visitors in the last days.


Display numbers as images
=========================
To display the above numbers as graphics add these two lines in addition to the two above:

$graphics = num_to_graphics($result['total'], 8, XOOPS_URL . '/modules/istats/images/default','jpg');
echo $graphics;

The first parameter is the number to convert.
The second parameter is the number of digits (includes leading zeros).
The third parameter is the path to the image files.
The fourth parameter is the file extension of the images, e.g. jpg, gif etc.

Example graphical counter
===========================
Inserted into theme.php function themefooter:

include_once(XOOPS_ROOT_PATH . '/modules/istats/include/function.php');
include_once(XOOPS_ROOT_PATH . '/modules/istats/include/display.php');
$result = CountDays();
$graphics = num_to_graphics($result['total'], 8, XOOPS_URL . '/modules/istats/images/default','jpg');
echo $graphics;

or

include_once(XOOPS_ROOT_PATH . '/modules/istats/include/function.php');
include_once(XOOPS_ROOT_PATH . '/modules/istats/include/display.php');
$result = CountDays();
$graphics = num_to_graphics($result['totalpages'], 8, XOOPS_URL . '/modules/istats/images/default','jpg');
echo "
$graphics
";


Change Log
=============
xx/12/03 v1.02 Added manual in HTML, this readme.txt is now deprecated.
Added total pages served to counter.
Added extra browsers.
Reordered list of browsers for better identification
Corrected errors in readme.txt

26/11/03 v1.01 Added $myts functions to clean up referer url?querystring
Updated readme.txt to include instructions for use as counter
Added display.php to display numbers as graphics

24/11/03 v1.00 Initial release


Upgrade from v1.01 to v1.02
============================
Unpack and upload files.


Scripter
http://paul-cooke.com
==============================end read me================
This is the setp that I don't understand I can't find the file theme.php any help woud be greatly appreciated.

=======================confusing step======================

Counter
==============
To use i-Stats as a counter, add the following two lines to your themes.php file(s):

include_once(XOOPS_ROOT_PATH . '/modules/istats/include/function.php');
$result = CountDays();

This gives access to the following figures:
$result['days'] The number of days that stats are available for
$result['total'] The total number of visitors
$result['ava_day'] The average number of visitors per day
$result['ava_hour'] The average number of visitors per hour
$result['ava_week'] The average number of visitors per week
$result['ava_mth'] The average number of visitors per month
$result['max_date'] The busiest day
$result['max_daycount'] The number of visits on the busiest day
$result['today'] The number of visitors so far today
$result['this_week'] The number of visitors so far this week
$result['this_mth'] The number of visitors so far this month
$result['max_week'] The busiest week, as year # week number "2003 # 47"
$result['max_weekcount'] The number of visitors in the busiest week
$result['max_mth'] The busiest month
$result['max_mthcount'] The number of visitors in the busiest month
$result['totalpages'] The total number of pages served

For example:

There have been visitors in the last days.


Display numbers as images
=========================
To display the above numbers as graphics add these two lines in addition to the two above:

$graphics = num_to_graphics($result['total'], 8, XOOPS_URL . '/modules/istats/images/default','jpg');
echo $graphics;

The first parameter is the number to convert.
The second parameter is the number of digits (includes leading zeros).
The third parameter is the path to the image files.
The fourth parameter is the file extension of the images, e.g. jpg, gif etc.
===========================end confusing step===============
pipwax1@bellsouth.net
Quote:
To win in life one must be fluid like water, taking the shape needed to prevail


aspring IT Professional

2
Quest
Re: Web Stats Module
  • 2006/11/11 4:09

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Have you tried the more up to date version? version 2.1 ?
I-Stats version 2.1

Quest

3
pipwax
Re: Web Stats Module
  • 2006/11/11 19:27

  • pipwax

  • Not too shy to talk

  • Posts: 132

  • Since: 2005/9/12


I am sorry that I left that out, but I am using version 2.1
Where would I find the theme.php file?
pipwax1@bellsouth.net
Quote:
To win in life one must be fluid like water, taking the shape needed to prevail


aspring IT Professional

4
melissawb
Re: Web Stats Module
  • 2006/11/29 22:05

  • melissawb

  • Just popping in

  • Posts: 9

  • Since: 2006/11/22


Have you gotten a response as to where the theme.php file is yet? I am having the same problem and can not find it in my root directory or through the administration panel.

5
skenow
Re: Web Stats Module
  • 2006/11/30 1:50

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


The correct file to edit is the theme.html file, not .php. You will need to edit this file for every theme you are using - look in /themes/.

Remember to add the changes to the style.css, too.

Login

Who's Online

477 user(s) are online (396 user(s) are browsing Support Forums)


Members: 0


Guests: 477


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits