Blogs

Drupal Revision All - saves the day!

Just a quick update on a module I just added to a website!  Revision All module gives you complete control of revisions on your Drupal powered website.  Just install and enable the module, then configure the settings at:

Admin > Configuration > Content Authoring > Revision All

/admin/config/content/revision-all

There is a global setting to enable revisioning on ALL content types, or you can just select a subset of modules to revision. 

An even more comprehensive options is the ability to disable the ability to disable revisions on content.  Very intense. 

Give it a try!

jQuery Time Picker for your Drupal 6 website!

As Drupal experts we get used to Drupal, and it's short-comings.  One of the worst UX issues with Drupal is date and time functions when creating content for your website.  

How many people want to TYPE dates and times into small anonymous input boxes?  Sure, it's not that big a deal when you fill out the fields for creating one or two test nodes on your Drupal site.  But what if that was YOUR job?  Yeah, why not just shoot me in the head right now!  

Huzzah!  There is relief with Date Tweaks! Thsi Drupal module intergrates Willington Vega's jQuery timepicker into your Drupal date/time fields, extending the functions of the Date module and using the jQuery Update module.  

What the What?  Just take a look at this demo to see the time Dropdown with times at Willington Vegas.  

  • The Date module provides us with the date pop-up for dates only.
  • The jQuery Update module gives us a newer version of jQuery to use on our Drupal 6 website.
  • The Date Tweaks wraps up the interface with the timepicker and adds it to our Drupal website. 

Install the Date Tweaks module on your site, and follow the installation notes.  This will also require a visit to Willington's site to get the most recent version of the time picker.  (remember those 3rd party code snippets can't be packages on Drupal.org modules).  

This hoilday season make your site maintainers happy with UX improvements, and start with dates and times!

 

Drupal 7, PathAuto and Token Modules

Recently I created a website for my micro-cinema project Casket Cinema with Mark Wojahn using Drupal 7.  Each month we show a documentary movie focused on social issues.  The site has an upcoming event list, a news feed, and a MailChimp email list.

In Drupal 6 I used the Pathauto and Token modules to create custom event URL's based on date fields in the events.  Unfortunately field tokens are not available yet.  For me this is a pretty major feature.  

Drupal 7 was officially released on January 5th 2011,  We are just 22 days for the one year anniversary, and there are still major features that have not been integrated.  Why so much hoopla about Drupal 8 when Drupal 7 languishes with less features than it's predecessor?  

Up and Running

The site willince.com has been down for a little while.  In my hast, I overwrote this Drupal 6 installation with Drupal 7 core.  Oops.  

So today the site is live, and updated with a current install of Drupal 6.  Still not caught up with all the projects I have been working on, but that is for another day.  We need to update a few more Drupal installs today.

Creating Autonode Titles using Node ID's (NID) and Taxonomy Terms in Drupal 6

In Drupal 6, there is a known limitation in Autonode Titles, that NID and taxonomy terms cannot be used as autonode title tokens for node names.  On node creating these elements are not assigned when the node is saved, therefore they return empty values, and the name of you node is empty. 

The workaround is to use the Rules Module.  We create a rule that is triggered whenever new content is created.  This new rule just fires off autonode title for the node, then saves the node.  The process just saves the node a second time, and creates the correct node title since the Node ID and taxonomy terms then exist for the node. 

Here's how to create your Resaving Rule:

  1. Install the Rules module on your site, run update.php. 
  2. Enable Rules, and enable Rules Administration UI, so you can make rules.
  3. Now add a new rule, and name your rule.
  4. Set the event that triggers the rule to "After saving new content".
  5. Save the changes of the rules settings.
  6. Now you can add a condition to the rule.  I only want this rule to apply to one content type, since I don't need if to be executed for all new content.  Add the condition "Content has type", and select the content type to be updated.
  7. Now add an action.  We will run a PHP snippet to set the node title, then save the node, so select "Execute custom PHP code".
  8. In the PHP box, add the following:
    <?php
    auto_nodetitle_set_title($node);
    node_save($node);
    ?>
  9. Save the rule!

That should be it.  Run a few tests to make sure the rule is working, and enjoy any autonode titles you want!  If you really want Node ID's as part of your autonode title, now you have an option!

The disadvantage to this approach is that you need another module (Rules) to make this work. Is it worth it?  You decide.

Client Projects Installed

Once i get started on these things, I can't stop! 

Tonight I got the Client Projects menu installed.  That involved:

  • Creating a content type called 'Client Project'
  • Creating imagecache presets for the thumbnail, inset and full image.
  • Adding the Superfish Menu Module to give the animated drop menus.
  • A little CSS tweaking to float the project image to the right side with a little white-space margin.

I created a Drupal Taxonomy term for the Drupal modules used in each project.  I wanted to associate these with nodes, to add more content for each module, but Node Auto Term (NAT) was not giving the results I was looking for.  This module just substitutes the node body for the term description.  Nice, but I want to add CCK fields to the display, along with a list of content that is assocaited with the term.

There is another lead for this, called Taxonomy Node Module. Then again, it's late, and I have to teach Yoga and attend the Minnebar tomorrow!