|
2018-04-17, 07:31 AM | #1 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
TGPX Question(s)
JustRobert & I have been about why TGPX does some stuff since Day 1. We've been in the "Whatever" status until recently because, with me moving LOR to TGPX, I don't want to "Whatever" this stuff anymore.
The concept of our network is simple in theory: Take 1,000's of galleries (there's 38,000 in there now) & randomly* show them across 65 domains that are 1 page sites & 3 domains that have an index & 55 category pages (so 233 total pages). *The exception to this is "new" galleries (galleries Approved the day before or Approved & scheduled for that day) So, we have the order section of the {galleries} coding set like this: order=date_approved DESC reorder=RAND() I'm pretty sure there's no problem with the "new" galleries - we want them to load 1st & they do. It's the "reorder=RAND()" galleries that are really fucking with us. We want these to be truly random, pulling from any & all galleries tagged with that category (as well as randomly pulling from the entire database if the {galleries} category is set to "MIXED"). What we get is basically the same galleries over & over, sometimes on back-to-back days, sometimes every other day, sometimes every 3-4 days. I've come to the conclusion that we're doing something wrong or we have our settings incorrect, but I just can't figure it out So, knowing all that, here's a screencap of our General Settings: Here's the typical {galleries} coding that we use: Code:
{* PULL THE SUBMITTED GALLERIES FROM THE DATABASE *} {galleries var=$galleries type=permanent format=any getnew=true allowused=true description=false preview=true amount=25 previewsize=180x180 category=Erotic sponsor=any order=date_approved DESC reorder=RAND()} <table align="center" cellpadding="0" border="0" width="100%"> <tr> <td>{* DISPLAY ALL OF THE GALLERIES *} {foreach var=$gallery from=$galleries counter=$counter}</td> <td><a href="{$gallery.gallery_url|htmlspecialchars}" title="{$gallery.description|htmlspecialchars}"><img src="{$gallery.preview_url|htmlspecialchars}" border="0" alt="{$gallery.description|htmlspecialchars}"></a></td> <td>{insert counter=$counter location=+5 max=20}</td> </tr><tr> <td>{/insert} {/foreach}</td> <td></td> <td></td> </tr> </table> Does anyone have any ideas? Need more screencaps or access to the admin? Please LMK because this is bugging the living shit out of me |
2018-04-17, 07:55 AM | #2 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
I almost forgot an example. This is from the index of Porn Luv today:
1st thumb is the last "new" gallery. The rest should be random. The numbers you see on the thumbs represent their order in the admin when you do nothing but click Search Galleries. While #1 is technically not the 1st gallery we ever added to TGPX due to some deletions, I think it's safe to pretend #1 is the 1st gallery ever added, #4 is the 4th gallery every added, #9 is the 9th gallery ever added, etc. I didn't bother to look up where the galleries without numbers are in the system, but 15 random galleries from a 38,000 gallery database & 11 of them basically load in the order they were added? WTF IS THAT?! |
2018-04-17, 08:06 AM | #3 |
Lonewolf Internet Sales
|
You need two sections of galleries with different order commands.
order is used when you 'build with new' reorder is used when you 'build' You need to use order for both sections with different order parameters. The reorder for both sections will be identical to the order parameters. |
2018-04-17, 09:24 AM | #4 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Ok so you're saying that:
Build All/Page With New only looks at order & NOT reorder where Build All/Page only looks at reorder & NOT order Correct? |
2018-04-17, 09:50 AM | #5 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
|
2018-04-17, 11:14 AM | #6 |
Lonewolf Internet Sales
|
Affirmative
|
2018-04-17, 12:09 PM | #7 |
Bow Ties Are Cool
Join Date: Jun 2006
Location: California
Posts: 9,419
|
But we, for the most part, only "build all with new"...
shouldn't it of gone from todays new followed by yesterdays new? Versus, todays new followed by a mess? I'm such a newbie on this. BTW, we have not used this coding for the last year! We were setting up the pages differently to get around this issue and most of the other sites are just set to random. It's only been recently we have been trying to get PornLuv to run properly. |
2018-04-17, 01:03 PM | #8 | |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Quote:
|
|
2018-04-17, 02:17 PM | #9 |
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.. |
2018-04-17, 02:22 PM | #10 |
Lonewolf Internet Sales
|
Here's code from my Latex Vixens site...
It pulls 2 new galleries, by date_approved DESC It pulls 3 old galleries by Rand() It then pulls 30 most recent galleries by date_displayed DESC Code:
{* PULL THE 2 MOST RECENT NEW GALLERIES FROM THE DATABASE *} {galleries var=$galleries type=permanent format=any getnew=true allowused=true description=true preview=true amount=2 previewsize=135x180 category=MIXED sponsor=any order=date_approved DESC reorder=date_approved DESC} {foreach var=$gallery from=$galleries counter=$counter} <td align="center"><a href="TGPX/click.php?id={$gallery.gallery_id|urlencode}&u={$gallery.gallery_url|urlencode}"><img src="{phpcode} echo str_replace("http://www.latex-vixens.com/", "", "{$gallery.preview_url|htmlspecialchars}"); {/phpcode}" width="135" height="180" border="1" alt="{$gallery.description|htmlspecialchars}"></a><br><span class="style8">{phpcode} echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode} </span></td> {/foreach} {* PULL 3 RANDOM NEW GALLERIES FROM THE DATABASE *} {galleries var=$galleries type=permanent format=any getnew=true allowused=true description=true preview=true amount=3 previewsize=135x180 category=MIXED sponsor=any order=RAND() reorder=date_displayed DESC} {foreach var=$gallery from=$galleries counter=$counter} <td align="center"><a href="TGPX/click.php?id={$gallery.gallery_id|urlencode}&u={$gallery.gallery_url|urlencode}"><img src="{phpcode} echo str_replace("http://www.latex-vixens.com/", "", "{$gallery.preview_url|htmlspecialchars}"); {/phpcode}" width="135" height="180" border="1" alt="{$gallery.description|htmlspecialchars}"></a><br><span class="style8">{phpcode} echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode} </span></td> {/foreach} </tr> <tr> {* PULL THE 30 MOST RECENT USED GALLERIES FROM THE DATABASE *} {galleries var=$galleries type=permanent format=any getnew=false allowused=false description=true preview=true amount=30 previewsize=135x180 category=MIXED sponsor=any order=date_displayed DESC reorder=date_displayed DESC} {* DISPLAY ALL OF THE GALLERIES *} {foreach var=$gallery from=$galleries counter=$counter} <td align="center"><a href="TGPX/click.php?id={$gallery.gallery_id|urlencode}&u={$gallery.gallery_url|urlencode}"><img src="{phpcode} echo str_replace("http://www.latex-vixens.com/", "", "{$gallery.preview_url|htmlspecialchars}"); {/phpcode}" width="135" height="180" border="1" alt="{$gallery.description|htmlspecialchars}"></a><br><span class="style8">{phpcode} echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode} </span></td> {insert counter=$counter location=+5 max=25} </tr><tr> {/insert} {/foreach} </tr> </table> Last edited by Toby; 2018-04-17 at 02:26 PM.. |
2018-04-17, 04:14 PM | #11 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Thank you Toby. I do appreciate you holding our hands on this, because I for one am just disgusted & embarrassed by my stupidity
|
2018-04-17, 04:15 PM | #12 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
...and my arrogance. I've been slinging porn for 20 years. Of course I know how things work. Read the directions? HA! That's for newbies
|
2018-04-17, 06:05 PM | #13 | |
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> |
|
2018-04-17, 07:02 PM | #14 | |
Lonewolf Internet Sales
|
Quote:
|
|
2018-04-17, 07:45 PM | #15 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
I get that, but that's not what we want
Forget the 25 galleries thing - let's bump it to 40 & use this site as my example: http://www.bustyporngirls.com/ It's a 1 page site: 4 columns, 10 rows, all galleries tagged Boobs. So let's say today was our launch & everything is new. We want things to look different tomorrow, but we only have 2 new Boobs galleries. So we want those 2 to load 1st (to get them some exposure since they are new) & then the rest to be pulled from the 5,321 other galleries that we have tagged Boobs in the admin. On Thursday, we only have 1 new Boobs gallery. But we want it to at the very least, appear that we did a big update, so that 1 goes 1st, followed by 39 random. Hey, it's new to the surfer Friday we have no new Boobs galleries But, wanna keep up the appearance, so we throw another 40 random galleries at them..... The way you're explaining it, we'd have 37 of the exact same galleries showing up on Wed, Thu and Fri - and Thu & Fri would look exactly the same. Who wants to bookmark a site that basically doesn't "update". That's the method to our madness |
2018-04-17, 08:07 PM | #16 |
Lonewolf Internet Sales
|
There is no way to do a single selection of new galleries first then filled with random galleries when you have a variable number of new galleries. You're trying to sort the two parts differently and you can't do that.
What I do is select new for the first row or two, filled with old, then random for the rest. |
2018-04-18, 01:56 AM | #17 | ||
Bow Ties Are Cool
Join Date: Jun 2006
Location: California
Posts: 9,419
|
First I want to say thanks Toby for your input.
Quote:
Quote:
Maybe this fillvar thing Greenie found might be a possibility. |
||
2018-04-18, 06:58 AM | #18 | |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Quote:
|
|
2018-04-18, 07:17 AM | #19 |
Shift Out / X-On
|
This if from tgpx examples
https://github.com/jmbsoft/TGPX/blob..._galleries.txt Maybe try to do fillvar test |
2018-04-18, 07:39 AM | #20 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
That's EXACTLY what I posted above
And believe me, I am going to test it, probably today for one of tomorrow's updates |
2018-04-18, 08:29 AM | #21 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
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> 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> 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 |
2018-04-18, 09:28 AM | #22 |
Lonewolf Internet Sales
|
fillvar looks like it's supposed to pull a variable number of galleries for a second section. Will be interested in how the test works.
Last edited by Toby; 2018-04-18 at 09:33 AM.. |
2018-04-18, 09:46 AM | #23 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Well, yeah. That variable is based on the number of galleries that didn't fill the 1st part. Using my test for tomorrow, it should pull 48 of them because is gonna try to load 52 matching galleries & will only find 4.
|
2018-04-18, 11:10 AM | #24 |
You can now put whatever you want in this space :)
|
I couldn't wait. I would have to rebuild it now.
|
2018-04-18, 02:53 PM | #25 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
That dawned on me as I was driving the ASSIL home So I changed the scheduled date to today for the 4 galleries:
And.............. IT WORKED!!! Here's the thumbs again so you don't have to scroll back up 1st I did a Build New: Then, for shits & giggles, I did just a Build: |
|
|