Thats funny. I was thinking about exactly that after I got my eyeballs uncrossed last night. A way to tie the customFields parameters into the snippet call itself, without a direct query statement in the snippet, and using them as a way to alter the display output. I’ll give it a go and report back.
Again, many thanks-
[UPDATE]
That worked like a charm. The only thing was a missing quote so the final Select statement went like this:
<?php
$rs=$modx->db->select(
"*",
$modx->db->config['table_prefix'].$mg->mgconfig['gtable'],
"(gal_id='" . $mg->pageinfo['id'] . "' AND NOT hide='1') ".$conditions."",
$orderby.' '.$mg->mgconfig['order_direction'],
$mg->mgconfig['offset'].','.$mg->mgconfig['limit']);
?>
It looks like there are three statements total total (depending on whether or not gal_id, pic_ids, or is default) are set. So I put the condition statement at the top and then modified the dafault to what you had provided. I could easily make the modification to the other two SELECT statements as well right?
Now all I need to do is figure out how to only choose a date range. (Like last week) Is it possible to compare the date set in the maxigallery picture date field to some other date?
Like in the outer template
[+maxigallery.picture.date:isgt`[[winnerWeek]]`:then=` rest of outer template goes here
and the snippet winnerWeek looks something like this:
<?php
echo date("Y-m-d", strtotime('last Monday -1 week'));
?>
Ill probably have to think about that. Maybe convert the MG date into a timestamp and then compare from there to get there.