Some progression.
The code above is not for 1.4, thats probably why it didn't give any results?
Now i have a code that generate result but it's still not getting wrapped into the coppermine theme, i miss the buttons (on top) and much of the layout , however the generation of content is correct, whats missing?
<?php
define('IN_COPPERMINE', true);
define('ANYCONTENT3_PHP', true);
require('include/init.inc.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");
echo '<tr><td class="tableh1"><b><b>Todays updates</b></td></tr>';
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();
?>
Thank you in advance!