Drupal productivity - savetofile module saves time and aggravation

As a follow up to a previous article comes an even more elegant solution than the 3 little lines of code.

The spectacularly awesome savetofile.module lets developers:

1. Exchange the Drupal submission UI for their favorite IDE/text-editor:
Simply click a button and via an ajax call, the contents of your node/block/whatever is auto-injected into a file (with the name of your choice) and all that is left in the node/block/whatever is a one line function call which will load the contents of the file at runtime. So at this point you can choose to never look at the editing page for that item again and instead simply edit the file which was created to affect the item. This can be a massive time saver as well as put all your favorite tools at your disposal.

2. Get code out of the database and into version control and make it searchable (from the desktop):
Ideally all that would be in a site's database is text-only content (e.g., no html/php). Having code in there is a nightmare in-general for editing reasons - but even worse - what happens 9 months later when you forget how you made that little widgety-thing in the first place? Is it a block, is it a node, is it in a theme file? Who knows!?

With savetofile that's less of a problem because now that node/block/whatever content can be version controlled and/or searched for with your favorite desktop tools since it's not in the database anymore.

3. Reverse all of the above with one simple click
Want to develop using the file method but want the contents of the file back in your node/block/whatever when the time comes to go live? Press one button on the edit page of the item and another ajax call will replace the savetofile code with the contents of the referenced file and all is back to 'normal'.

Personally, I won't be building a site without this module from here on out! :-)

18 April, 2008

Design debt,, and the Drupal project itself

Published in: 

The community will begin to realize (in part due to the above stalled project) how much design debt Drupal has accrued over the past several years of rapid expansion and development. While the problem will not be solved in 2008, the realization that it IS a problem will help prevent a long-term meltdown. - Jeff Eaton January 4, 2008

Design Debt and
Indeed as Jeff suggests, this "realization" seem to be a bit of a challenge at the moment for parts of the Drupal community right now, at least if the reactions to Harry Slaughter's post regarding a Drupal module ratings site which John Forsythe just launched are taken into account.

Given the possible reactions it was disappointing to me that some people chose to attack Harry and John (e.g., the messengers) rather than the processes which have lead to a situation whereby one of the largest open source software projects on earth can't get SOMETHING up to help it's users deal with their number one feature request for As John, myself, and any number of people have proven there has been no lack of volunteers, or lack of resources, but rather just grid lock on this issue. (for instance, this thread was just one of many that tried to get the ball rolling).

Contrast how this scenario with module ratings works with how core development works. With core - people submit patches, other people give opinions and review, but eventually one person just makes a judgment call on whether or not the patch is committed and life moves on. With the module ratings it's been more a game of 'waiting for consensus' of a handful of well intentioned people who all each seem to have the power to hold things from going forward but none of whom have the authority to 'just call it' - and thus move the issue on toward *actual* implementation. Thus more time passes by without a solution...

While on the subject of design debt - design debt and Drupal 6/7
Drupal 6, a great release in it's own right, is unfortunately not production-ready for many site-types due to the lack of some very important contributed modules. Since my time with Drupal (4.5) I've never seen anything quite resembling the lag between a Drupal release and it's 'production readiness' that I'm seeing now (Views is not even out of alpha - and CCK is waiting for views to be done before finalizing itself).

Won't pretend to know what needs to be done to fix it all, but from my own personal perspective I can't fathom being concerned with anything regarding Drupal 7 and probably won't be able to until I've got some productive months of being able to use Drupal 6 under my belt. This is NOT to say that current development for Drupal 7 is a waste of time - I do see the value of forward-thinking development, but I also feel there is a rapid rate of diminishing returns for it at the moment.

If there is any point to the above statements, it's that a) I don't think that I'm alone in my feelings and, b) I'm somewhat concerned about Drupal achieving an 'Emperor has no clothes' moment in the near future if these issues aren't eventually addressed.

17 March, 2008

Recommended Drupal modules

Published in: 

It's tough coming up with a short list of "recommended Drupal modules", but here it is anyway. We'll probably expand it as time goes on...


This is a simple filter module. It handles and php tags so that users can post code without having to worry about escaping with < and >

This is a HTML correcting module. The filter scans the input, builds up a list of open tags and closes them when needed. Without this module you can expect to have a front page which is regularly broken by even a single missing tag from any post you put up.

This is a simple filter module. It automatically converts URLs (http, ftp, email, ...) into hyperlinks.

content moderator
If your site doesn't require multiple levels of site administrators you can skip this module. The idea of the content_moderator.module is that you can avoid having to hand out the god-like access which "administer nodes" would normally give someone. This module allows you to give only a "moderate nodes" permission to a user role. Users with this permission may see a list of content at /admin/content_moderator. Within this list they can either approve posts to move them out of moderation, or put them into moderation to remove them from public view.


This module creates a cached version of each block. Block caching happens separately from page caching and so it will work for logged-in users whether or not page caching is enabled for the site. Cached blocks make just one call to the database and can therefore reduce the overhead required to render blocks that require complex queries and/or calculations such as some Views or Taxonomy-related blocks.

DB maintenance performs an OPTIMIZE TABLE query on administrator-selected tables during regular cron.php executions. For MyISAM tables, OPTIMIZE TABLE repairs a table if it has deleted or split rows, sorts table indexes, and updates table statistics. For BDB and InnoDB, OPTIMIZE rebuilds the table. Note, MySQL locks tables during the time OPTIMIZE TABLE is running.


This module integrates the TinyMCE WYSIWYG editor into a Drupal site for editing site content.

21 January, 2007

Drupal how to: upload modules to your server using cpanel

Published in: 

The instructions below are written specifically for those accessing their site directories through cPanel. FTP user will need to adapt the instructions.

Before getting started - a note about modules
Modules available at are not guaranteed to work as described there, or even work at all.

It is very recommendable to read the "issues" page for any module you are considering installing to see what others are saying about the module and to be sure the version you are downloading is actually the right one for you. Sometime, unfortunately, it's not as simple as just picking the one which is "obviously labeled correctly". Some after-install tinkering is often required to get things working properly.

Finally, and above all - always make a backup before doing any work which will affect your database. If you have a backup there is virtually nothing you can do to mess things up which isn't reversible. If you don't have a backup, there's a lot you can do to make your site irreversibly messed up. :)

First goto: http://your-site-url/cpanel and login:

1. Once you're logged in navigated to the "File Manager" icon and click.

2. then click the "public_html" folder icon. Everything you put in this folder is "public", meaning that others and/or search robots will be able to "see" it.

3. locate the "modules" directory and click it, then click (or if you don't have one, make) the "CustomModules" directory within it.

4. Select the "Create New Folder" link at the top of the page and name your new folder appropriately. No uppercase and no spaces.

5. Once you've made your new directory select it's folder icon, and then after the new page loads select the "Upload file(s) link which is at the top of the page.

6. Select the files on your desktop which you want to be uploaded and upload away.

7. Go to your modules administration page at your-site/admin/modules and enable your newly uploaded module(s)

8. Configure the modules specific settings on the module settings page which you can get to by going to you admin pages at for it. (hopefully you've read the "readme.txt" files that came with your module by now)

9. Test your module's functionality by logging in as different test users.

21 January, 2007
Subscribe to RSS - Modules