Hi there,
Just a quick one. I'm not sure if this just isn't meant to happen or I'm doing something wrong but when I search by date (like a link from the archive list) only images are returned. I'd like both albums and images to be returned. This happens on the default theme too so it appears not to be a theme thing?
Thanks!
Comments
Thanks!
In order for my archive list to work with albums as well, on my theme's album page where I have the list, I have the following:
`
<?php
function printAllDatesMod($class='archive', $yearid='year', $monthid='month', $order='asc') {
global $_zp_current_search;
if (!empty($class)){ $class = "class=\"$class\""; }
if (!empty($yearid)){ $yearid = "class=\"$yearid\""; }
if (!empty($monthid)){ $monthid = "class=\"$monthid\""; }
$datecount = getAllDates($order);
$lastyear = "";
echo "\n<ul $class>\n";
$nr = 0;
while (list($key, $val) = each($datecount)) {
$nr++;
if ($key == '0000-00-01') {
$year = "no date";
$month = "";
} else {
$dt = strftime('%Y-%B', strtotime($key));
$year = substr($dt, 0, 4);
$month = substr($dt, 5);
}
if ($lastyear != $year) {
$lastyear = $year;
if($nr != 1) { echo "\n\n";}
echo "$year\n
\n";- $month
\n";
\n\n\n";}
if (is_object($_zp_current_search)) {
$albumlist = $_zp_current_search->album_list;
} else {
$albumlist = NULL;
}
echo "
}
echo "
}
?>
`
...and I use this in place of the `printAllDates()`. It's just sticking the date in the words part rather than the date part (and I removed the item count from the list too).