PDA

View Full Version : ADDON: Image Statistics


austriaka
01-10-2007, 09:42 AM
History:
2007-11-22
Version Check added

2007-10-28
global $cfgrow added

2007-06-20
[optimize] Tables become optimized automatically with monthly update
[bug] empty default in creating tables doesn't work with all mysql versions

2007-04-16
[Bug] Backslashes before apostrophe in image title [fixed]
[Typo] IP-adress [fixed]

2007-02-26
[Bug] Defined $cdate as a variable that is already in use by Pixelpost [fixed]
[Bug] Forwarding back to image after commenting was counted as new visit [fixed]

2007-02-03
[B]Release of Version 2.0
Most important Changes:
counting of image stats in an own database table
settings in a database table
longtime image stats
search engine terms
submenus for image stat pages
daily overview
timezone correction
IP localization

2007-01-11
public image stats are not updated until stats viewed in admin area [fixed]

2007-10-01
[B]Release of version 1.0
__________________________________________________ _____________

Image Stats Addon is a very powerful addon for image statistics.
It shows you detailed information about your visitors and the images they have viewed within the current month.
You can share the actual month stats for every single image with your visitors by using these two tags in image_template.html:
<IMAGE_COUNTER> and <IMAGE_TODAY>

http://www.uhlig.at/tmp/newimgstats0kl.gif (http://www.uhlig.at/tmp/newimgstats0.gif) http://www.uhlig.at/tmp/newimgstats1kl.gif (http://www.uhlig.at/tmp/newimgstats1.gif) http://www.uhlig.at/tmp/newimgstats2kl.gif (http://www.uhlig.at/tmp/newimgstats2.gif) http://www.uhlig.at/tmp/newimgstats3kl.gif (http://www.uhlig.at/tmp/newimgstats3.gif) http://www.uhlig.at/tmp/newimgstats4kl.gif (http://www.uhlig.at/tmp/newimgstats4.gif) http://www.uhlig.at/tmp/newimgstats5kl.gif (http://www.uhlig.at/tmp/newimgstats5.gif)


Info-Page:
http://www.pixelpost.org/extend/addons/image-statistics/

Installation (same for new installation and update):
Upload the admin_imagestats.php into addons folder.
Go to addons menu and create the tables you need.

Settings: (in admin addons menu)
Use public image counter: yes/no
Show visits of search engine bots in public counter: yes/no
search engine bots: comma separated list of search engine tags
(For info about search engine bots, please read the included "ReadMy.txt" file.)
Number of entries shown in admin image stats: what it says

NEW TAG (for use in image_template.html):
<IMAGE_COUNTER> number of image visitors in actual month.
<IMAGE_TODAY> number of image visitors today.

Changes to database:
3 new tables in pixelpost database are created.

