Hmm.. it should not show pictures from unpublished documents by default.. Have you tried to log off and see it then? If the unpublished comes only when logged to manager.. can’t remember how it goes.. But I know that it shouldn’t display pictures from unpublished child documents by default.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
I guess the function doesn’t work anymore then..
In maxigallery class file there is a function that is taken from some Ditto version that get’s the child documents. You could check that if you want to debug it.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
thanks doze
i’ll have a look at the class file
Hi Jan,
you can try to change this line (about line 890) in maxigallery.php
<?php
//retrieve pics by gallery 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']);
to:
<?php
//retrieve pics by gallery id's (query mode)
$query='select mg.* from '.$modx->db->config['table_prefix'].$mg->mgconfig['gtable'].' mg ';
$query.='left join '.$modx->getFullTablename('site_content').' sc on sc.id = mg.gal_id';
$query.=" WHERE (gal_id IN ('" . implode("','", $mg->mgconfig['gal_query_ids']) . "') AND NOT hide='1')";
$query.=' AND sc.published=1 ';
$query.=' ORDER BY '.$orderby.' '.$mg->mgconfig['order_direction'];
$query.=' LIMIT '.$mg->mgconfig['offset'].','.$mg->mgconfig['limit'];
$rs=$modx->db->query($query);
may be there are some bugs. I did not test it!
thanks Bruno! i’ll try it and report back