i added the following to config.php:
// Set to 1 to hide a section from the What's New block:
$_CONF['hidenewstories'] = 0;
$_CONF['hidenewcomments'] = 0;
$_CONF['hidenewlinks'] = 0;
// new, added by ctm
$_CONF['hidenewpictures']=0;
that let's you enable/disable the display.
then edit lib-common.php to include much of the code for the 'gallery-last-updated' hack:
near the variable declarations:
// added this stuff to try and get last updated pictures in the whats new box
global $GALLERY_BASEDIR;
global $cacheName;
global $cacheDate;
global $cacheRealName;
global $albumName;
global $gallery;
( you might want to define $GALLERY_BASEDIR in config.php )
and then add the following code after the '$retval .= COM_startBlock( $titl....' part:
if ( $_CONF['hidenewpictures'] == 0 )
{
// Any recent pictures ?
$retval .= '<b>' . $LANG01[109] . '</b><br>';
define(Update_CACHE_FILE, "/tmp/block-updates.cache"

;
// here we rebuild the cache file every 6 hours (21600 seconds)
define(Update_CACHE_EXPIRED, 21600);
require_once($GALLERY_BASEDIR ."init.php"

;
include_once($_CONF['path_html'] . "/last-updates.php"

;
if ($profile) {
$timer = time();
}
/* Initializing the seed */
srand ((double) microtime() * 1000000);
// Check the cache file to see if it's up to date
$rebuild = 1;
if (fs_file_exists(Update_CACHE_FILE)) {
$stat = fs_stat(Update_CACHE_FILE);
$mtime = $stat[9];
if (time() - $mtime < Update_CACHE_EXPIRED) {
$rebuild = 0;
}
}
if (($_USER['uid'] < 1)) {
if ($rebuild) {
scanUpdateAlbums();
saveUpdateCache();
} else {
readUpdateCache();
}
} else {
readUpdateCache();
}
$albumDB = new AlbumDB();
$gallery->session->albumName = "";
$numAlbums = $albumDB->numAlbums($gallery->user);
$numPhotos = $albumDB->numPhotos($gallery->user);
$retval .= "(";
$retval .= $numPhotos;
$retval .= " photos in ";
$retval .= $numAlbums;
$retval .= " albums)<br>";
// for loop reads the data from the arrays and renders it on screen
for ($i = 0; $i < $numAlbums; $i++) {
$albumURL = makeGalleryUrl($cacheName[$i]);
$retval .= "<a href=" . $albumURL . " >" . $cacheRealName[$i] . "</a>";
$retval .= "<br> last updated: " . $cacheDate[$i] . "<br>";
}
//$retval .= $LANG01[110] . '<br>';
$retval .= '<br>';
}
I also modified the code a little further down to include an extra <br> in certain parts, becuase if there no new comments or stories, items are separated by a <BR>, but if there are new comments/stories, then items 'cram next to each other. Look at the code, it's pretty simple to find where you need the <br>