Download from pixelpost.org (http://www.pixelpost.org/extend/addons/image-statistics/download/)
You can look at the live action of Visitor Counter at http://blog.uhlig.at


You like this addon?
https://www.paypal.com/en_US/i/btn/x-click-but04.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=karin%40uhlig%2eat&item_name=Donation%20for%20Pixelpost%20Stuff&item_number=pixelpost&no_shipping=0&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8)
HAVE FUN WITH IT!
KArin

Dkozikowski
01-10-2007, 10:40 AM
Very cool. We can definitely collaborate and take your image stats and my comment stats and make one UBER pixelpost stats addon once I'm finished with mine :)

se.nsuo.us
01-10-2007, 12:08 PM
Cool! would you like to take over the development of meta-categories addon? It records last-viewed, most-viewed, last-commented and most-commented

With a bit or reporting added monthly stats would be possible....

austriaka
01-10-2007, 12:57 PM
Cool! would you like to take over the development of meta-categories addon? It records last-viewed, most-viewed, last-commented and most-commented

With a bit or reporting added monthly stats would be possible....
uh-uh I'd like to do that, but I don't understand the half of what you are writing (didn't think my english is so poor :-(( ) ;-)
What are Meta-Categories? You mean records by category? Together with your Category-Addon?
Right now I have no extra reporting in my Addon, I only use queries out of pp_visitors table. But I've something in mind like saving the image stats to db for reporting them permanently, not only in current month.
I spoke with dwilkinsjr about writing a consolidated stats addon for comments and images and share a db table for that. So using that table for category stats would be possible.
Is it that what you mean?

KArin

se.nsuo.us
01-11-2007, 03:30 AM
uh-uh I'd like to do that, but I don't understand the half of what you are writing (didn't think my english is so poor :-(( ) ;-)
What are Meta-Categories? You mean records by category? Together with your Category-Addon?

If you take a look at http://se.nsuo.us/index.php?x=browse (Note: site not safe for viewing at workplace but not porn) In the right hand column you see title "Meta Info" if you select each of those links there you will see what I mean.

austriaka
01-11-2007, 07:31 AM
@se.nsuo.us:
could you send me the coding of your meta info? I'm quite sure I can do this as an addon, but I have to see what kind of data you pull out of database and how it is stored

LG
KArin

se.nsuo.us
01-11-2007, 07:51 AM
It is an addon - download it here - http://se.nsuo.us/page/addons - there is also a corresponding post in the Addon's forum.

My offer was because I no longer have an inclination/time to maintain the code. However since you are doing something similar along with other programmers you can very easily build up upon what has been done - that is *if* you so wish.

austriaka
01-11-2007, 08:49 AM
I had a look into your code and in the main things it is working in the same way we are thinking about our stats-Addon.
I suggest that I won't do any work at your addon (it is yours and should stay yours ;-)
But when dwilkinsjr and I work out the "big" stats addon, we would love to use some parts of your addon.

Idea is to leave any of the existing addons as stand alones but offer a new addon, that combines the functionality of comment_stats and image_stats. If you allow we could use part of your meta_category addon for the public statistics.

KArin

se.nsuo.us
01-11-2007, 09:05 AM
I suggest that I won't do any work at your addon (it is yours and should stay yours ;-)

Ah! but the GPL license ensures that what is mine stays mine, also the spirit of Open Source is that it is easy to build on work of others, I feel, building on work of others no way robs the original author (who is typically acknowledged in the code comments)


If you allow we could use part of your meta_category addon for the public statistics.

Once again since the code is already under GPL you need not ask for permission to use it for your addon which I presume is going to be open as well.

And as I have said - the offer of code is *if* you wish and not a compulsion in anyway.

austriaka
01-11-2007, 09:08 AM
Ok, thank you ;-)

BTW: I just updated the downloadfile at http://www.pixelpost.org/v1/devfiles/?id=196 because of a little bug I found

KArin

Clavain
01-12-2007, 12:05 PM
wow, cool addon! it's working fine

pehansen
01-13-2007, 03:43 PM
I tried to install addon, but counters stay at 0, and the followitn error shows
up in the admin panel just above the stats:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /pixelpost/includes/functions.php on line 217

Anyone have a clue what is wrong?.... I'm running newest version of PP.

Paul.

Dennis
01-13-2007, 04:05 PM
I'm not familiar with this addon but perhaps it needs a table in the pixelpost database. And the MySQL error suggests there isn't one at this point.

austriaka
01-13-2007, 10:51 PM
Paul,
does the addon do anything? I mean does it show up any lines, any numbers in admin area? If yes, what does ist say?
Could you have a look into your Database and see if there is a column called "img_id" in table "pixelpost_"visitors?

The error means that a mysql statement isn't called properly. The issue doesn't come from functions.php but from addon script which calls the function in function.php script.
But this makes it almost impossible to say from where in image_stats script the error comes...

So try to give a bit more info please.
Or email me at 2@kg3.de, there is a new version of the addon script you could check out

KArin
KArin

Vernon.Trent
01-14-2007, 09:24 AM
wirh my pp works fine. thanks.

austriaka
01-14-2007, 10:01 AM
I tried to install addon, but counters stay at 0, and the followitn error shows
up in the admin panel just above the stats:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /pixelpost/includes/functions.php on line 217

Anyone have a clue what is wrong?.... I'm running newest version of PP.

Paul.
Paul, I found the error.
There are two possible reasons of this behaviour:
1) Your visitors did not call a specified image page but have called only the front page of your blog until now (like http://www.paulsblog.com or http://www.paulsblog.com/index.php without showimage=nnn in adress).
2) You have a mod_rewrite that changes the URL of the called image page so "showimage" is not represented any more.

In both cases The Addon cannot find any image statistics, because no image id is found in the called URIs of your blog.
I changed the behaviour of the addon so if there are no images called, it will show some page statistics instead. It makes the whole thing a bit slower, so I am not very happy with that.
If you want I can send you the updated file of image-stats V1.0 so you can try if this solves your problem.

V2.0 of image-stats is almost finished, so I won't publish the updated Version 1.0 in Pixelpost Addons page.

KArin

pehansen
01-14-2007, 04:03 PM
Hi,

Well, if version 2.0 of the addon is almost finished, then I can wait until then,
and try that out when you have got it released.

Apart from that, the addon displays all the info that it's supposed to in th admin, and the img_ field was also added to the SQL table.... only the counters stay at 0, and the in the middle, the error lines...

I'll be testing the next version as soon as you have it up for download.

Regards,
Paul.

austriaka
01-14-2007, 06:09 PM
schonhose pointed me to a problem with the database table I use. So I have to think the whole addon over... And it may take another few days until Version 2.0 is ready to publish

KArin

Dennis
01-14-2007, 07:05 PM
Hmm, yeah... well, sorry about that

thegirlinthecafe
01-19-2007, 10:27 PM
I also have problems that it won't count any hits.

I know I am using the nice URL hack, but even when directly calling index.php?showimage=xx nothing happens.

Should this plugin just be copied to the Addon directory and then it should work? Or is there something more I need to do, something I have missed?

Thanks in advance for any help.

austriaka
01-20-2007, 07:55 AM
There are problems with the original version of the addon, because it uses the "pp_visitors" table for counting. I found out that this is not enough for counting the images, so in the new version there is an own table for that and this should work.
There are only a few things to do left, please be patient for the upcoming of the new version.
If you want to test the development version of image stats 2.0, please send me a private mail to 2@kg3.de

KArin

joey dee
01-21-2007, 09:47 PM
Paul, I found the error.
There are two possible reasons of this behaviour:
1) Your visitors did not call a specified image page but have called only the front page of your blog until now (like http://www.paulsblog.com or http://www.paulsblog.com/index.php without showimage=nnn in adress).
2) You have a mod_rewrite that changes the URL of the called image page so "showimage" is not represented any more.

In both cases The Addon cannot find any image statistics, because no image id is found in the called URIs of your blog.
I changed the behaviour of the addon so if there are no images called, it will show some page statistics instead. It makes the whole thing a bit slower, so I am not very happy with that.
If you want I can send you the updated file of image-stats V1.0 so you can try if this solves your problem.

V2.0 of image-stats is almost finished, so I won't publish the updated Version 1.0 in Pixelpost Addons page.

KArin
Karin,

Im having the same problem here, I downloaded the latest version here: http://pixelpost.org/v1/index.php?x=downloads&details=196 and I got the ERROR on line 218 in the ...include/function.php

