DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Usercounter

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:André Spindler
Changed:2006-08-13T11:48:55
Author:André Spindler
Email:typo3@andre-spindler.de
Info 3:
Info 4:

Usercounter

Extension Key: asfk_usercounter

Copyright 2000-2005, André Spindler, <typo3@andre-spindler.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

Usercounter 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 1

FAQ 2

Adminstration 2

FAQ 2

Configuration 2

Reference 2

FAQ 2

Tutorial 2

Known problems 3

To-Do list 3

Changelog 3

Introduction

What does it do?

This extension is based on a example in the Typo3-book.

It features a usercounter with graphical or text-based output.

Screenshots

Graphical output:

img-1

Text-based output:

img-2

Users manual

  • You can use this counter in two different ways to count the visits to Your website: You can count the the visits of each page separately or you can count all visits to your website together.
  • The counter is increased when typo3 registers a new user-session. So there's no timeout-limit by the counter.
  • In graphics mode the altText of the digits contains the actual value of the counter.
  • To show the counter you can create a content-element and place it on your page. But if you want to show it on all pages, this would be a lot of work, so you should include it in you template.
  • The configuration is done by Typoscript. Yo can change whether to display the counter as text or as a table with graphical digits. If you use the graphical output, you can additionally set the number of digits and the directory from which the digits are taken.
  • If You want to use Your own digits for the graphical mode, there are some conditions for the ten files:
  • They have to be located within the same directory.
  • They must have the same size and filetype.
  • They must be named from '0' to '9'.

FAQ

- Not available yet.

Adminstration

- Not available yet.

FAQ

- Not available yet.

Configuration

- The whole configuration of this plugin is done by Typoscript.

Reference

pid

Property

pid

Data type

integer

Description

If this value is unset, the each call of a page will be counted separately.

If this value is set, all visits to the website are counted there.

Default

Not set

textMode

Property

textMode

Data type

integer

Description

If textMode is set to '1', the the output will be a typo-rendered text, otherwise it will be a set of graphical digits.

Default

Not set

(graphical Mode)

numDigits

Property

numDigits

Data type

integer

Description

Only used when in graphical mode.

This value sets the number of digits. Leading zeros are added if necessary.

Default

5

imageType

Property

imageType

Data type

string

Description

Only used when in graphical mode.

This value sets the filetype of the digits.

Default

'gif'

(included digits)

imageDir

Property

imageDir

Data type

string

Description

Only used when in graphical mode.

This is the path to the directory with the files for the digits.

You have to set it relative to the root of the page.

Default

'typo3conf/ext/asfk_usercounter/pi1/digits'

(included digits)

[tsref:plugin.tx_asfkusercounter_pi1]

((generated))
Examples

How to include a text counter, each page has its own counter:

plugin.tx_asfkcountdowntag_pi1 {
    textMode = 1
}

How to include a graphical counter with 6 digits to count all visits to our site, we use png-files at fileadmin/counter:

plugin.tx_asfkcountdowntag_pi1 {
    pid = 2
    numDigits = 6
    imageType = png
    imageDir = fileadmin/counter
}

FAQ

- Not available yet.

Tutorial

How to create and setup a counter in your template for all pages:

Install this extension via ExtManager

Create a marker in your template-file, i.e. “###COUNTER###

Now You will have to create a contentelement of type “visitor- counter”. This content will have a uid (CounterUID). If neccessary, create a page (NOT in menu!) for this content-element.

Open the template in the typo3-BackEnd and insert some typoscript:

marks.COUNTER < plugin.tx_asfkusercounter_pi1
marks.COUNTER {
    pid = 187 (=CounterUID)
    numDigits = 6 (layout)
    textMode = 0 (layout)
}

You can adjust the “layout”-entries to your own need.

Known problems

- Nothin reported yet.

To-Do list

- Nothing to do at the moment.

Changelog

- asfk_usercounter 1.1.1

First published version.

- asfk_usercounter 1.2.0

  • Included tutorial in manual.
  • Fixed bug with cachproblem.

- asfk_usercounter 1.3.0

  • added altText to images in graphical mode.
  • Added XML language files
  • changed status to stable.
  • changed code to be CGL-compliant.

img-3 Usercounter - 3