Page 1 of 2
statistics about Authors logon activities.
Posted: Tue Mar 21, 2006 3:19 pm
by mina
Hi,
I would like know how i can collect information/statistics about Authors logon activities.
Who, when and last logon time, and total no of logons are of the interests.
The reason is we are running multi-user/authors blog for a group of students who are learning French.
We would like to know how many of them are actually using the blog as a medium of help.
thanks.
Mina.
Re: statistics about Authors logon activities.
Posted: Tue Mar 21, 2006 3:57 pm
by garvinhicking
For that, a basic plugin would do fine.
I've patched up the "External Authentication" plugin to also do login logging. An updated file is here:
http://nopaste.php-q.net/199981 and will be stored in Spartacus the next 48 hours.
It straightly logs to the database, there you can easily write up SQL queries that show you results with phpMyAdmin or tools like that.
Best regards,
Garvin
Re: statistics about Authors logon activities.
Posted: Wed Mar 22, 2006 9:25 am
by mina
garvinhicking wrote:For that, a basic plugin would do fine.
I've patched up the "External Authentication" plugin to also do login logging. An updated file is here:
http://nopaste.php-q.net/199981 and will be stored in Spartacus the next 48 hours.
It straightly logs to the database, there you can easily write up SQL queries that show you results with phpMyAdmin or tools like that.
Best regards,
Garvin
Thank you very much.
Mina
Posted: Wed Mar 22, 2006 10:14 am
by SHRIKEE
@garvin,
how is this logged, perhaps it can be shown in the statistics plugin... to add to the fun

Posted: Wed Mar 22, 2006 12:03 pm
by garvinhicking
Hi!
In the current form it's logged to a plain "serendipity_loginlog" DB table, so yes - it could be integrated when the plugin is available
Best regards,
Garvin
Re: statistics about Authors logon activities.
Posted: Thu Mar 23, 2006 2:14 pm
by mina
garvinhicking wrote:For that, a basic plugin would do fine.
I've patched up the "External Authentication" plugin to also do login logging. An updated file is here:
http://nopaste.php-q.net/199981 and will be stored in Spartacus the next 48 hours.
It straightly logs to the database, there you can easily write up SQL queries that show you results with phpMyAdmin or tools like that.
Best regards,
Garvin
Hi,
I have updated the plugin (External user authentication (LDAP)/tracking) and then enabled option "Enable login logging?" but still i do not get any login details registered in the serendipity_loginlog DB table.
The loginlog table is completely empty, (0 raws)
I do not have/use any LDAP server for Authentication.
Any ideas?
thanks.
Mina.
Re: statistics about Authors logon activities.
Posted: Thu Mar 23, 2006 2:30 pm
by garvinhicking
Hi Mina!
Thanks! It was a bug in the logger() function of the plugin. It specified the "ua" column name in the INSERT statement, where it should properly use "user_agent". I only added that later on, so I didn't catch that bug.
Just committed version 1.14 of the plugin.
Regards,
Garvin
Posted: Thu Mar 23, 2006 5:15 pm
by SHRIKEE
just a thought about error output,
aparantly there is no error output when a query fails. I noticed this earlier when i was working on the statistics en usergallery plugin.
maybe there is a way to create an area (above the site output for example) which shows when errors occur, be it accessrights or query or any error.
Posted: Thu Mar 23, 2006 6:11 pm
by garvinhicking
Actually the error(s) from serendipity_db_query are returned as strings, it's just that plugins or function don't always evaluate the return.
It's a good idea to think about a central place where failed queries can be investigated! I'll think about how to actually implement that; it would be good to log errors to a file instead of the DB, and then have a small panel where one can read the error logfile?
Regards,
Garvin
Posted: Thu Mar 23, 2006 7:00 pm
by SHRIKEE
that might be an idea yes, but bear in mind this file or page should be accessable outside the admin area. otherwise if there are errors in the admin pages we still cannot see the errorlog
Posted: Thu Mar 23, 2006 7:07 pm
by garvinhicking
Hi!
No way - error messages may contain very confidential information. It should never be disclosed without a login, or by downloading the file via FTP.
Regards,
Garvin
Posted: Thu Mar 23, 2006 8:25 pm
by SHRIKEE
i didnt mean leaving it unprotected but if the admin area is screwed the log must be readable too.
Re: statistics about Authors logon activities.
Posted: Fri Mar 24, 2006 11:51 am
by mina
garvinhicking wrote:Hi Mina!
Thanks! It was a bug in the logger() function of the plugin. It specified the "ua" column name in the INSERT statement, where it should properly use "user_agent". I only added that later on, so I didn't catch that bug.
Just committed version 1.14 of the plugin.
Regards,
Garvin
Hi Gavin,
Thank you very much. Now it is working
BTW, I am just wondering about couple of things.
Every login action creates 2 rows in the table, one for frontend_login
and one for backend_login. What these logins represents?
The timestamp is like this 1143192368
How can i get real date & time out of this?
thanks again for the greate help.
Mina.
Re: statistics about Authors logon activities.
Posted: Fri Mar 24, 2006 12:40 pm
by garvinhicking
Hi mina!
This dual-login is actually how s9y works: If someone logs into the backend, he automatically logs into the frontend as well. But if someone logs into the frontend, he does not necessarily want to access the backend. So I think this is quite interesting information that is stored.
You can convert timestamps by using the MySQL "DATE_FORMAT" command:
http://dev.mysql.com/doc/refman/4.0/de/ ... tions.html
Best regards,
Garvin
Re: statistics about Authors logon activities.
Posted: Fri Mar 24, 2006 2:47 pm
by mina
garvinhicking wrote:Hi mina!
This dual-login is actually how s9y works: If someone logs into the backend, he automatically logs into the frontend as well. But if someone logs into the frontend, he does not necessarily want to access the backend. So I think this is quite interesting information that is stored.
You can convert timestamps by using the MySQL "DATE_FORMAT" command:
http://dev.mysql.com/doc/refman/4.0/de/ ... tions.html
Best regards,
Garvin
Hi Garvin,
I am bit confussed about forntend & backend of the blog.
What is the differnce between frontend login and backeng login?
I know this is pretty boring question, but I am new to s9y.
best regards,
Mina.