Gossamer Forum
Home : Products : DBMan : Customization :

Click Counter

Quote Reply
Click Counter
I would like to have each userid's clicks counted. That is, I log in as me and click a few links and then it records which links I clicked on. Or in the simpliest form, how many I clicked on.

Is there any way to do this?
Thanks
Quote Reply
Re: Click Counter In reply to
I suppose you could do something like the new hit counter to count the number of clicks. You would have to put it into just about every one of the subroutines in html.pl.

As for counting which links a given user clicked on, do you need more than what is given in the .log file?


------------------
JPD






Quote Reply
Re: Click Counter In reply to
I guess I was hopping to automate a process that takes what is in the log file and writes it to a database recored associated with a userid key field.
Quote Reply
Re: Click Counter In reply to
Oh. You want to have a searchable .db file, then.

I suppose you could do that.

You might try changing the following line in sub auth_logging in the auth.pl file:

change:

Code:
print LOG "$uid $action at $time on $date from $ENV{'REMOTE_HOST'}\n";

to

Code:
print LOG "$uid|$action|$time|$date|$ENV{'REMOTE_HOST'}\n";

Then you can set up a whole configuration, using the .log file instead of a .db file.

Is this what you wanted?


------------------
JPD






Quote Reply
Re: Click Counter In reply to
I think that might be it. Correct me if I am wrong but this would allow a user to list all listings with their userid and only those with their userid since that is one of the fields.
Quote Reply
Re: Click Counter In reply to
It should, if you set up the .cfg file with the right permissions.

You would need to set

$auth_view_own = 1;

and you probably wouldn't want them to be able to modify the file.

------------------
JPD