Ajax/Javascript to Drag/Drop Sort Pages?

A quick search revealed that I’m not the only one bothered by the lack of drag/drop Page sorting functionality in WordPress.  In 2007, a Brazilian wrote a plugin for WP that does just this during the Google Summer of Code – http://bitsinashortbit.wordpress.com/2007/09/16/the-final-bits-of-gsoc/.

I suppose I might implement this kind of thing in my own blog.  (I think I’d just go in and mod the template pages, in all honesty.) But I certainly can’t do it from my limited access in a blog in WordPress mu.  Someone at the uber-admin level would need to put this functionality into the blog tool.

Why Do This?

  1. Any e-portfolio should enable the author to name the areas of his/her portfolio, and to sort the items in appropriate ways.  The template I’m using in the demo blog sorts via alpha list – totally meaningless, if you ask me.
  2. Drag/Drop functionality is available in other platforms/packages, and even in other areas of WP (notice the widgets sorting).  Why not put it where it matters, like in the pages listing?
  3. In WordPress mu, an individual blog admin has very limited customization options available. Enhanced individual blog admin controls add power without necessarily requiring added coding knowledge.

10 comments

  1. Server security is very important, especially in something that many people need to rely on being stable. You won’t find me arguing for hacks that compromise security. I like your idea that people might request additional permissions, though it seems that a customizable theme like Atahualpa might fit the bill just fine – without the need for the permissions.

    The Academic Commons strikes me as something different from what I’m exploring here in the sandbox. I’m looking at ways students with e-portfolios might be able to customize so they remain engaged in their portfolio, beyond the class or curriculum requirements. Those with a need to hack can buy a domain name and hack their own WP install, as Boone suggested this AM.

  2. Many Thanks! I loaded Atahualpa and will take some time to tinker in the coming days. End-o-term craziness will limit my tinkering for the next few days. Having a template or two that can be tweaked completely addresses the issue. All of you are awesome in your responsiveness.

  3. Themes like Atahualpa (which is awesome, by the way – thanks, Luke, for bringing it to my attention) solve Michael’s problem quite elegantly. I have a sense that most people who want to customize their blogs have an end result in mind, and would just as soon not mess with the raw CSS/PHP if it were possible to avoid it. Anyone who is geeky enough to feel a visceral need for direct access to the code (or “teh code” as I accidentally yet appropriately typed) will probably be running their own install of WP anyway, and in any case is a relatively small subset of users in an ePortfolio situation.

    As for the Commons, we might think about promoting the highly-customizable themes like Atahualpa on the theme selection page. A box at the top of that page that says something like “Interested in really customizing the way your blog looks? Select one of the following featured themes, and then navigate to your Theme Options”.

  4. I’ve installed “My Page Order” and “This Page Links to,” so please feel free to give them a test drive for your drag and drop sorting pleasure.

    I have some security concerns about the Userthemes plugin. I don’t think it’s advisable to give all users, by default, the ability to hack their themes, because doing so would introduce many vulnerabilities for the server. However, I am more than willing to work with users on a case-by-case basis to hack themes and files. This, essentially, is the system that Luke has used at Blogs@Baruch, and it’s one that make sense to me as the admin here.

    I hope that makes sense to you, Michael (and I’m open for debate if you disagree). I want to find a balance between giving users freedom to hack and keeping our server safe. It can be a fine line, but this system — one in which users can hack but those hacks have to be approved by an admin — seems like an acceptable compromise to me. Please let me know whether or not you agree.

    I’ve also added a few new themes — Atahualpa, Thematic, Magatheme, LightWord, Inove, Carrington Blog — so please feel free, again, to play around.

    I’ll end by saying that WPMu is, to my mind, open and flexible almost to a fault: there is very little that it can’t do. How far one wants to push it, and in which directions, is largely dependent on the decisions made by the site admin.

    I’ll try to be a good site admin 😉

  5. A blog on WPMu has all the potential for customization as a single install, save two possible problems: there may at times be a few more steps involved, and some plugins may not work on a WPMu site.

    The Userthemes plugin is key for hacking themes; but it’s problematic to allow a wide community of users access to an open files on your servers (the theme-editor.php file, for instance, wasn’t included in WPMu 2.6, which runs Blogs@Baruch… I’m not sure if it’s there in 2.7…. we’ll soon be doing the upgrade); FTP access for users is difficult at most places, and all but impossible at CUNY. Ultimately, you just don’t want someone you don’t know to be able to execute php on your install. The community is aware of the desire for fuller flexibility and increased user control within WPMu, and is heading in the right direction.

    Your point about GUI themes is right on, and touches on the current direction of development of WP themes… the newer themes (“Atahualpa” comes to mind) are allowing more customization without getting into the CSS (UI in the “Design” menu), and also for “child themes,” (such as with “Thematic”) which allow you to customize a theme by creating a new style sheet for certain elements without touching the core of the original theme. This is great because it retains the integrity of the original and makes dealing with WP’s regular upgrades easier.

    I enjoyed meeting and talking with you at the WAC event, and am happy any time–as I know Matt and the Commons folks are–to talk more about supporting WPMu at CUNY.

  6. Thanks. I’m working WPMU here, and finding that it’s not nearly as customizable as the stand alone WP (I blog in a WP install on my server space), at least not for the individual blogger. I think that a plugin giving css control over themes to the individual blogger will do a lot, especially if there’s a nice GUI for colors. I’ve seen a couple of these in my travels through the WPMU plugin world, but I’m not an admin on this install (or any yet). (Even a UI that offered up mods to the CSS file in a theme would do wonders. I’m getting the sense that the AC is very much an emerging space. It makes sense that a lot of features are still yet to emerge. Don’t know much about the security concerns you reference. BTW, we met at a recent WAC Conference to talk about WPMU; I’ll be looking you up down the road.

  7. This’ll get you drag and drop page ordering, on both pages and subpages. The way that pages display depend on the active theme, but that plugin is a good one.

    Another useful plugin is Page Links To, which will allow you to put a redirect on a page link.

    Finally, I’d encourage Matt to load Userthemes if he hasn’t already, as it will individual iterations of themes on an individual WPMu install (adds a Themes folder to the Blogs.dir/Blog# directory), which allows users to hack– there are some security concerns with this, though, that I’d be happy to talk to Matt about.

  8. Thanks for the vote of confidence, Michael, and thanks, too, for adding your suggestion to the wiki. We’re still working on a viable system for gathering user suggestions and bug reports (the wiki gets messy very quickly). We’re probably going to install Trac (or another program like it) very soon.

    Anyway, as Boone says, we’re anxious to hear feedback and suggestions from members of the community, so please continue to let us know how things are going.

  9. Boone. I’m liking this space. Within 3 hours, two people get back to me with suggestions for making do and an offer to implement some functionality!

    Matthew Gold, commenting on another post, pointed out something I overlooked in the pages functionality. Simply giving the pages different order numbers sorts them the way you want. Not drag/drop, but completely workable.

    You’ll find I posted the drag/drop as a suggestion in the AC wiki area. I’m going to edit that request so it is accurate; you’ll amend it again if/when that drag/drop feature emerges.

  10. Hi Michael. I totally agree that this sort of functionality would be excellent, and is really a must-have in any viable ePortfolio system, if only for the reason that student users are accustomed to the drag-and-droppy goodness that jQuery has brought to so many popular sites. The author of the blog post that you link to above mentioned that he wasn’t planning on packaging it into a real plugin, so implementing it will take a bit of playing around. But it’s something that I will take a look at in the next week or two. From my point of view, it should prove a very viable option, since client-side JS code hardly adds any extra strain to the server (the exception being whatever AJAX calls are included in this plugin). In any case, thanks for bringing it to my attention – and keep up the good suggestions.

Leave a Reply

Your email address will not be published. Required fields are marked *