yeah, then it’s working.
when i don’t remove the line „array_push($pics, $row);“ like u said, the gals without „&pic_query_ids“ are displayed.
but then i have the same problem with the „&pic_query_ids“-galleries - they are don’t displayed.
Here are a snipped of the modified code from my maxigallery.php:
<?php//styling
......................
//retrieve pics by gal id's (query mode)
$rs=$modx->db->select("*", $modx->db->config['table_prefix'].$mg->mgconfig['gtable'], "(gal_id IN ('" . implode("','", $mg->mgconfig['gal_query_ids']) . "') AND NOT hide='1')", $orderby . ' ' . $mg->mgconfig['order_direction'], $mg->mgconfig['offset'].','.$mg->mgconfig['limit']);
} else if (count($mg->mgconfig['pic_query_ids']) > 0) {
//retrieve pics by picture id's (query mode)
$rs=$modx->db->select("*", $modx->db->config['table_prefix'].$mg->mgconfig['gtable'], "(id IN ('" . implode("','", $mg->mgconfig['pic_query_ids']) . "') AND NOT hide='1')",$orderby.' '.$mg->mgconfig['order_direction'], $mg->mgconfig['offset'].','.$mg->mgconfig['limit']);
} else {
//retrieve pics normally (by $mg->pageinfo['id'])
$rs=$modx->db->select("*", $modx->db->config['table_prefix'].$mg->mgconfig['gtable'], "(gal_id='" . $mg->pageinfo['id'] . "' AND NOT hide='1')",$orderby.' '.$mg->mgconfig['order_direction'], $mg->mgconfig['offset'].','.$mg->mgconfig['limit']);
}
$pics = array();
while ($row = $modx->db->getRow($rs)) {
//array_push($pics, $row);//remove this line
$pics[$row['id']]=$row;//add this line
}
//add this loop:
if (count($mg->mgconfig['pic_query_ids']) > 0) {
foreach ($mg->mgconfig['pic_query_ids'] as $picid){
$sortedpics[]= $pics[$picid];
}
$pics=$sortedpics;
}
$outerTplData['picscount'] = count($pics);
..............
thanx,
dave