:: Archive for March 9th, 2006 ::

Sorting sortables and dragging between lists with Scriptaculous

Posted on March 9th, 2006 in Web Development by Greg

I’ve put up an example page that takes advantage of a number of Scriptaculous features to allow the following:

  • Drag and drop items within a group
  • Drag and drop items between a group
  • Drag and drop groups
  • Create new groups and drag items into the new group

In doing this, I used a couple Scriptaculous features I hadn’t used before:

  • Many of the options in creating sortables to limit where the item could be dropped
  • The Bulider object to create new groups
  • The Sortable.sequence function to get the order of items in a sortable as a JavaScript array

A lot of people have posted comments here asking if there is a way to drag items between lists. Obviously, Scriptaculous has provided this functionality for a long time, but there aren’t many examples out on the web showing how to use it…so my new example page is an attempt to show it off – congrats to Thomas Fuchs for putting together such a useful library that is such a pleasure to use.


gCards 1.45 released

Posted on March 9th, 2006 in gCards, PHP by Greg

I just uploaded gCards version 1.45 – you can get it here. This should hopefully fix all of the issues people had with the authentication. Basically when it was written I used a mySQL specific function called ‘password’ for creation of and validation of the users password. MySQL changed this in one of there versions – 4.x I think, so anyone using newer versions of mySQL couldn’t quite login to the application. I’ve updated gCards to store the password as an md5 hash of the real password, so that should hopefully stand the test of time, as its not specific to any mySQL version…

For users upgrading…it is very important to note that upon running the setup.php file, all passwords will be set to the same as the username. For example, if i had gCards 1.44 with a username of bobbyjoe and a password of schweenard, after running setup.php I would login with bobbyjoe/bobbyjoe. Makes sense?

I did very minimal testing, but it all seems to work just fine on my home computer and at my web host (which runs mySQL 5). Let me know here if you find any problems.

Enjoy

Greg