View Single Post
Old 2018-04-18, 08:29 AM   #21
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,705
Send a message via ICQ to Greenguy
Here's my "fillvar" test for tomorrow:

In our network, we have Latina Porn Girls. It's current set to load 52 random galleries:
Code:
{* PULL THE PERMANENT GALLERIES FROM THE DATABASE *}
{galleries
var=$galleries
type=permanent
format=any
getnew=true
allowused=true
description=true
preview=true
amount=52
previewsize=180x180
category=Latina
sponsor=any
order=RAND()
reorder=RAND()}
<table style="text-align:center;" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
{* DISPLAY ALL OF THE GALLERIES *}
{foreach var=$gallery from=$galleries counter=$counter}
<td align="center" valign="top" style="text-align:center;" width="25%">
<a href="{$gallery.gallery_url|htmlspecialchars}" title="{$gallery.description|htmlspecialchars}"><img src="{$gallery.preview_url|htmlspecialchars}" width="180" height="180" border="2" alt="{$gallery.description|htmlspecialchars}"></a><br><br>
</td>
{insert counter=$counter location=+4 max=48}
</tr><tr>
{/insert}
{/foreach}
</tr>
</table>
I've edited the {galleries} code to this based on the filler_galleries.txt example:
Code:
<table style="text-align:center;" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
{* Load 52 galleries *}
{galleries
var=$galleries
type=permanent
format=any
getnew=true
allowused=false
description=true
preview=true
amount=52
previewsize=180x180
category=Latina
sponsor=any
order=date_approved DESC
reorder=date_approved DESC}

{* Load filler galleries if 52 galleries were not available in the previous galleries section *}
{galleries
var=$fillergalleries
fillvar=$galleries
type=permanent
format=any
getnew=true
allowused=true
description=true
preview=true
amount=52
previewsize=180x180
category=Latina
sponsor=any
order=RAND()
reorder=RAND()}

{* Place the filler galleries at the end *}
{intermix var=$galleries from=$galleries,$fillergalleries location=end}

{* Display loaded galleries as thumbnails in a 4 per row format *}
{foreach from=$galleries var=$gallery counter=$counter}
<td align="center" valign="top" style="text-align:center;" width="25%">
<a href="{$gallery.gallery_url|htmlspecialchars}" title="{$gallery.description|htmlspecialchars}"><img src="{$gallery.preview_url|htmlspecialchars}" width="180" height="180" border="2" alt="{$gallery.description|htmlspecialchars}"></a><br><br>
</td>
{insert counter=$counter location=+4 max=48}
</tr><tr>
{/insert}
{/foreach}
</tr>
</table>
We have these 4 galleries tagged Latina scheduled for tomorrow:

NOTE: There may be more added later today, but at least these 4 will go live tomorrow.

So, assuming I coded it correctly, we should see those 4 in the 1st row, followed by 48 random galleries.

BTW: I'm not doing this out here for all to see to prove anyone wrong - I was gonna do it anyway & since we're talking about it, I might as well "show my work" so that:
1 - If it works, now you know
2 - If it doesn't work OR if someone sees a potential fuckup in my coding, help would be greatly appreciated.

After all, that's what the almost double-digit active posters here do: we help each other
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote