|
|
|
|
|
|
|
![]() |
#1 |
Lonewolf Internet Sales
|
Your code as written pulls 25 galleries sorted by Date Approved, descending... so most recently approved first. The galleries will appear in the order they were approved. The random, as written, is ignored on a Build With New.
If I'm understanding what you want... you need two sections. First section pulls a specified number of new galleries, order = Date_Approved Desc. Second section pulls remaining galleries order = Rand() If you want yesterday's new galleries to just scroll down as more new are added, set the second section to order = Date_Displayed DESC In all cases set reorder to match order. Last edited by Toby; 2018-04-17 at 02:27 PM.. |
![]() |
![]() |
![]() |
#2 | |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Quote:
![]() ![]() ![]() So THAT'S what I need ![]() To save everyone that's following along at home from having to go find that filler_galleries.txt example template to see what it does, I've included it below ![]() Code:
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} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>TGP</title> <style type="text/css"> body { font-size: 12px; font-family: Verdana; } td { font-size: 12px; font-family: Verdana; } .jmbfoot { font-size: 8pt; font-family: Verdana; text-align: center; } .jmblink { font-size: 8pt; font-family: Verdana; } </style> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <span style="font-size: 20pt; font-weight: bold;">TGP</span><br /> Links to {$total_thumbnails|tnumber_format} free pictures and movies!<br /> Updated {date value='today' format='m-d-Y'} </div> <br /> <table align="center" cellpadding="5" border="0"> <tr> {* 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} <td><a href="{$gallery.gallery_url|htmlspecialchars}" target="_blank"><img src="{$gallery.preview_url|htmlspecialchars}" border="0" alt="Thumb {$gallery.type|htmlspecialchars}"></a></td> {insert location=+5 counter=$counter max=15} </tr><tr> {/insert} {/foreach} </tr> </table> <br /> <div align="center"> <b><a href="{$config.install_url}/submit.php">Submit A Gallery</a></b> </div> <br /> </body> </html> |
|
![]() |
![]() |
![]() |
#3 | |
Lonewolf Internet Sales
|
Quote:
|
|
![]() |
![]() |
![]() |
|
|