http://img256.imageshack.us/img256/539/suntitledimage9ij.jpg (http://img256.imageshack.us/img256/3394/untitledimage5nn.jpg)
Click to Enlarge Image.

So what should I do? wait till there's a new fix or there is something I need to configure? as you mentioned it's calling @ a URL that's not showing an image.

my best,
-Joey Dee

austriaka
01-21-2007, 09:56 PM
Joey, if you send me an email at 2@kg3.de I can send you the almost final release of image stats V2.0

KAirn

austriaka
02-03-2007, 10:33 AM
I just updated the image stats addon to version 2.0.
Please have a look at the first post of this thread: http://forum.pixelpost.org/showthread.php?t=5941

Almost everything is new, the whole counting mechanism has changed and should now count accurate image visits.
The admin part has become very powerful - just try it out and see...
The public part shows not only "image visits this month" but also "image visits today". You can use them together or only one of it.

My very special thanks are going to David "dwilkinsjr" (http://www.dwilkinsjr.com) for always being in place when needed.
I have no words for the big help he was during the work on that addon.
:) Thank you, Dave! :)

Also, I want to thank Dennis "schonhose" (http://foto.schonhose.nl) for a lot of technical advice and time for talking.

Additional testing contributors:
Vernon (http://www.xoverip.info/pb/)
Ingrid (http://www.thegirlinthecafe.com)
Sebastain (http://www.photoblog.sebastian-lauff.de)
Dome (http://www.digitaldome.org/photo/)
Joey dee (http://www.pumatalk.com/photoblog/)
Jean-Pierre (http://www.imagiazone.com)

I hope you will like the addon as much as I had fun writing it.
KArin

Dkozikowski
02-03-2007, 11:08 AM
My very special thanks are going to David "dwilkinsjr" (http://www.dwilkinsjr.com) for always being in place when needed.
I have no words for the big help he was during the work on that addon.
:) Thank you, Dave! :)


Always a pleasure Karin!

The addon looks great. Keep up the great work :)

clickykbd
02-05-2007, 02:01 AM
I'd been seeing a ton of PP users with this addon enabled... finally found it... configuring now. Thanks for the great and useful addon.

sensen
02-05-2007, 10:26 AM
You did a very fine addon, many thanks!

Can you tell me , how i can remove deleted pictures from the stats?

Regards, Alf

austriaka
02-05-2007, 10:42 AM
Can you tell me , how i can remove deleted pictures from the stats?I am sorry, that is not possible within the addon by now. If it is necessary for more people, I can implement that into a new version. But usually the image stats are changing so quickly that it should not concern you for a long time.
If you really feel the need of doing that right now, and if you know well MySQL, you can go into pp database, look for table "image stats", pull out the visits with the deleted image_id and delete them in database.
But I suggest making a backup of your tables first!

KArin

Clavain
02-05-2007, 04:55 PM
Hey that's so cool! Powerfull is the right word for this addon. I'm loving it.
Again big thanks to you austriaka

thegirlinthecafe
02-06-2007, 07:13 PM
This is a fantastic Add-on, thanks for all the hard work ! :-)

Diablo_Gil
02-20-2007, 11:00 PM
I just agree with all thoses congratulations. Very good job. Thanks you !

Gil.

mike
02-23-2007, 03:03 PM
Very nice Addon.
Congrats, very nice job!
Keep em going on !

Cheers, Michael

austriaka
02-24-2007, 09:45 AM
I am very glad you all like it!

cheers
KArin

austriaka
02-26-2007, 12:54 PM
I just made a little update of Image Stats Addon.
Download it here: http://www.pixelpost.org/v1/devfiles/?id=196

There was a bug found: I used the variable $cdate in image stats addon and was not aware that this variable is already used by Pixelpost.
This caused some image-related addons to stop working correctly if installed after image stats addon.

And a little correction of counting mechanism was done: After being forwarded back from commenting image stats addon counted this as a new visit. This was fixed too.

Have still fun with it!
KArin

raminia
02-26-2007, 01:39 PM
When I see nice addons like this, I feel really glad with workspaces and admin addons. Good luck

austriaka
02-26-2007, 09:44 PM
Thanks Ramin,
it is great to receive appreciation from the team :-))

KArin

austriaka
03-01-2007, 07:38 AM
Dear image stats users,
could you please give me feedback if the month change & long time stats update worked properly?

KArin

persianpix
03-01-2007, 03:22 PM
what i noticed yesterday was (the evening of the 28th of feb) that the image stats has already gone to the month of march. does the addon look at the clock on the server side by any chance?

i'm really enjoying the addon so far. what i will find useful is if i could have access to those previous months data :)

austriaka
03-01-2007, 04:52 PM
what i noticed yesterday was (the evening of the 28th of feb) that the image stats has already gone to the month of march. does the addon look at the clock on the server side by any chance?
Do you use the latest release version?
It should use the time difference to GMT you defined in admin options.
Do you see time differences between vistor counting and "real time" visits?
I guess you should set the time difference in options to the time of your server time zone and not to the one of your home, but I am not sure.

i'm really enjoying the addon so far. what i will find useful is if i could have access to those previous months data :)
I know this would be nice, but stats table would grow and grow and would eventually slow down your whole Pixelpost.
So I decided the long time stats were a good compromiss.

KArin

Vernon.Trent
03-02-2007, 04:19 AM
Dear image stats users,
could you please give me feedback if the month change & long time stats update worked properly?

KArin

works fine :)

persianpix
03-02-2007, 06:49 PM
karin, i'm using version 2.0. i have defined the time in the admin options based on my timezone. i belive my server resides at a different time zone but i'm not really sure!

Do you use the latest release version?
It should use the time difference to GMT you defined in admin options.
Do you see time differences between vistor counting and "real time" visits?
I guess you should set the time difference in options to the time of your server time zone and not to the one of your home, but I am not sure.

I know this would be nice, but stats table would grow and grow and would eventually slow down your whole Pixelpost.
So I decided the long time stats were a good compromiss.

KArin

austriaka
03-03-2007, 09:31 AM
Do you see time differences between vistor counting and "real time" visits?

When you upload a new image with "post now", is the time given in image information correct for your local time?

Make a comment on one of your own pictures. Have a look at the time displayed in comments list. Is this correct?

Try to visit one or two image pages when _not_ logged in as admin.
Then go to admin area and look for your visits in "last visited images" (you can use the IP-location links if you are not sure).
Have a look at the time of your visit displayed and compare it to you local time.
Is this correct?

If those all are correct, I don't know why the month update didn't work with the right time and I have to have a look on it.
If they are not correct and all have the same wrong time, you should change your time difference in options to the time zone of your server and not your local time zone.
If some are correct and some not, please tell me the exact time difference of each issue so I can compare.

KArin

Stammix
03-18-2007, 06:04 PM
I am built-in it. It works fine. Thank you.

austriaka
03-18-2007, 06:51 PM
Stammix, I like your photos :-)
KArin

