Overview -------- This template shows how to use the fillvar option of the {galleries} function. The first galleries section will attempt to load 20 submitted galleries. If there are not 20 submitted galleries available, the second {galleries} function will come into play and will try to pull enough permanent galleries so that you will have 20 total loaded. So, for example, if the first {galleries} section pulls 8 galleries, the second {galleries} section that has the fillvar option set will try to pull 12 more so you have a total of 20. Template Code ------------- {define name=globaldupes value=true} {define name=pagedupes value=false} TGP
TGP
Links to {$total_thumbnails|tnumber_format} free pictures and movies!
Updated {date value='today' format='m-d-Y'}

{* Load 20 galleries *} {galleries var=$galleries preview=true type=submitted category=MIXED amount=20 getnew=true allowused=true order=date_approved reorder=date_displayed DESC, date_approved} {* Load filler galleries if 20 galleries were not available in the previous galleries section *} {galleries var=$fillergalleries fillvar=$galleries preview=true type=permanent category=MIXED amount=20 getnew=true allowused=true order=date_approved reorder=date_displayed DESC, date_approved} {* Place the filler galleries at the end *} {intermix var=$galleries from=$galleries,$fillergalleries location=end} {* Display loaded galleries as thumbnails in a 5 per row format *} {foreach from=$galleries var=$gallery counter=$counter} {insert location=+5 counter=$counter max=15} {/insert} {/foreach}
Thumb {$gallery.type|htmlspecialchars}

Submit A Gallery