PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Bugs From 1.0.0 (http://www.photopost.com/forum/bugs-1-0-0/)
-   -   Use Display Options to sort newest to oldest (http://www.photopost.com/forum/bugs-1-0-0/117812-use-display-options-sort-newest-oldest.html)

Hammerfel March 7th, 2005 11:53 AM

Use Display Options to sort newest to oldest
 
I want the latest images to be at the top in this Display options query.

Here's Sorted by Date Added, Sort Order Ascending:
http://www.joedios.com/dioramas/brow...&cutoffdate=-1

Here's Sorted by Date Added, Sort Order Descending:
http://www.joedios.com/dioramas/brow...&cutoffdate=-1

They're the same thing! How do I get the new images at the top?

ConqSoft March 7th, 2005 12:16 PM

Re: Use Display Options to sort newest to oldest
 
Descending will show the newest at the top.

Hammerfel March 7th, 2005 02:47 PM

Re: Use Display Options to sort newest to oldest
 
But it doesn't. Try it.

ConqSoft March 7th, 2005 02:48 PM

Re: Use Display Options to sort newest to oldest
 
If you set Gallery's default sorting to be descending by date (in AdminCP), it'll work. But using the dropdowns at the bottom doesn't work to change the sort order, I think. (I think I reported that a while back.)

Hammerfel March 7th, 2005 02:51 PM

Re: Use Display Options to sort newest to oldest
 
Ah, so it's a bug.

I don't want an admin-set solution, I want users to be able to use these sorting options the UI displays.

ConqSoft March 7th, 2005 02:52 PM

Re: Use Display Options to sort newest to oldest
 
I can't seem to find the post now, but I remember running into the same issue, and I thought I had posted a report about it... Dunno.

Hammerfel March 7th, 2005 11:34 PM

Re: Use Display Options to sort newest to oldest
 
Ok, my admin friend fixed the mising code and the sorting works now.

If it helps, he said

Quote:

I didn't have time to wade through all the code in browseimages.php tonight
to see exactly why the sort order wasn't being set, but I did create a fix
anyway. I checked $condition['direction'] (that's where the sort order
should be) and found it was blank right before the query, so just above the
query I added:

if (!isset($condition['direction'])) {
$condition['direction'] = iif($_REQUEST['direction'] == 'ASC', 'ASC',
'DESC');
}

That fills in 'direction' with what you set it to in the request if the
code gets that far without setting it itself. It shouldn't get in the way
when the code sets it to DESC or ASC automatically for other types of browsing.

Brian March 8th, 2005 06:22 AM

Re: Use Display Options to sort newest to oldest
 
If you'll look in your browseimages.php file for this code:
Code:

Content visible to verified customers only.
And replace it with this:
Code:

Content visible to verified customers only.
Then that should take care of the problem.


All times are GMT -5. The time now is 09:39 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97