Not Solved How would I go about making a user script?
Not Solved
Shouldn't be too hard then, but it won't be a little 10 minute edit either. Here's how I'd do it (admittedly with no knowledge of how MyAwards actually displays the awards):
Create a new column in the users table, call it myawards_order or something similar and make it a VARCHAR. This column is going to store a comma (or whatever delimiter you want) separated list of the award order by award id. You'll then need to modify MyAwards to display user awards in the order of the myawards_order column.

As far as the user's ability to edit the order, I'd probably just make a new page that links from the MyAwards page or usercp, whichever is more convenient/more obvious to the user. The absolute simplest way would be to display all of their awards with the appropriate award ID next to them, and have the user fill in a simple text box with a comma separate list of the ids in the order they want and submit that. Take that input, sanitize it obviously, do basic validation to make sure its all numeric and all the awards exist and belong to the user, and throw it in the db and give em a simple success/fail message.
My Plugins: [1.8]|[1.6]

** Selling custom plugin that enables Bitcoin payments. PM me if interested in purchasing! **

Messages In This Thread
RE: How would I go about making a user script? - by fizz - 2016-12-15, 05:25 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)