Jump to content

Recommended Posts

I've written a Content Manage System for a web site that will allow users to post entries through the system, then have the items show up on a web site.  The data is being stored in a MYSQL database

 

Right now, on the web site, I'm just displaying them in a Newest at the top, oldest at the bottom format.

 

How could I give the users access to control the order the way the entries are displayed on the page.  Rather than just the standard order.

By order, you mean oldest at top and newest at bottom? It's not exactly clear. But you can do it by columns, assuming the database types are as they should be. Just have a link for each column that links to the same page, passing some query strings specifying what column to sort and in what order. If the user clicks on that same link again, it should go in the reverse order. I'm sure you've seen something like this before on teh web. :)

  • 1 month later...

Sorry for the delayed reply.  I actually want to do it so that I see a list of all the records, but lets say I want to only take the 3rd record and move that to the top.  I want to create a way so that the users using the system can easily do it.

There are a few javascript libraries that can help you do this as a drag and drop feature, which would be better than having an up/ down arrow to bring the record to the top.

 

If you want to save the changes per user, you will need a table to store the order of the records for each user.

There are a few javascript libraries that can help you do this as a drag and drop feature, which would be better than having an up/ down arrow to bring the record to the top.

 

Just don't forget about Graceful Degradation so that people that have JS disabled (home or corporate) can fall-back to the up/down-system.

it would be a change that all users could see

 

Then it will act as some sort of vote-count. Just add it as a field to the post so that on each click the total value is incremented. You would display them sorted based on this field.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.