Sorting of wallpapers
1 Page: [ 1 ]
Hi!
First of all: sorry if I am selfish. I just browsed AP and ended up browsing my favs again to pick a wallpaper for the pc desktop at work. Then suddenly I remembered the title of the wall (or one word at first) and was looking for a way to sort the wall by title instead by date (descending).
I don't know how AP works - but if it is database based (and I think it is) - it might actually be pretty easy to add sorting support, as there are only a few mysql commands one would have to add/change.
Again: please excuse me if I am selfish. I don't - by any means - want to upset the programmers of this page - as they do really an outstanding work!
I just miss such a feature and it would be great if it were possible to sort fav walls and maybe also walls one browses in a category (like: if a category is big and one wants to sort by names instead of by last posting).
Thank you and sorry if I upset someone.
Aoi.
First of all: sorry if I am selfish. I just browsed AP and ended up browsing my favs again to pick a wallpaper for the pc desktop at work. Then suddenly I remembered the title of the wall (or one word at first) and was looking for a way to sort the wall by title instead by date (descending).
I don't know how AP works - but if it is database based (and I think it is) - it might actually be pretty easy to add sorting support, as there are only a few mysql commands one would have to add/change.
Again: please excuse me if I am selfish. I don't - by any means - want to upset the programmers of this page - as they do really an outstanding work!
I just miss such a feature and it would be great if it were possible to sort fav walls and maybe also walls one browses in a category (like: if a category is big and one wants to sort by names instead of by last posting).
Thank you and sorry if I upset someone.
Aoi.
divStaras there are only a few mysql commands one would have to add/change.
There shouldn't need to be any changes to "mysql commands". A change in the php scripting would potentially allow for this sorting though as it interprets the SQL database.
Hm... really?
I know that normally you would get something like GET['sort'] (sort is something one can select and something that is appended to the address later - like .php?sort=time,name for example)
this could be handled by the script with lets say a "switch" and a few "case"s. And depending on that, the line where the variable is read by mqsql (and later "mysql_fetch"ed), would be changed to something like:
$wpadd = mysql_query("SELECT WPADD from AP_DB where category=".$_GET['category']." order by ".$_GET['sort'].");
in the line above you wouldn't even need the switch->case thing - even though I am not sure if one could write it like that or if it might lead to problems and one would have to analyze $_GET['sort']. In any case - one would have to "encode" the URL, so that special symbols wouldn't get lost.
And then just have a drop down menu, where one could pick the sorting type he/she likes.
Well anyway sorry here. ^^;
I know that normally you would get something like GET['sort'] (sort is something one can select and something that is appended to the address later - like .php?sort=time,name for example)
this could be handled by the script with lets say a "switch" and a few "case"s. And depending on that, the line where the variable is read by mqsql (and later "mysql_fetch"ed), would be changed to something like:
$wpadd = mysql_query("SELECT WPADD from AP_DB where category=".$_GET['category']." order by ".$_GET['sort'].");
in the line above you wouldn't even need the switch->case thing - even though I am not sure if one could write it like that or if it might lead to problems and one would have to analyze $_GET['sort']. In any case - one would have to "encode" the URL, so that special symbols wouldn't get lost.
And then just have a drop down menu, where one could pick the sorting type he/she likes.
Well anyway sorry here. ^^;
Oh so you mean like have an option of
Sort by Date ::: Sort by Title ::: Sort by Username
and all that stuff? o.O
Sort by Date ::: Sort by Title ::: Sort by Username
and all that stuff? o.O
Why are you giving advice on how to do this when you haven't the slightest idea how the gallery works? Whats more you're recommending inserting superglobals that can be altered by the user into a mysql query, not to mention using double quotes in a query line then escaping them to insert variables?!
This thread is an insult to the site.
This thread is an insult to the site.
1 Page: [ 1 ]





