Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Gallery statistics by date  (Read 35912 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Gallery statistics by date
« on: August 11, 2006, 11:29:38 pm »

I wanted my 10,000th post to be useful, so have this code. ;)

This script will give you an overview of pictures, comments and user registrations per year, month and day over the life of your Coppermine gallery. It is suspiciously similar to the stats feature in SMF.

Demos:

http://www.ic-gallery.com/stats.php
http://www.neeth.info/galerija/stats.php

From the attached file, stats.php goes into your coppermine folder and the images go into your images folder.
Logged

LilAngel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Gallery statistics by date
« Reply #1 on: August 26, 2006, 10:07:42 am »

Awesome plugin, very interesting to see!  :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery statistics by date
« Reply #2 on: August 28, 2006, 09:39:39 am »

Not a plugin though, but a mod.

@Nibbler: should this be added to the devel branch?
Logged

warbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Gallery statistics by date
« Reply #3 on: September 27, 2006, 12:12:32 am »

It won't work on my 1.4.9 installation. I get "Critical error     
   
There was an error while processing a database query"

, when clicking a month (eg. stats.php?year=2006&month=9). The general statistic seems to work (with eg. stats.php?year=2006). Any ideas about what could be wrong?

versioncheck.php says:
 Total files/folders checked:      244
Mandatory files missing:    0
Optional files missing:    0
Files left over from outdated Coppermine version:    0
Outdated file versions:    0
   

Cheers,
Henrik
Logged

Nibbler

  • Guest
Re: Gallery statistics by date
« Reply #4 on: September 27, 2006, 01:01:27 am »

Enable debug mode and post the mysql error message you get (not the entire debug output) when you replicate the error.
Logged

warbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Gallery statistics by date
« Reply #5 on: September 27, 2006, 09:57:05 am »

While executing query "SELECT DAY(msg_date) AS period, COUNT(*) AS number
            FROM cpg148_comments
            WHERE YEAR(msg_date) = 2006
            AND MONTH(msg_date) = 9
            GROUP BY period
            ORDER BY period DESC" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '(msg_date) AS period, COUNT(*) AS number
            FROM cpg148_comme

Additional info:

SELECT DAY(msg_date) FROM cpg148_comments
gives
 MySQL said:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '( msg_date )
FROM cpg148_comments LIMIT 0, 30' at line 1

If I change "DAY" to "MONTH" I do not get the syntax error.

Thanks,
Henrik
Logged

warbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Gallery statistics by date
« Reply #6 on: September 27, 2006, 10:06:47 am »

Additional question: On http://www.neeth.info/galerija/stats.php you also have a "views" column. How do I enable that?

Cheers,
Henrik
Logged

Nibbler

  • Guest
Re: Gallery statistics by date
« Reply #7 on: September 27, 2006, 12:06:57 pm »

Try changing DAY to DAYOFMONTH in the code. Views is not part of this mod.
Logged

warbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Gallery statistics by date
« Reply #8 on: September 27, 2006, 12:28:17 pm »

that helped and stats.php now works as expected, thanks for your support!

Actually, it was the view count statistics I was interested in. Is it possible to get that feature somehow?

Cheers,
Henrik
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Gallery statistics by date
« Reply #9 on: November 13, 2006, 05:23:04 pm »

Thanks for the mod.

Attached a dutch language version of the stats.php

Cheers!
Hein
Logged

Master of Disaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
Re: Gallery statistics by date
« Reply #10 on: January 28, 2007, 01:48:45 am »

@ Nibbler: Thanks for this nice Mod!
Could you please post your version of the stats.php, which displays all tables of stats like here?
I'm using CPM 1.4.10 with the water_drop theme and when the stats page loads, I see the margins of the stats bars but when the page has loaded completely, the bars disappear and in the single cells simply the numbers for each stat are shown.
And the expand.gif and collapse.gif are not displayed at all.

Code: (PHP Notices) [Select]
/include/logger.inc.php

    * Warning line 142: filemtime() [function.filemtime]: open_basedir restriction in effect. File(logs/..) is not within the allowed path(s): (/srv/www/web322/html/:/srv/www/web322/phptmp/:/srv/www/web322/files/:/srv/www/web322/atd/)
    * Warning line 142: filemtime() [function.filemtime]: stat failed for logs/..
    * Warning line 155: unlink() [function.unlink]: open_basedir restriction in effect. File(logs/..) is not within the allowed path(s): (/srv/www/web322/html/:/srv/www/web322/phptmp/:/srv/www/web322/files/:/srv/www/web322/atd/)
    * Warning line 51: fopen(logs/global.log.php) [function.fopen]: failed to open stream: Permission denied
    * Warning line 52: fwrite(): supplied argument is not a valid stream resource
    * Warning line 53: fwrite(): supplied argument is not a valid stream resource
    * Warning line 54: fclose(): supplied argument is not a valid stream resource

/plugins/final_extract/include/init2.inc.php

    * Warning line 30: mysql_free_result(): supplied argument is not a valid MySQL result resource

How can I fix that problem?

Thank you in advance & greetings
René
Logged

Nibbler

  • Guest
Re: Gallery statistics by date
« Reply #11 on: January 28, 2007, 02:03:54 am »

You probably forgot to upload the images. My file is too customised to be of much use to anyone else. The extra tables are from http://forum.coppermine-gallery.net/index.php?topic=23945.0, a different mod.
Logged

Master of Disaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
Re: Gallery statistics by date
« Reply #12 on: January 28, 2007, 02:12:00 am »

You probably forgot to upload the images. My file is too customised to be of much use to anyone else. The extra tables are from http://forum.coppermine-gallery.net/index.php?topic=23945.0, a different mod.
I uploaded the images into the main directory where also the stats.php is.

Could you post your stats.php?
If you don't want to post it here, you could send it to me via mail.
How can I add a column with the number of views in the table?

René
Logged

Master of Disaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
Re: Gallery statistics by date
« Reply #13 on: January 28, 2007, 02:14:22 am »

I saw in the stats.php that the images have to be in /images.
I added them in /images so they are displayed now.
Logged

Nibbler

  • Guest
Re: Gallery statistics by date
« Reply #14 on: January 28, 2007, 02:22:08 am »

From the attached file, stats.php goes into your coppermine folder and the images go into your images folder.

As per the instructions.

Script attached to this post.
Logged

oboi

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Gallery statistics by date
« Reply #15 on: February 02, 2007, 01:16:24 am »

Could you post your stats.php?
If you don't want to post it here, you could send it to me via mail.
How can I add a column with the number of views in the table?

René

I too am VERY interested in the modified version with "views". May I request it as well. Here or in an email to me would rock. thanks!
Logged

inspectaclueso

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Gallery statistics by date
« Reply #16 on: July 10, 2009, 10:34:58 am »

Hi there,

I have modified Coppermine to suite the needs of a recruitment company who make video interviews of candidates and employers log in to view the videos.

www.sanzavideo.com is the domain.  You can use coppermine as the username and password.

I have installed the mod from this thread and searched the forums however I have not been able to find reference to a stats. page that can display all the files by date added/uploaded.

The purpose of this is they want to be able to easily see C.V.'s and videos which are over so many weeks or months old so they can update them.

Can you please advise if there is anything like this currently available and if not can it be achieved?

Thanks in advance
Jason

 
Logged

Nibbler

  • Guest
Re: Gallery statistics by date
« Reply #17 on: July 10, 2009, 11:18:52 am »

The search function has a date range. Please don't ask unrelated questions on mod threads.
Logged
Pages: [1]   Go Up
 

Page created in 0.128 seconds with 19 queries.