aptass
03-19-2007, 09:49 AM
thanks for a great addon, really like it.
Use both month and day and it gives nice feedback when visitors don't vote or comment.

DrAlzheimer
03-20-2007, 10:53 AM
Thank you for this great addon!

It's far more better than the BBClone Statistics (http://photoblog.dralzheimer.stylesyndication.de/stats/show_detailed.php) i'm currently using.

dhdesign
03-24-2007, 03:11 PM
I really like this addon!

I did find one very small error - just a typo - that should be fixed. On line 369:

<b>IP-adress:</b>

Should be:

<b>IP-address:</b>

Also, when there is no referrer, would it be possible to either display --- or none, rather than just leaving it blank?

Other than that, it's working great! :)

austriaka
03-24-2007, 03:20 PM
Keep hold of Typos you find ;-))

You know the story about persian carpets: women weave slight faults into the workpiece because no human is perfect...
So I won't fix it right now because there is no update planned and it works with brand new version 1.6 without changing :-)

And: great you like it!
KArin

dhdesign
04-11-2007, 05:09 PM
I did find another small issue with this addon that only appears when using it with v1.6beta:

Whenever I have an apostrophe in the image title (example: Kidron Farmer's Market), I am getting a backslash (\) before the apostrophe in the admin panel on the Last Viewed, Most Viewed, and Long Time Stats pages. The filename appears fine everywhere else in the admin section, and on the public website.

This issue did not happen in v1.5.

Any ideas on a fix for this?

Dennis
04-12-2007, 06:18 AM
yeah, in the addon stripslashes has to be used. (provided magic_quotes is off)

dhdesign
04-12-2007, 11:37 AM
I've taken a look at the code, and I have no idea where to add the code for stripslashes. :(

Dennis
04-12-2007, 05:15 PM
Please contact austriaka because she is the author of this addon.

(if I have to provide support for all addons I can quit my daytime job :) )

dhdesign
04-12-2007, 05:43 PM
Hopefully she'll read this thread, and come up with a solution. :)

austriaka
04-15-2007, 01:37 PM
sorry, I've been on holiday...
I will fix it as soon as possible (and the typos too ;-))

KArin

dhdesign
04-15-2007, 01:49 PM
Thanks!

Hope you had a good time while you were away! ;)

austriaka
04-16-2007, 09:35 AM
I fixed it.
You can donwload the updated version at http://www.pixelpost.org/v1/devfiles/?id=196
And yes, I had a good time, you can see it in my Blog ;-)
KArin

Personne
05-31-2007, 11:05 AM
thanks austriaka for this addon it's very great.

Just a question :
What's the tag (I don't find it) to have this informations (like yours) in the comments for example ?

IMAGE STATISTICS:
18 views this month, 18 views today, 274855 blog visitors, 494 photos in blog

austriaka
05-31-2007, 01:05 PM
it is
<strong>IMAGE STATISTICS:</strong><br />
<IMAGE_COUNTER> views this month, <IMAGE_TODAY> views today<br />
<ADVNCD_SITE_VISITORNUMBER> blog visitors, <SITE_PHOTONUMBER> photos in blog<br />

LG
KArin

Personne
05-31-2007, 03:28 PM
Ok thank you
Strange my <ADVNCD_SITE_VISITORNUMBER> don't give me the same number of visitors that yours

austriaka
05-31-2007, 03:50 PM
Ok thank you
Strange my <ADVNCD_SITE_VISITORNUMBER> don't give me the same number of visitors that yours
???
perhaps because I have more (or less) visitors than you???
I don't know what you mean.

KArin

Personne
06-01-2007, 07:23 AM
lol

No I just say that my numbers of visitors are not equal with the <ADVNCD_SITE_VISITORNUMBER> or in the image stat panel.

austriaka
06-01-2007, 07:33 AM
Of course, because the <ADVNCD_SITE_VISITORNUMBER> counts each and any visitor, no matter if an image is viewed or the browse page. And it counts visitors on your site over the time.
The visitor count of the Image Stats Addon counts visits on a single image and only in actual month and day. Since Image Stats Addon provides a lot of information about your visitors, it is not possible to keep this information forever (would exhaust your database). So the Addon deletes the monthly counting every new month beginning and starts with zero again.

The difference between the <ADVNCD_SITE_VISITORNUMBER> and the "Total visits" displayed in the Addon Overview panel comes from the different counting: "Total visits" counts only visits on images, counts an image visit by the same IP only once in a minute and doesn't count your own visits when you are logged in as Admin).
<ADVNCD_SITE_VISITORNUMBER> counts everything (with an IP timeout too)

