Recent Drupal hacking
Aside from the usual work-related stuff, I've been doing some serious Drupal tinkering over the past couple of weeks while getting the blog back online. (I know, I know -- startling!) A couple of the highlights include:
Porting a spiffy theme
I spotted a couple of high-quality Wordpress themes the other week, and decided to take a stab at porting them. Drupal 6's templating system does, indeed, make the task a lot easier. One of my favorites is the Scruffy theme, by the South African web designer Cobus Bester.

I finished up the port over the weekend, and I'm pretty happy with the results. I've contacted him for permission to post it on Drupal.org, or to send him the source of the theme so he can offer it for download on his blog. Further updates when I get his reply.
Views Cloud
For those still using gopher, tag clouds are a way of presenting lists of links where the words are displayed larger or smaller depending on how many times they're used. Tag clouds have been popular (maybe cliche?) on Web 2.0 sites for a few years now, particularly when displaying free-tagging terms attached to blog posts.
I wrote a plugin for the Views module that allows any data to be displayed in CSS-styleable cloud form. Lists of authors can be sized according to how many posts they've made, links to monthly archive pages can be sized by how many posts are behind the link, and so on. It's really flexible, and I'm happy with the results.

Drupal's Tagadelic module has generated tag clouds for years, but this level of flexibility is new. I'm hoping that folks find it useful.
The mirror module!
Mirror module is a simple chunk of helper code that allows Drupal to grab remote images from sites like Amazon or Flickr, save them in the system's "files" table for safe keeping, and automatically refer to the locally cached version the next time the image is requested. Why bother? Remote images can vanish when network problems crop up, and locally stored images can be scaled, cropped, and manipulated using the ImageCache module. Mirror module is at the heart of the code snippet that auto-retrieves photos from my Flickr account, then crops them and puts them in this blog's header.
Mirror module probably deserves its own post, so I'll be writing about it separately and posting the code when I get the chance. Since it's only 100 lines of PHP, I'm hesitant to spin up a dedicated project on Drupal.org for it.
Simple Views
This one is actually part of the work I'm doing for a Lullabot project, so it doesn't technically belong in this list. But I'm excited about it, and it's very near completion, so what the heck.
Simpleviews is a tool for generating Views with a simple set of choices. It's intended for new site administrators, or clients who might want to add some custom listing pages but aren't up to the full configuration dashboard that Views offers. it's mostly API at this point, but here's the in-progress mockup of the user interface...





The theme looks awesome (hope
The theme looks awesome (hope it can be posted) and SimpleViews sounds great. I've had fleeting thoughts of ideas like this but definitely no time to play. Can't wait to put it on some sites. : )
And sorry... this is
And sorry... this is unrelated to your post, but I just noticed your favicon and wanted to slip in a "P-switch ftw". Awesome idea.
... Also just noticed your mini-blog. I'm lovin' it. ; )
Nice!
Wow, nice stuff! Exciting to see the views tag cloud thing... Tagadelic is handy but this looks much more flexible. Also a big ditto for simple views. I'm curious to see what will be in those dropdowns...
views UI permissions ?
I like the idea of simple views. Views is a really great and powerful module. For some projects it would indeed be great to be able to give the user (administrator) some of that power without overwhelming them with all the options.
It might be intresting to have a look at the Views UI Permissions module http://drupal.org/project/views_ui_perm, written by swentel. Both modules partially share the same goal, although Swentels module is limited and does not really change the user interface.
Pingback
[...] Recent Drupal hacking [...]
Mirror Module
I can't wait for you to post about the mirror module. I've been tempted to ask you more about your header images since you posted mentioning how you did the header image.
My File Force module consists
My File Force module consists of 27 lines, not counting comments. Don't let a short line count for your module stop you from releasing it.
Nice work!
Wow that's really amazing work you've been doing. I'm looking forward to the beautiful theme being released.
You should definitely commit the mirror module, I for one would love to see how you fetch remote files and store them locally, this would be of great value for the asset module for instance.
I love the idea of the SimpleViews module, especially with the exploded Views2 UI. Clients would love such a simplified interface.
For the Love oF GoD, MAN!
Please share your mirror module.
Really nice theme. Just one
Really nice theme.
Just one thing:
if you wish to commit your port of spiffy theme to drupal.org themes, you should ask for permission in order to relicense it from CC-BY to GPL license.
The reason it's unreleased...
...Is that I haven't yet heard back from the author about that very thing.
Link to Views Cloud Plugin
In case you were wondering, the Views Cloud module can be found here:
http://drupal.org/project/views_cloud
Mirror module released
I just saw this in the newly release modules: http://drupal.org/project/mirror. Thanks for sharing!
Emfield & Mirror API?
Would you mind terribly if Embedded Media Field hooks into the Mirror module's API (assuming it provides an API)? We were just about to add this functionality to the module, and it makes sense not to replicate code when possible.
Not at all!
My only concern is that Mirror is so small (just 100 lines of PHP) that it makes for a tricky dependency. It seems like it is well-suited for exposing potential additional functionality: ie, "If mirror is enabled, we'll do this, too..."
That sounds perfect actually.
That sounds perfect actually. We want to make the feature optional, so will simply make the dependency optional as well, featured prominently on the project page. I'll take a look at the module and see how we can hook into it.
Thanks!
Post new comment