forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Statistics => Topic started by: deejaymoni on January 18, 2006, 12:39:04 pm

Title: Update History for 1.4.x
Post by: deejaymoni on January 18, 2006, 12:39:04 pm
Hello everybody,
I know that some of you guys are searchin' still this mod here by Nibbler: http://forum.coppermine-gallery.net/index.php?topic=9540.0
for the latest versions of coppermine. So I was trying to modify it and it works but I'm not a coder. So here is my modification that I have tested with coppermine 1.4.0 and 1.4.3

You can see it here in action: http://www.jessica-alba.de/gallery/index.php

Code: [Select]
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.4.x                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002-2004 Gregory DEMAR modified by deejaymoni    //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //
// $Id: anycontent.php,v 1.9 2004/08/02 08:15:13 gaugau Exp $
// ------------------------------------------------------------------------- //

/**
* Coppermine Photo Gallery 1.4.x anycontent.php
*
* This file file gets included in the index.php if you set the option in config
* can be used to display any content from any program, it is always to be edited
* according to tastes and then used
*
* @copyright 2002,2003 Gregory DEMAR, Coppermine Dev Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License V2
* @package Coppermine
* @version $Id: anycontent.php,v 1.9 2004/08/02 08:15:13 gaugau Exp $
*/

/* Days ago to start history */
$days 4;

$end time();
$counter = array();
$info = array();
$FORBIDDEN_SET_UPD = ($FORBIDDEN_SET) ? "AND $FORBIDDEN_SET'';

echo 
'<br />';
starttable("100%""Updates");

for (
$d 0$d $days$d++) {
$start strtotime(date("Ymd")) - ($d*60*60*24);
$result cpg_db_query("SELECT *,a.title AS album_title,p.owner_id AS owner FROM {$CONFIG['TABLE_PICTURES']} AS p,{$CONFIG['TABLE_ALBUMS']} AS a WHERE (APPROVED ='YES') AND (p.aid = a.aid)  AND (ctime BETWEEN $start AND $end$FORBIDDEN_SET_UPD ORDER BY ctime DESC");
while ($row mysql_fetch_assoc($result)) {
$day date("F jS",$row['ctime']);
$counter[$day][$row[album_title]] += 1;
$info[$day][$row[album_title]] = $row;
$users[$day][$row[album_title]][] = $row['owner'];
}
$end $start;
}

$i 0;
$test array_keys($counter);

foreach (
$counter as $day) {
foreach ($day as $album => $number) {
$date $test[$i];
$album_info $info[$date][$album];
echo '<tr><td class="tableb">' .$date": $number new pic".(($number 1) ? 's' '')." uploaded into album '<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>' by ";
$links = array();
foreach ($users[$date][$album] as $u) {
if ($u 0$links[] = "<a href=\"profile.php?uid=$u\">"get_username($u) ."</a>";
}
$out array_unique($links);
echo implode(', ',$out);
echo "</td></tr>";
}
$i++;
}
endtable();
?>

P.S. I didn't know where to put this topic sorry :-(
Title: Re: Update History for 1.4.x
Post by: Beyond_Doubt on March 02, 2006, 12:58:15 am
Excellent :)

Thanks Nibbler for the original, and thanks deejaymoni for the updated.
Title: Re: Update History for 1.4.x
Post by: nicedreams on March 06, 2006, 06:58:03 pm
How do you use anycontent.php?

Jim
Title: Re: Update History for 1.4.x
Post by: Tranz on March 06, 2006, 10:27:39 pm
Search the docs for it.
Title: Re: Update History for 1.4.x
Post by: claude258 on March 10, 2006, 03:59:05 pm
Dates are displayed in english: March 8th

How can I make it displayed in french : Mer 8 mars

Thanks
Title: Re: Update History for 1.4.x
Post by: Nibbler on March 10, 2006, 04:14:49 pm
Same way you did it before.

http://forum.coppermine-gallery.net/index.php?topic=9540.msg110044#msg110044
Title: Re: Update History for 1.4.x
Post by: claude258 on March 11, 2006, 01:45:04 am
Same way you did it before.

http://forum.coppermine-gallery.net/index.php?topic=9540.msg110044#msg110044

It dose not seems to work. The dates have not changed : March 8th
Is it because it is now version 1.4.3 while before it was 1.3.5?
Title: Re: Update History for 1.4.x
Post by: deejaymoni on March 20, 2006, 04:25:33 pm
No it has nothing to do with it. Like Nibbler said same way. Here is an example for it:
Just change in into french date that's all

http://forum.coppermine-gallery.net/index.php?topic=9540.msg135810#msg135810
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 06, 2006, 08:18:36 pm
Thanks! I was looking for exactly this and it works great.  ;)
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 06, 2006, 08:22:51 pm
Sorry, I do have a question. Is it possible to include the entire breadcrumb, such as the category the updated album is in, as well? The categories are fairly important to the organization of my site.