KArin

Personne
06-01-2007, 11:34 AM
Ok thanks

ampix
06-06-2007, 09:05 PM
Hi KArin! I hope you are doing well. I'm using your pluing "Admin_Statistics 2.0" with PP1.6. I get all the stats except the long term ones. I don't even get the tab to access to it. I did go in the control panel to create the table but it won't do it. I get an error message:

Creation of Long Image Stats Table failed!
Error: Invalid default value for 'visits'

Any idea what I might be doing wrong?

Thanks!

austriaka
06-07-2007, 08:28 AM
it looks as if your MySQL doesn't like it to have empty default values. You are the first one to report this problem.
If you send me your email adress (via PM) I will send you a changed version of the addon

KArin

pengrus
06-20-2007, 07:08 PM
I also got this error message:

"Creation of Long Image Stats Table failed!
Error: Invalid default value for 'visits'"

KArin, could you please also send me a changed version of this addon? I am on pixelpost 1.6. My email is seanpeng [at] gmail.com

Thank you!
Sean

austriaka
06-20-2007, 07:39 PM
I updated the download file at pixelpost.org
http://www.pixelpost.org/v1/devfiles/?id=196

Changes:
fixed the bug when creating the long imagestats table
tables are now automatically optimized with monthly update. Should work faster now :-)

Hope that all works fine because I am on holiday now
KArin

pengrus
06-20-2007, 07:52 PM
Hi KArin,

Thank you for replying while you are on holiday. I hope you are having a wonderful time.

I downloaded it again and found the file is the same as the one I downloaded an hour ago...

austriaka
06-20-2007, 08:02 PM
I downloaded it again and found the file is the same as the one I downloaded an hour ago...
I just tried it and got the corrected file.
Perhaps you have a cached version?
Please try to reload the addons page and download it again (I made one more slight change right now)

KArin
PS: I am still here until tomorrow so you still have a change for answer ;-)

pengrus
06-20-2007, 09:04 PM
Thank you. I tried two more times with Firefox, both the file download link directly and the addon page reloaded, and got the old file. Then I tried IE, and I finally got the updated file.

I uploaded the new php file, and created the Long Time Table. Everything looks great so far.

Very well done addon.

Thanks a lot!

Personne
07-02-2007, 01:39 PM
Hi Karin !

Is it possible to tranform the "most viewed" informations (title, hits, image links and thumbs) in a TAG to show that in a folder ?

austriaka
07-05-2007, 02:58 PM
what do you mean by "in a folder"?
greez
KArin
(still on holiday ;-))

Personne
07-05-2007, 07:51 PM
In the browse template...


Enjoy your holidays;)

dhdesign
08-14-2007, 11:54 PM
Karin -

It seems that DNSStuff is now charging for the city by IP lookups, so that function is no longer working without a membership to their site.

Do you or anyone else here know of another site that we can replace DNSStuff with to do the city by IP lookups?

Thanks! :)

austriaka
08-15-2007, 01:52 PM
right now DNSStuff is still working. The other one, GeoIpTool.com, seems to have problems.
I will watch that out, ok?

iHamad
08-22-2007, 11:12 AM
everything is great on site ..

but in admin page > image-stats >

Last viewed and most viewed

thumbnails are not showing ..
some show and most dont ..


help please

austriaka
08-22-2007, 01:29 PM
please have a look into your code, what <img src... is there for a missing thumbnail?
If you copy the thumbnails address and paste it into the address bar of your browser, does it show the thumb?

iHamad
08-22-2007, 06:56 PM
im so sorry .. i discovered what the error was from ..

it was from old images which i have deleted that still have an id in the DB .. im looking for something to delete these id's so i dont get that error and free my tables from not needed id's


thanks for the support .. the addon is amazing .!!!

Dennis
08-22-2007, 08:36 PM
so you deleted the images... somehow I'm guessing you didn't delete them from the admin panel, but just deleted them from the folder right?

Next time it would be wise to use the admin panel to delete pictures. It makes your job a lot easier because you don't have to remember all the crazy thumbnailnames. And as a bonus, it will also remove them from the database.

Sliced bread was a piece of cake compared to that wonderful coding we did.

iHamad
08-24-2007, 09:27 PM
i deleted the images from admin panel .. not folder ..
but the entries were still in the db of image_statistics .. dont know why ..

although the db for images showed only the avialable .. any how .. i went and removed the table entries for old images in the image_statistics table .. and everything is fine now :)

austriaka
08-25-2007, 08:47 AM
yes, you are right, they are not deleted automatically.
But since the monthy table is emptied every month, that should not be such a problem, is it?
Image Stats Addon counts visits, and there was a visit, even if an image doesn't exist anymore. But yes, you are right, it would make sense to delete the counts of an image if the image is deleted.
I can make an update of Imagestats Addon to get this done.
But be aware that if a deleted image is the most viewed image in a past month and it is deleted from the the long time image stats table too, there is no thumbnail to show anymore in this month, because the longtime stats save only the most viewed image.

FirstGateDreamer
09-14-2007, 02:22 AM
I can't say how much I love this addon!

I particularly like to look into the "last viewed" area. This gives me a sense of how people view my site, if they just look at the most recent or look around through the browse images.

I actually also use it as a prime tool for blocking robots that visit my site. I use a special anti-comment spam device, so when I see that an image has been viewed and the refferer was from a page that doesn't really exist, I just add that IP to my .htaccess file and don't worry about them getting through again (or following any links and eventually getting to your site too!) and minimizing any possible threats in the future.

