There are probably a lot of different solutions to this, but here's my suggestion.
To put it simply, create a sort order field attached to each image. While the user is sorting, let them go at it, reordering however they want. When they are done, reindex all of the items they were sorting, and update the sort order field in the database. Whether you keep track of the sort order number behind the scenes, or make them input a number doesn't matter. Your sorting routine should basically loop through the numbers, and reorder them from 1 , and the reordered numbers are what you put in the database, and what you use to sort by. If performance is an issue, scheduling reindexing would keep the sort values from getting messy as well. Remember that, when sorting item 1 down, it becomes item 2, and item 2 becomes item 1. Follow that logic through...and the rest is icing on the cake. If you are looking for an idea for a UI and are javascript inclined you can use this if you want. IE only...some complexish DOM2 stuff. http://216.136.31.190/sort/ -- jon mailto:[EMAIL PROTECTED] Wednesday, September 17, 2003, 9:01:41 PM, you wrote: m> I would like to be able let a user reorder photographs. m> Grouping them by type is not the issue, (fashion, runway, nature, etc...) or m> by subcategory (fashion_gender, runway_designer) m> The user wants to be able to add new photographs and reorder them so that m> prefered photos come first. m> My first thought is to have a photoOrder field which the user can update m> with an admin screen (simplified) something like the following: m> photoOrder Number --- photo m> 10 ------------------ [img] m> 15 ------------------ [img] m> 20 ------------------ [img] m> The user can update the 10 (it's in a text field) to a 21 and have the first m> photo appear last. With only a few graphics in each sub category this can m> work fairly well --- but it's REALLY UGLY. m> Better yet would be to be able to move the graphic m> 1. up or down with an arrow (for one at a time) m> 2. send to end / beginning m> 3. have a text box to send a specified amount up or down. m> A simplified example below: m> << < [insert amount] > >> m> I can think of a way to update the records for this to work but eventually m> it would be a real big mess. m> User moves number 33 to behind 55. m> If 56 is there the photoOrder gets designated 55a m> 55b comes after 55a m> (55,55a,55b,56) m> Now with only a few photos, or even a few dozen photos who cares. But in a m> more involved system one would get situation like the following m> (55a1,55a2,55a3,55a4,55a5) m> (55a2a,55a2b,55a2c,55a2d) m> This is ridiculous.( or is it?) m> Is there a way to reorder/organize this field? m> to take a sorted list(of this field) 1-77-203-204-999 and make it m> 10,20,30,40,50 or (1000,2000,3000) m> Gilbert Midonnet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137419 Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