http://photos.zozzledislove.com (http://photos.zozzledislove.com)
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 06, 2006, 08:27:01 pm
Also, can it identify the filetype so that if a .wmv has been uploaded it says, "1 new video uploaded into album..." instead of pic?
Title: statisticbox
Post by: johnnyh86 on July 07, 2006, 11:42:42 am
Anyone who knows how I include my anycontent.php in my index.php?  :-\

This is how my site looks like > http://jooohnny.ath.cx/gallery  :o

Where do you think it's good to have the statsbox?  ???
Title: Re: Update History for 1.4.x
Post by: Joachim Müller on July 07, 2006, 11:48:55 am
@bluebledthesea & johnnyh86: your questions are both not related to the mod that is being discussed on this thread, so you shouldn't have posted them here. RTFM! Please don't clutter this thread with general support questions.

@johnnyh86: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#changing . Someone else has already asked the very same question on this very thread, and TranzNDance has answered the question. Asking once more is not a bright idea!

@bluebledthesea: edit lang/yourlanguage.php. However, if you change the text to read "video", it will be displayed for pics as well. Instead, use the word "file".
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 07, 2006, 03:07:00 pm
@bluebledthesea & johnnyh86: your questions are both not related to the mod that is being discussed on this thread, so you shouldn't have posted them here. RTFM! Please don't clutter this thread with general support questions.

@johnnyh86: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#changing . Someone else has already asked the very same question on this very thread, and TranzNDance has answered the question. Asking once more is not a bright idea!

@bluebledthesea: edit lang/yourlanguage.php. However, if you change the text to read "video", it will be displayed for pics as well. Instead, use the word "file".

I don't see how it wasn't related to the mod. I was suggesting improvements to the code, not asking how to use it. Geez, sorry...
Title: Re: Update History for 1.4.x
Post by: johnnyh86 on July 07, 2006, 03:12:57 pm
@johnnyh86: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#changing . Someone else has already asked the very same question on this very thread, and TranzNDance has answered the question. Asking once more is not a bright idea!


...and where is "catlist/alblist/random,2/lastup,2". Can't find it in index.php or config.php and it doesn't stand in the manual.
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 07, 2006, 03:13:25 pm
May be I should clarify, I was asking to include more of the breadcrumb in what the update mod outputs. Only referring to this mod, nothing else in Coppermine.

Instead of saying just:
"July 6th: 16 new pics uploaded into album 'Mini Pool Party - September 24, 2005' by PJ"

I would like it to say:
"July 6th: 16 new pics uploaded into 'Connecticut College > Mini Pool Party - September 24, 2005' by PJ"

"Connecticut College" being the category the album is in.
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 07, 2006, 03:15:04 pm
...and where is "catlist/alblist/random,2/lastup,2". Can't find it in index.php or config.php and it doesn't stand in the manual.

I'm sending you a PM with the answer johnny.
Title: Re: Update History for 1.4.x
Post by: Joachim Müller on July 08, 2006, 10:50:45 am
No support by PM, it's against the idea to run a forum: questions and answers get posted publicly for the benfit of others.
I already told you not to clutter this thread with unrelated stuff - butt out of it!
Title: Re: Update History for 1.4.x
Post by: bluebledthesea on July 08, 2006, 04:11:52 pm
No support by PM, it's against the idea to run a forum: questions and answers get posted publicly for the benfit of others.
I already told you not to clutter this thread with unrelated stuff - butt out of it!

You just basically said you weren't going to answer his question because it was already answered in the thread, then told us not to clutter it. I chose to PM him because this only made sense following the guidelines you set down.

......
Title: Re: Update History for 1.4.x
Post by: deejaymoni on July 14, 2006, 09:24:42 pm
...and where is "catlist/alblist/random,2/lastup,2". Can't find it in index.php or config.php and it doesn't stand in the manual.

Why not to read the docs or faq you have to put just one thing in your cpg configuration for showing this feature.

Little TIP Album list view -----> catlist/anycontent/alblist/random,2/lastup,2

Title: Re: Update History for 1.4.x
Post by: Joachim Müller on July 15, 2006, 01:55:29 am
I appreciate your readiness to help, yet coppermine core functionality shouldn't be discussed on a mod thread.
Title: Re: Update History for 1.4.x
Post by: alanlai on November 13, 2006, 05:08:19 pm
how to make it show only to "registed users" only?

Title: Re: Update History for 1.4.x
Post by: Hein Traag on November 13, 2006, 05:13:34 pm
alanlai,

try this plugin
http://forum.coppermine-gallery.net/index.php?topic=38148.0 (http://forum.coppermine-gallery.net/index.php?topic=38148.0)

It's this mod but then in a plugin, works wonders and is also adjustable so you can set who can see it.

Cheers!
Hein