#1
|
||||
|
||||
Sort "myadopts" page
Is there a way to let users sort their adoptables into the order they want?
|
#2
|
||||
|
||||
anyone? =( My members are requesting this and I've no idea how to implement it.
|
#3
|
|||
|
|||
Could you be more specific?
In what order do they actually want? By the total clicks? levels? names? ascending or descending? Or something more customizable like, they have full control which one is the first, second, third, and so on regardless of the adoptables' stats? |
#4
|
||||
|
||||
More customizable where they can sort which is first,second etc, regardless of the stats =p The other I could do but I don't have any idea how to make it so they can sort them and save the order.
|
#5
|
|||
|
|||
You'll need to create a new table for that
I'm thinking the table would be something like this ----------------------------------- |adoptable_id|sorting_number| ----------------------------------- |_________1|____________2| |_________2|____________3| |_________7|____________1| |_________4|____________1| ... And then when you're fetching the adoptables from the owned_adoptables table, join it with the other table above and order the rows by the sorting_number field. |
#6
|
||||
|
||||
Ok, how would I go about allowing them to actually sort them... and how to join the tables? I've no idea where to start and can follow code but I'm not advanced by any means =p
|
#7
|
|||
|
|||
To allow users to sort their adoptables, you can create a page where it lists all their own adoptables and put a textbox next to each adoptable for them to input the sorting number.
The JOIN query would probably look like this SELECT * FROM adopts_owned_adoptables JOIN adopts_sorting_adoptables ON adoptable_id = aid ORDER BY sorting_number ASC; I think that should do it (for the query part) |
#8
|
|||
|
|||
This is great, I've been dying for something like this for ages! I'll be trying it out soon too after straightening out some other little things and see if it works for me. :)
__________________
Chocolate butterfly cat pudding. o.o And since even the programming on this forum doesnt like me anymore heres my sites address. XD http://felkyocreatures.com/index.php |
#9
|
||||
|
||||
Got it working thanks to an awesome friend. Now my next issue.
Is it possible to give my users a link for other people to see the adoptables they own? EDIT: nm =p friend is doing that as well.. I luuuv this guy! |
#10
|
|||
|
|||
o.o Where did you get this friend and can I get one? :D
__________________
Chocolate butterfly cat pudding. o.o And since even the programming on this forum doesnt like me anymore heres my sites address. XD http://felkyocreatures.com/index.php |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Fairy State" theme by Bobbybighoof (Mysidia 1.3.3) | bobbybig | Templates and Themes | 3 | 07-18-2018 07:54 PM |
Removing of prefix "class", "abstract", "interface" Suggestions | FounderSim | Suggestions and Feature Requests | 3 | 10-05-2014 06:35 PM |
Changing... or "masking" existing URLs | Vaporman87 | Questions and Supports | 7 | 03-03-2014 08:10 PM |
[Updated] AJAX Sortable Adoptables on "myadopts.php" Page | fadillzzz | Mys v1.2.x Mods | 57 | 05-29-2012 03:16 AM |
A php question about changing the "level up" section | coffeeaddict | Questions and Supports | 6 | 02-26-2011 12:08 PM |
What's New? |
What's Hot? |
What's Popular? |