Koninho
09-17-2007, 06:28 PM
Thanks a lot for this great addon !! It def. improves the way to keep an eye on the site activity.
I was wondering, as i couldn't find it (but i'm really not good into code), if there was a TAG to show the TOTAL views of an image, and not only the MONTHLY one...

Thanks again !

austriaka
09-25-2007, 06:44 AM
I actually also use it as a prime tool for blocking robots that visit my site. I use a special anti-comment spam device, so when I see that an image has been viewed and the refferer was from a page that doesn't really exist, I just add that IP to my .htaccess file and don't worry about them getting through again (or following any links and eventually getting to your site too!) and minimizing any possible threats in the future.
That is cool :-)
I actually receive a lot of "visits" by search engines with spam keywords or crazy referrers, so I am thinking about some security fix (whenever I find some time to work on it ;-)).
It would be great to see your .htaccess file because I still have problems with excluding visitors by IP or black list!

Koninho, this is not possible with my addon because each single image visit is stored in the database and it would become too large if all would be kept forever.
But it should be easy to make a tag for some sign like "this is the most viewed image in month july" for example.

fredbotton
09-30-2007, 11:40 PM
I've been using the image-stats addon for a few months now, used to work perfectly.
This evening, it stopped working, it now gives me a "Image Stats Table is not existing! Please return to addons menu to create and optionally update the table!" error when I lick on the image-stats tab. I've tried to mess around with options in the addon preferences, but it didn't help. It happened some time before midnight, 30th of september. It maybe a problem related to new month?
Public counter is still working on the website though.

Any clue out there? Pleaase 8-)
Fred
(http://parisavant.com/)

dhdesign
10-01-2007, 02:21 AM
I do know that the image stats reset at midnight GMT at the end of the month, not midnight in the time zone I have set in PP. For me, that means I lose 4 hours of stats, because it won't show anything until the server hits midnight ET, then it starts counting again.

Is there any way for the addon to be tied to our timezone, rather than GMT?

austriaka
10-01-2007, 09:25 AM
Image Stats Addon should be working within the time zone you have set in Pixelpost options, it uses exactly the same time schedule which is used for publishing photos or comments.
I remember some troubles with the first versions of Image Stats Addon but I thought I could fix them in the actual version. Still I am not sure if everything is working ok now, it is a very brain confusing theme for scripting and I didn't receive any reviews of people who had this problem with the first version.

Fred, please check if you use the actual version, perhaps you have an older version?
The problem occurs when your personal time is different from your server time (the image stats get then deleted after midnight of server time but you will see the next month stats not sooner as your personal time is after midnight too).
Anyway nothing worse should happen: as soon as you and your server are both after midnight and in the next month the image stats table will be updated and newly created for the new month.

iHamad
10-18-2007, 10:49 AM
amazing addon .. been using it for almost 3 months now .. one thing though ..

in the last viewed ..

would it be possible to not show links from my own website ..

for example i get a link from my browse page as a referer ..

it would be nice to know only when they enter a certain page..

austriaka
10-18-2007, 10:58 AM
The Referrer tells you where the visitor comes from.
It doesn't make sense to hide the visits with your blog in the referrer, because this information shows you how people are browsing in your blog. Most people are interested in this information, so we will better keep it :-)

KArin

iHamad
10-18-2007, 10:43 PM
i guess you have a point .. it was an idea .. but then .. its not a good one :)

and again thanks for the amazing addon .!!

nate1280
10-19-2007, 03:11 PM
Excellent addon austriaka, very much appreciated that you took the time to write this, so I hope I'm not steppin on any toes here.

I've found one small bug, not sure if you're aware of it, or if it's been posted already... But....

On the image stats over view, happened to notice that it was showing the next day 4 hours earlier then it should, thought there was somethin wrong with my GMT setting but double checked that and everything was ok.

I re-downloaded the plugin just to make sure, and same thing was happening. So I went snooping in the php file.

Line: 321:

function img_over($pixelpost_db_prefix, $bot_excl, $bot_incl, $cmonth, $cdatum) {

Noticed this function was using $cfgrow, but it wasn't declared global at the start, like many of the other functions that use it do.

Adding it to the function, like the snippet below, seems to have fixed the future date.


function img_over($pixelpost_db_prefix, $bot_excl, $bot_incl, $cmonth, $cdatum) {
global $cfgrow;


Just went over this quick, but it seems to be missing in one other spot, the function that does the purging of stats and such? Unless I'm totally missing something?

Line 197:

function show_image_stats() {
global $pixelpost_db_prefix;

Should be,

function show_image_stats() {
global $pixelpost_db_prefix, $cfgrow;


Just thought I'd lend a hand, hope you don't mind.

austriaka
11-22-2007, 09:57 AM
I just updated the Image Stats Addon. No version change because the code didn't change, but now NEW there is a check for updates in the Addon page.
Download it here:
http://www.pixelpost.org/extend/addons/image-statistics/download/

fredbotton
12-19-2007, 08:20 PM
Damn. I can't live without Image Stats... but Image Stats seems to live well without me ;)
I still get this message from time to time while clicking on the Image Stats tab:
"Image Stats Table is not existing! Please return to addons menu to create and optionally update the table!"
None of the tricks I've tried fix the problem, the only cure I've found is to delete the Image Stats databases (the hard way). I thought it was happening at the very end of the month, close to midnight. But no, it occurs randomly (apparently), was around 2pm this afternoon...
All three Create Table buttons fail in Pixelpost console.
I'm using Image Stats v2 (tells me I have the latest version) with Pixelpost v1.5.
BTW, the counter continues to increment on the front web page...
Any clue?
Karin, I can email you my Image Stats databases if it helps! (before I wipe everything out again as a cure)...

Fred

austriaka
12-20-2007, 07:06 AM
Fred, I don't know what is happening here.
You are the first one who reports such a problem. I have running it now for almost a year and it never failed.

A few thoughts which might bring us further:
What other Addons do you use? Could it be that the same variable name is used somewhere?
Did you change the table prefix for Pixelpost tables? (what should not bother the Addon but who knows...)
How often are you looking into the Image Stats? Could it be that this misbehaviour happens if you visit the Image Stats Page for the first time in month when it is already a few days or weeks after month beginning?
Image stats addon keeps the entries of the last month(s) as long as you visit the Image stats page. Only then the old month entries are summed up, written into long time stats table and deleted. So if you don't visit the image stats page regularily the image stats table can become really big... (spiders, spammers...)
Do you have a limit of serverspace in your database?

This is the only reason I could imagine: the image stats table becomes too big and stops working because there is no room left.

Go into your mysqladmin and have a look into the structure part of imagestats table: How big is the tables filesize? Is there an "overhead" pointed out? If the overhead becomes too big, the database calls are becoming very slow.
Usually the imagestats table is optimized automatically on month beginning but perhaps this didn't work for you. If you see an overhead, you can manually optimize the table (there should be a link to "optimize" beneath the overhead)

To see the maximum allowed rows of imagestats table, you can check this by using this SQL statement in mysqladmin:
SHOW TABLE STATUS FROM db_name LIKE 'imagestats';

You can also try to add "&errors" to the URL of Image stats page in the Address field of your browser if you encounter this problem and reload the page, perhaps it is showing us the error then.

fredbotton
12-20-2007, 12:38 PM
>A few thoughts which might bring us further:
>What other Addons do you use? Could it be that the same variable name is
>used somewhere?
admin_12CropImage - version 1.0
admin_ping - version 1.0
advanced_stat - version 1.0
calendar - version 1.1.4
copy_folder - version 1.0
current_datetime - version 1.1
paged_archive - version 1.0
referer_spam - version 1.0
slideshow - version 1.0.4
photoblink_thumbs - version 1.0
random_image_url - version 1.0
random_thumb - version 0.3
ratings - version 1.3
35mm_eq - version 0.2
admin_imagestats - version 2.0
no_spam_commenst - version 1

>Did you change the table prefix for Pixelpost tables? (what should not bother the
>Addon but who knows...)
No

>How often are you looking into the Image Stats? Could it be that this misbehaviour
>happens if you visit the Image Stats Page for the first time in month when it is
>already a few days or weeks after month beginning?
Well, twice a day. Sometimes more.

>Image stats addon keeps the entries of the last month(s) as long as you visit the
>Image stats page. Only then the old month entries are summed up, written into long
>time stats table and deleted. So if you don't visit the image stats page
>regularily the image stats table can become really big... (spiders, spammers...)
>Do you have a limit of serverspace in your database?
That I don't now for sure. The database weights 27,4 MB. The whole disk space
(pictures included) is 229 MB out of 6 GB allowed. But I haven't been able to find
the database limit (provider is "1&1" in France - but I guess servers are located
in Germany).

>This is the only reason I could imagine: the image stats table becomes too big and
>stops working because there is no room left.
I wish I knew how to find the database size limit... and how to increase it as well!

>Go into your mysqladmin and have a look into the structure part of imagestats
>table: How big is the tables filesize?
The pixelpost_imagestats table is 18,6 MB, by far the biggest. The second one is
pixelpost_visitors (7,6 MB).

>Is there an "overhead" pointed out? If the overhead becomes too big, the database
>calls are becoming very slow.
Nope...

>Usually the imagestats table is optimized automatically on month beginning but
>perhaps this didn't work for you. If you see an overhead, you can manually
>optimize the table (there should be a link to "optimize" beneath the overhead)
I have "passed" the month several times, and the database seems to have behaved
properly (stats reset, etc).

>To see the maximum allowed rows of imagestats table, you can check this by
>using this SQL statement in mysqladmin:
>SHOW TABLE STATUS FROM db_name LIKE 'imagestats';
This "SHOW TABLE STATUS FROM db199725874 LIKE 'pixelpost_imagestats'" replies
117287 rows, 156 Avg_row_length, 18353680 Data_length,
281474976710655 Max_data_length, 1205248 Index_length, 0 Data_free,
353878 Auto_increment

>You can also try to add "&errors" to the URL of Image stats page in the Address
>field of your browser if you encounter this problem and reload the page, perhaps
>it is showing us the error then
Does not help...

I'll be asking 1&1 about the database size limit in the meanwhile...

Oh, forgot to thank you for your support, I really do appreciate! :)

Fred

austriaka
12-20-2007, 04:07 PM
max data length is long enough I would say.
18 MB for a database table is much but far from too much (mine is 3.2 MB).
So I really have no idea, perhaps it is occasional "server hickup"?

try &errorsall in your url of image stats page (does it show the need of creating the table right now?) and post what comes up then

fredbotton
12-20-2007, 04:32 PM
&errorall did not change the error message.
See screenshot here: http://fredbotton.free.fr/Tempo/errorall.jpg

Fred

austriaka
12-20-2007, 05:15 PM
the error message is not supposed to change, but a lot of notices and warnings should show up as soon as you reload the page with &errorsall.
The imagestats table is still in place?

If yes, please try this one:
open the file admin_imagestats.php and look out for line 201 and 202:
function show_image_stats() {
global $pixelpost_db_prefix, $cfgrow;
right after this part insert this line:
mysql_query("SELECT * FROM ".$pixelpost_db_prefix."imagestats") or die('Error: '.mysql_error());
Upload the changed file to your server (replacing the original one) and load the image stats page.
Now there should be an error message...

fredbotton
12-20-2007, 09:00 PM
Wizardry worked :) The message I get is
Error: MySQL client run out of memory

This command seems to run ok from the website SQL admin pages. It actually lists the database contents.

austriaka
12-21-2007, 05:18 AM
The Error message points that there is a problem with the amount of data to transmit from the Database, it runs out of memory. I have searched the web and this seems to be a problem in PHP/MySQL/Webserver/Clientserver configuration.

It would be interesting to see your phpinfo() output:
create a file with the following code:
<?PHP
phpinfo()
?>
Save it as phpinfo.php and upload it to your webserver. Tell me the link so I can see your configuriation.

I am very interested in that but I don't know if this will bring us one step closer to a solution... So please try the following:
Look out for the lines you changed lately in your admin_imagestats.php and replace the SELECT * query by this one:
function show_image_stats() {
global $pixelpost_db_prefix, $cfgrow;
if($_GET['view']=='image-stats') {
$query = "SELECT * FROM ".$pixelpost_db_prefix."imagestats LIMIT 0,1";

The other point is of course the question why your database table is so big. Do you really have such a mass of visitors? (Your blog idea is really great, I couldn't stop watching it yesterday) Or is it spammers which never come up into your comments but leave their traces in the imagestats table? Or very eager search engine bots?
You can try to use the Referrer Banned List with .htaccess and regularily add IP addresses or keywords from your imagestats entries where you see that you don't want them. This will keep them from being counted in imagestats too.
Anyway I can hardly imagine that the amount of visitors can be the only reason: I know very well known photoblogs where imagestats addon is working without any issues

fredbotton
12-21-2007, 06:34 AM
The LIMIT query brought back stats page to life, see here: http://fredbotton.free.fr/Tempo/statsok1.jpg

Here is the link to phpinfo: http://www.parisavant.com/phpinfo.php. Chinese mandarin to me ;-)

Thanks for the blog idea comment :) I actually don't have that many visits, as you can see from the jpg above. There are some occasional bursts when I get linked somewhere, but it remains calm. Bots visits seem to be on a 10% average. Can't be that.
Spammers, on the other hand, could be an issue as I haven"t really cared about that (apart from activating spam control stuff in Pixelpost config pages).

austriaka
12-21-2007, 08:52 AM
great it is working again.
You use php as CGI module, I know that there are restrictions.
But don't care about that ;-)

fredbotton
12-21-2007, 09:11 AM
Yes, that is great!!
Is it ok if I keep the "LIMIT 0,1" in the code? (erm, what does it do? 8-))

PHP as CGI. Damn. I wish I knew what I'm doing 8-)

austriaka
12-21-2007, 10:17 AM
yes, keep it. I will include it in the next update.
The query just wants to know if the imagestats table is in place, so it is not necessary to call all the entries in the table.
The limit calls just one table entry what makes it much faster and bewares you of problems :-)

PHP as CGI. Damn. I wish I knew what I'm doing 8-)
If you really want to know I'll suggest Google (http://www.google.fr/search?hl=fr&q=%22PHP+en+mode+cgi%22)

fredbotton
12-21-2007, 10:23 AM
Ok, that is fine!

Many thanks for your support, it's been very useful, and it gives some extra value to your great addon!

thr33face
09-07-2008, 06:45 PM
First of all, I want to thank you for this great addon. It's nice to have separate readouts for actual visitors and bots/spiders.

But I have a question:

Does the addon work retroactively?
As in: Does it filter all the logged visits before the addon was installed?

have a nice day.

austriaka
09-08-2008, 05:48 AM
you can fill in the data of pixelpost_visitors table on creation of the imagestats table but it shows not the complete number of visitors (select "Create Table with Visitor Values")

HTH

ranmajen
09-08-2008, 09:03 AM
Can I show the statistics of the last 3 months?

thr33face
09-09-2008, 05:47 PM
thank you

parallax
10-15-2008, 07:43 AM
"Image stats" addon and "top_views" addon result don't match.
I have a photo that has 1573 hits this month but does not appear in the top ten list generated by "top_view". No 1 in the top views list has only 343 hits.
Any idea why this is happening? Thanks

austriaka
10-15-2008, 01:29 PM
I don't know how "top views" addon is counting the visits, so I cannot tell you why there is the difference.
It can be because of bots and spider counting or because of Revisited delay

constant
01-28-2009, 07:41 PM
Hi austriaka+,

Really love the addon. I am a little confused by the count resetting at the end of each month. I haven't yet seen this happen as I haven't yet had a full month of use. I think I understand this limitation - I really need to look at the code to fully understand - but I would think that it would be simple enough to add a "previously viewed" count to the image's data records that keeps track of the totals from previous months.

So when the addon resets the monthly tables it could take the total views for each image and add it to the image's "previously viewed" record. Then have a TAG that adds the "previously viewed" count with the current monthly count to get the current total views for an image.

Does this make sense? Wouldn't that be possible?

austriaka
01-29-2009, 05:52 AM
Hi constant,
thanks for your input.
The limitation to monthly stats is obvious: the addon keeps track of quite a lot of interesting data for each and any visit. Your database would run out of space after half a year if you have a frequently visited blog.
Your idea of keeping the image visits is quite interesting and of course it would be possible. But right now the image stats addon uses tonly its own tables which are strictly bounded to the visits and not to the photos.
Realizing your idea would mean adding an extra field to the pixelpost table. Technical no problem but a medium rewrite of some of the functions.

On the other hand there is the "top views" addon which will do the same thing for you:
http://www.pixelpost.org/extend/addons/top-views/

KArin