ComusThumbz 문서
관리자 로그인

Controlling New Galleries

This is the standard new query.

{{setquery-new-" periodsshown>-1 order by periodsshown,if(used,1,-refreshdelay),rand() "}}

This is trying to meet the best of many worlds, and doesnt always meet the best of your world.

For example a common question is, 'why does it cause galleries to group together in a non random fashion?'

To achieve more randomness we have to narrow the world to which we are trying to cater.

For example..

{{setquery-new-" periodsshown>-1 order by periodsshown,rand() "}}

This is more random but it ignores how many times a gallery has been displayed, how popular it has been before, and the scheduled date for the gallery.

I'll break the components of the first query down and you can choose if you want to include them or not..

periodsshown>-1
Means pull new galleries when required, on a [build with new] or if {{prodbooster}} or {{allowdupes}} is present. If these conditions are not true then just use todays galleries.

order by periodsshown,
Means begin the sorting by grouping the available galleries by age as measured in days. This part should almost always come before any other sorting rules.

if(used,1,-refreshdelay),
Means to check if the gallery has been used before if so then skip to the next condition of it is new however then give give it priority with the most
recently scheduled galleries at the top of the list.

rand()
Finally we get to random, this just jumbles up whatever is left over.


Hopefully this gives you some options ..

new stuff to top, rotate best stuff, use scheduler, then randomize.
{{setquery-new-" periodsshown>-1 order by periodsshown,if(used,1,-refreshdelay),rand() "}}

new stuff to top, use scheduler, then randomize.
{{setquery-new-" periodsshown>-1 order by periodsshown,refreshdelay DESC,rand() "}}

new stuff to top, rotate best stuff, then randomize.
{{setquery-new-" periodsshown>-1 order by periodsshown,if(used,-rating,-99999999),rand() "}}

new stuff to top, just randomize.
{{setquery-new-" periodsshown>-1 order by periodsshown,rand() "}}