Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   TGPX Question(s) (http://www.greenguysboard.com/board/showthread.php?t=69476)

Greenguy 2018-04-17 07:31 AM

TGPX Question(s)
 
JustRobert & I have been |banghead| 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 |banghead|

So, knowing all that, here's a screencap of our General Settings:
http://www.pornluv.com/TGPX-General-Settings.jpg

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()}













{* DISPLAY ALL OF THE GALLERIES *}
{foreach var=$gallery from=$galleries counter=$counter}
{$gallery.description|htmlspecialchars} {insert counter=$counter location=+5 max=20}
{/insert}
{/foreach}

I should mention that ALL galleries are "type=permanent" (we edit the submits by hand). Not sure if that matters.

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 |banghead|

|shake|

Greenguy 2018-04-17 07:55 AM

I almost forgot an example. This is from the index of Porn Luv today:

http://www.pornluv.com/PornLuvIndexRandom.png

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?!

Toby 2018-04-17 08:06 AM

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.

Greenguy 2018-04-17 09:24 AM

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?

Greenguy 2018-04-17 09:50 AM

http://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crophttp://rs107.pbsrc.com/albums/m314/s...h=210&fit=crop

Toby 2018-04-17 11:14 AM

Quote:

Originally Posted by Greenguy (Post 551190)
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?

Affirmative

JustRobert 2018-04-17 12:09 PM

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.

Greenguy 2018-04-17 01:03 PM

Quote:

Originally Posted by JustRobert (Post 551208)
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.

Stop asking question in public. You're gonna embarrass us that much more|lol|

Toby 2018-04-17 02:17 PM

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.


{/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}
       
{/foreach}
     
     
{* 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}
       
{insert counter=$counter location=+5 max=25}

{/insert}
{/foreach}
     
   
Toby 2018-04-17 02:22 PM

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}
       
{$gallery.description|htmlspecialchars}{phpcode}  echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode} {$gallery.description|htmlspecialchars}{phpcode}  echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode}
{$gallery.description|htmlspecialchars}{phpcode}  echo strtoupper("{$gallery.date_displayed|tdate::'j-M-Y'}") {/phpcode}

That fills the first 7 rows. I then have 3 more sections of 7 rows (35 galleries each) also order by date_displayed DESC
Greenguy 2018-04-17 04:14 PM

Thank you Toby. I do appreciate you holding our hands on this, because I for one am just disgusted & embarrassed by my stupidity |facepalm|

Greenguy 2018-04-17 04:15 PM

...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|lol|

|facepalm||facepalm||facepalm||facepalm||facepalm||facepalm|

Greenguy 2018-04-17 06:05 PM

1 Attachment(s)
Quote:

Originally Posted by Toby (Post 551216)
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.

As I read this, one thing struck me as odd: We want to 1st load any & all new galleries when we Build With New, followed by random galleries to fill out the rest of the area (in my example, 25 total galleries) But your method says we have to pull "a specified number of new galleries". These are for category pages, so before each Build With New, we'd have to figure out how many new galleries we have for each of the 55 category pages & adjust the code based on how many new galleries we'd have (if any). That seems really time consuming, so I looked in the |scared| documentation |pokefun||greenguy| which is where I found this:

http://www.greenguysboard.com/board/...1&d=1524002473

So THAT'S what I need |thumb

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}




  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}











Toby 2018-04-17 07:02 PM

Quote:

Originally Posted by Greenguy (Post 551226)
As I read this, one thing struck me as odd: We want to 1st load any & all new galleries when we Build With New, followed by random galleries to fill out the rest of the area (in my example, 25 total galleries) But your method says we have to pull "a specified number of new galleries".

If you set allowused=true it will fill section one with old galleries if there aren't enough new. If there are more new than needed it will leave them for the next update. If you're sorting by date_approved, those used galleries will be the most recently approved from the prior updates.

Greenguy 2018-04-17 07:45 PM

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 |loony|

Toby 2018-04-17 08:07 PM

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.

JustRobert 2018-04-18 01:56 AM

First I want to say thanks Toby for your input.

Quote:

Originally Posted by Toby (Post 551235)
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.

That's what I thought or at least that has been what I've seen trying all sorts of stuff recently.

Quote:

Originally Posted by Toby (Post 551235)
What I do is select new for the first row or two, filled with old, then random for the rest.

This IS what we've been sorta doing until this recent round of experimentation.

Maybe this fillvar thing Greenie found might be a possibility.

Greenguy 2018-04-18 06:58 AM

Quote:

Originally Posted by Toby (Post 551235)
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.

Then what does this fillvar thing I posted above do?

pc 2018-04-18 07:17 AM

This if from tgpx examples
https://github.com/jmbsoft/TGPX/blob..._galleries.txt

Maybe try to do fillvar test

Greenguy 2018-04-18 07:39 AM

That's EXACTLY what I posted above :D

And believe me, I am going to test it, probably today for one of tomorrow's updates |thumb

Greenguy 2018-04-18 08:29 AM

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()}


{* DISPLAY ALL OF THE GALLERIES *}
{foreach var=$gallery from=$galleries counter=$counter}

{insert counter=$counter location=+4 max=48}

{/insert}
{/foreach}


{$gallery.description|htmlspecialchars}

I've edited the {galleries} code to this based on the filler_galleries.txt example:
Code:



{* 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}

{insert counter=$counter location=+4 max=48}

{/insert}
{/foreach}


{$gallery.description|htmlspecialchars}

We have these 4 galleries tagged Latina scheduled for tomorrow:
http://www.pornluv.com/llist/thumbs/43566.jpg?560445743 http://www.pornluv.com/llist/thumbs/...jpg?1330952990 http://www.pornluv.com/llist/thumbs/...jpg?1787894615 http://www.pornluv.com/llist/thumbs/...jpg?1647552049
NOTE: There may be more added later today, but at least these 4 will go live tomorrow.

So, assuming |couch| 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 |shake|

Toby 2018-04-18 09:28 AM

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.

Greenguy 2018-04-18 09:46 AM

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.

ArtWilliams 2018-04-18 11:10 AM

I couldn't wait. I would have to rebuild it now.

Greenguy 2018-04-18 02:53 PM

Quote:

Originally Posted by artwilliams (Post 551262)
I couldn't wait. I would have to rebuild it now.

That dawned on me as I was driving the ASSIL home :D So I changed the scheduled date to today for the 4 galleries:

And..............

























































IT WORKED!!! |banana||bananna||banana||banana||bananna|

Here's the thumbs again so you don't have to scroll back up :D
1st I did a Build New:
http://www.latinaporngirls.com/fillvarTestBuildNew.png

Then, for shits & giggles, I did just a Build:
http://www.latinaporngirls.com/fillvarTestBuild.png

http://s2.quickmeme.com/img/a9/a9ed8...54cb9b2c59.jpg


All times are GMT -4. The time now is 03:41 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc