Page 2 of 2
Posted: Wed Mar 08, 2006 10:28 am
by garvinhicking
Hi!
Sadly no, the DB-API was built for queries that fetch multiple values, so it always returns an array.
The function cannot easily be changed because then it would break existing code.
So I suggest this code:
Code: Select all
$res = serendipity_db_query("SELECT count(visits) AS cvisit FROM blehblehtablename WHERE year='$year' AND month='$month'", true);
// print_r($res);
$container[$i] = $res['cvisit'];
Regards,
Garvin
Posted: Wed Mar 08, 2006 1:50 pm
by SHRIKEE
HAH! that kinda worked. In stead of returning just one array value i now return the complete array which is build using your query.
and i split it on location. This might be slighty slower but as it is a admin only page it will work just fine.
I now have a working beta. Also fixed a referrer bug. They werent saved in the refs table because the check wasnt working well.
Im gonna run the plugin for a few days to see if its bug free and stuff. When im satisfied ills end you an updated copy!
Posted: Wed Mar 08, 2006 4:59 pm
by SHRIKEE
a screenie!
http://www.sothq.net/pages/gallery.html ... image]=189
click to see it full sized, its a bit raped now
ALL comments welcome!
Posted: Fri Mar 10, 2006 6:02 pm
by SHRIKEE
The counting is done properly now.
New records are added as they should and visits are as expected. Im now working on a better bot filter. One which will be somewhat easier to setup with less hassle on browser referrers and such

I hope it works!
Posted: Sat Mar 11, 2006 2:59 am
by SHRIKEE
I rewrote the bot excluding script
It now actively filters on 27 browsers. A option to switch this 'protection' on or off is in the admin panel.
Garvin where do i send the files, i think its ready for release

!
http://www.sothq.net/projects/statistics.html
Posted: Sat Mar 11, 2006 5:56 pm
by garvinhicking
Hi!
You can send the files to my mail adress serendipity at supergarv dot de, please
Regards,
Garvin
Posted: Sat Mar 11, 2006 6:16 pm
by SHRIKEE
how about that pm i sent you

about a developer thingy.
Ill mail you the files shortly.
Posted: Sat Mar 11, 2006 6:19 pm
by garvinhicking
Hi!
I didn't receive a PM from you! Did you send a PM or a E-Mail? I can't remember neither.
So I hope to hearfrom you. I'm gone for the rest of the weekend, sohave fun!
Regards,
Garvin
Posted: Sat Mar 11, 2006 6:24 pm
by SHRIKEE
hmm weird.
anyway. Can you add me at the sf.net developer list? As im thinking on using s9y for longer time and prolly will participate in some coding.
My login name is ajdegans / 1107332
Thanks!
Posted: Mon Mar 13, 2006 12:41 pm
by garvinhicking
Hi Shrikee!
Yes, of course! I just added you. Many thanks for your contributions, and please keep them coming

)
Best regards,
Garvin
Posted: Mon Mar 13, 2006 1:20 pm
by SHRIKEE
thanks

gonna check it out now