I coded a generic tracker module. The readme describes its functionality:
hhhTracker v0.1 Readme
(C)2004, Bram Fokke, De Drie Heren, bram@fokke.net
INTRODUCTION
This is the quick'n'dirty readme file for the hhhTracker module. This module has been created as a first attempt at writing a Mambo module.
FUNCTIONALITY
The functionality is pretty simple. This module displays a list of dated entries from a database table and optionally links to them. This method of displaying information is used in portal sites like fok.nl and tweakers.net. The output can look like this:
New Users
21:15 DaFokka
18:30 Soebas
08:21 Shazith
03:44 Kruis
01:13 PandaBorrel
19-06 Erik
19-06 vdHoeven
The appearance can be modified by changing some parameters and using a style sheet.
PARAMETERS
Parameter: 'table_name'
specifies the name of the table to use.
Required.
Parameter: 'date_field'
Name of the field that contains the date to use as timestamp.
Required.
Parameter: 'name_field'
Name of the field that contains the name to use as title
Required.
Parameter: 'id_field'
Name of the field that contains the id. If this field is empty, the tracker can't link to the object being listed, but the tracker will display correctly.
Default: <empty>
Parameter: 'link'
URL of the link to link to the object. The ID is appended at the end so probably you'll want to use something like 'viewuser.php?userid='
Default: <empty>
Parameter: 'title'
Title of the tracker. If the title is empty (the default), no title will be displayed.
Default: <empty>
Parameter: 'max_size'
If the 'name' is longer than 'max_size' characters, the name will be truncated and '...' will be appended.
Default: 20
Minimum value: 5
Parameter: 'limit'
The length of the tracker in lines.
Default: 10
Minimum value: 1
Maximum value: 100
CSS STYLES
To control the layout of the tracker, you can use several CSS classes:
class: hhh_tracker_title: used to format the title
class: hhh_tracker_entry: used to format the layer (<div> tag) that encloses each entry.
class: hhh_tracker_timestamp: used to format the timestamp
class: hhh_tracker_name: used to format the name if it's not a link
class: hhh_tracker_link: used to format the name if it's a link
EXAMPLES
The following parameters create a tracker which lists the newest users:
title=Newest users
table_name=mos_users
date_field=registerDate
name_field=name
The following parameters create a tracker which lists the users which have been online most recently:
title=Online users
table_name=mos_users
date_field=lastvisitDate
name_field=name
The following parameters create a tracker which lists the most recent content:
title=Recent content
table_name=mos_content
date_field=created
name_field=title
id_field=id
link=index.php?option=content&task=view&id=
DISCLAIMER
I can make no guarantees whatsoever on the functioning of this tiny piece of code. Furthermore I can not promise it will enhance your website, your sex life or your general well being, although I have done my best to try to do so.
If you have questions or remarks don't hestitate to e-mail me at bram@fokke.net
.
THANKS
I'd like to thank the Mambo Development team. It rocks. And I'd like to thank Guido Jansen for introducing me into Mambo.