forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: newx on January 25, 2011, 08:19:53 pm

Title: Sort Order for Keywords-Tags
Post by: newx on January 25, 2011, 08:19:53 pm
Hey and sorry for my bunch of questions  ::)

I want to reverse the sort order of keyword-tagged archive pages.
I tagged every picture with a keyword - if i now klick that, the pictures show up from old to younger
Is there a way to reverse the order? I want the newest pictures to show first an older last.

Thx

NewX
Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 25, 2011, 08:40:05 pm
Please post a screenshot of the page where you want to change the sort order, as I currently don't know where you want to change it.
Title: Re: Sort Order for Keywords-Tags
Post by: newx on January 25, 2011, 08:43:49 pm
http://img12.imageshack.us/i/frisurensuchergebnissek.png/ (http://img12.imageshack.us/i/frisurensuchergebnissek.png/)

Sorry - 5 MB  :o

Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 25, 2011, 08:47:17 pm
So you want to reverse the order of the search results, am I right? A link to that page would help a lot.
Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 25, 2011, 08:48:39 pm
Well, I think I found that page myself :) Is it that one: http://www.friseur-fragen.de/frisurengalerie/thumbnails.php?album=search&keywords=on&search=multicolor ?
Title: Re: Sort Order for Keywords-Tags
Post by: newx on January 25, 2011, 09:05:33 pm
right link - thought you want no link ;) so i did an screen as requestet :)

reverse the order of the search results - yes - newest styles should appear first.
Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 25, 2011, 09:11:58 pm
thought you want no link ;) so i did an screen as requestet :)
I initially thought it were something only the admin can access ;)


reverse the order of the search results - yes - newest styles should appear first.
Is it okay if it applies to all 'regular' search results or should it only apply to your special links on the right side?
Title: Re: Sort Order for Keywords-Tags
Post by: newx on January 25, 2011, 09:19:01 pm
I think its ok for every search result - the user like to see actual hairstyles first i guess :)
Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 26, 2011, 09:24:31 am
We have different possibilities. If you change the default search order in the config, the search results will be displayed the same way. I think that's not what you're looking for, as it affects the search order of your whole gallery. I think it's the same for the second option (adding the sort=dd parameter to the url), as it affects regular albums as well.

So I think the only option will be to edit a core file. Open include/search.inc.php, find
Code: [Select]
$sort_order = isset($sort_array[$sort_code]) ? $sort_array[$sort_code] : $sort_array[$CONFIG['default_sort_order']];and replace with
Code: [Select]
$sort_order = 'pid DESC';
Title: Re: Sort Order for Keywords-Tags
Post by: newx on January 26, 2011, 10:05:48 am
Works Great!
Thank you so much!

Title: Re: Sort Order for Keywords-Tags
Post by: Αndré on January 26, 2011, 10:30:10 am
Marking accordingly. Please do that yourself (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270631.html#msg270631) in the future. Thanks.