The album filter doesn't work on PhotoPlog currently. I've been mucking around with it for the last two hours or so, and I just cant get it to work correctly. It just doesn't seem to populate the dropdown so that the filter can apply.
The select in the catagories.php seems correct:
Code:
/*
###### Select statement for useralbums or categories ######
*/
function albums_select ()
{
global $db_prefix;
global $userid;
$albums_select = "
SELECT catid, title
FROM " . $db_prefix . "categories
ORDER BY title
";
return $albums_select;
}
I can't seem to figure out what photo_popup.php does with it from there:
Code:
/*
###### What album dropdown ######
*/
if ($allow_albums AND $albums_possible)
{
if (!$other_db)
{
$result = $db->query_read(albums_select());
}
else
{
$result = mysql_query(albums_select());
}
$album_options = "<div style=\"whitespace: nowrap; display: inline;\"><strong>" . $vbphrase[photo_popup_album_select] . ":</strong>
<select name=\"alb\" onchange=\"this.form.submit();\">";
$album_options .= "<optgroup label=\"" . $vbphrase[photo_popup_which_albums] . "\">";
$album_options .= "<option value=\"all\">" . $vbphrase[photo_popup_all_albums] . "</option>";
echo $album_options;
echo "a";
while (list($catid, $catname) = @ mysql_fetch_row($result))
{
if ($which_album == $catid)
{
$selected = " selected=\"selected\"";
}
$album_options .= "<option value=\"" . $catid . "\"" . $selected . ">" . $catname . "</option>";
$selected = FALSE;
}
$album_options .= "</optgroup></select></div>";
}
I *think* it's getting messed up here:
Code:
while (list($catid, $catname) = @ mysql_fetch_row($result))
because it's selecting catid and title. When I echo out $catid and $catname it doesnt return anything.
I'm stumped.