Interface Quirks

Creating a content typeOne of the really nice things that Drupal 7 added for administrative users is the machine name field. Instead of trying to generate a unique name or figuring out which characters are randomly allowed it just does it for you. Keeps the progrmamers happy with unique key names in the database and doesn't make you feel like you're trying to create a bank password.

Non-local Files on Drupal 6

Drupal 6 does not handle non-local files well. That means if you want to use something like Amazon's S3 file service you are pretty much out of luck. Media Mover got around this by overriding some templates but the implementation did not work well for extensibility and left most use cases in the dark.

Simple Slideshow for Wordpress

Admittedly I don't know Wordpress very well, so you are welcome to take this with a grain of salt. I wanted a slideshow plugin that could use all existing media plus media that a user uploaded to their blog post landing pages. I did not want to create tags for slide shows etc. I did not want the user to have to deal with gallery vs. upload vs. library vs. stashing images in some other random place.The idea was to be as dead simple but to change the user process as little as possible.

Enter the jQuery. There are lots of great jQuery plugins to do slide shows. I used the jQuery Cycle Plugin. Markup is straight forward- just put a bunch of images into a div and use .cycle(). My approach was to grab all the images in a post, hide them, and add them into the jQuery Cycle div. Not much to it. I used a custom field to enable the slide show if the user wanted it and then they could just add as many images to their post as they liked.

Media Mover 2: Now With 72% More Objects!

Ok so I totally missed my deadline of January 1 for Media Mover 2. Fine.

The alpha is actually nearing- this time I mean it. The selecting files from views works, auto generating images for imagecache (multiples all at once), full Drush support, unlimited actions per step, FTP module has been completely rewritten and does a better job of auto linking FTP content (by users, by directory, by token) then it did previously, the number of modules has been reduced to make configuration building easier, configurations in code, the API is new and simplified (and easy to upgrade to!) and so on. Hey, the interface even got an overhaul which makes it feel more like Views, and so on. Yes there are probably lots of bugs still. There is no upgrade path from Media Mover 1 and won't be until the bugs are not serious.

So here is some of the pudding. This is the new admin landing page which lists all of the configurations. Here you see three different types of configurations- disabled, overriden from code, and normal- built from the admin interface. What is no longer here is the notion of child configurations- with configurations now having unlimited steps it seems unnecessary to add the complexity of having the child configurations. Selecting files from an existing configuration is still possible so I'm going to argue that Media Mover 2 offers more possibilities for building configurations despite lacking this feature.

PHP Memory Issues? There's a Hack for That!

I've had to raise my php memory limits much further than I'd like just to get some normal things done in D7. The admin page for Drupal's menu system with a large menu tree can easily crush what I'd consider a healthy amount of available ram. Here is a fast and ugly fix settings.php:

$path = explode('/', $_GET['q']);
if ($path[0] == 'admin') {
  ini_set('memory_limit', '192M');
}

Hopefully this is sufficient for most cases.

Drush for Media Mover

Media Mover 2.x now adds Drush support to allow for running various operations from the commandline. For example:

localhost: drush mm-run convert_video

will run the full convert_video configuration. Likewise, you can choose to run specifc steps from the configuration by specifying the step:

localhost: drush mm-run-step convert_video 1

would run the first step in the specified configuration. You can get information about specifc configurations by using

localhost: drush mm-describe convert_video

and their steps by using the step order:

localhost: drush mm-describe convert_video 1.

A list of all configurations can be found with localhost: drush mm-list. mm-purge can be used to reset a configuration and drop its files- useful for testing purposes.

Pages