Gossamer Forum
Quote Reply
Statistics Plugin?
Is, or has anyone thought of doing a statistics plugin? In know there is a thread to track visitors already in this forum, but I'm talking about tracking categories with the most number of clicks etc. So you could look up the most popular categories by the total number of hits? Pretty basic I guess, just a click counter. Unless someone can think of other ways to extend it. I'd be interested in this one.

Regan.
Quote Reply
Re: Statistics Plugin? In reply to
Wouldn't be too complicated...basically do the following:

1) Add a column in the Category table called Hits...

2) Create two tables called Build_Category_Update with the following columns/fields:

CategoryID
Hits

AND Category_Hit_Track with the following fields/columns:

CategoryID
Hits
IP

2) Then make a copy of jump.cgi and rather than updating the Hits_Track table, update the Category_Hits_Track table. OR you could hack the page.cgi via a plugin approach that adds the ability to update the Category_Hits_Track table.

3) Then hack the build script to update the HIT column in the Category table.

(And, I believe that the Category table that is used in earlier versions of LINKS SQL is called something like CatLinks in the 2.X versions.)

Hope this helps.

Regards,

Eliot Lee
Quote Reply
Re: Statistics Plugin? In reply to
There should be some modules like wwwthreads offer,
which can be used for a lot of projects.

1) number of records (grand_total viewing on Homepages)
2) last 5 added records

It was possible to show this features with links2.0,
should be possible for sql.

Something like that brings live in a Homepage.

Michael


Quote Reply
Re: Statistics Plugin? In reply to
I believe that the last records mod was upgraded by pugdog or someone else...

In terms of the total number of records...not difficult at all...I posted codes for doing this in the Links 1.13 forum and all you basically have to do with the codes is replace the variable structure, then create a global through the plugin menu...calling the appropriate sub.

Regards,

Eliot Lee
Quote Reply
Re: Statistics Plugin? In reply to
Eliot,

the total number of records should be displayed outside linksql, for example on the main Homepage.

In links2.0 I had a small script which I called by SSI

Michael