Drupal Modules
The codebase I am working on uses hierarchical select with taxonomy to make it easy for editors to tag from nested terms. Pathauto is used to create the URL alias for the content type. We need both the parent and child terms in the URL, so use this token: [save-lineage-termpath-raw].
To revert a features module during deployment, add an update hook and call features_revert with the name of the module and the component you want to revert.
Find the number of results in a view. Add this snippet to the header or footer of the view, depending on where you want the number of results to be displayed.
You can use node relativity to attach nodes to other nodes. In this case, I am using it to attach reviews to product nodes, where the reviews are nodes in their own right. I want to be able to view the reviews (children) within the product node (parent).
This snippet will select Webform (Webform module) submitted data between a given date range. In this case, that date range is between 2009-06-04 and 2009-07-07.
The UNIX_TIMESTAMP function converts the date into a Unix Timestamp. This is because the value of submitted is in Unix Timestamp format.
It is often useful to add a "edit this node" or "edit this block" if a site editor is viewing content on a page that is not the node page itself. This includings viewing content from a "view" page where the normal edit tabs are not present for nodes or blocks.
Advanced Forum (Drupal module) comes with a few variants on the theme. The following can be added to the sites main theme style sheet and adjusted to suit. This will override most of the colours of that come with Advanced Forum.
/****************************************
** ADVANCED FORUMBoost is an amazing Drupal module that can dramatically improve the page speed performance. This can improve the experience of visitors and help a web site cope with unexpected surges in traffic.
Using the Pathauto module is a quick and easy way of automatically creating meaningful URL's. Instead of having to type in a URL path manually for each node (page, story etc) yourself, it will do it automatically based on set criteria, like the category it belongs to and the title.
Learn how to write custom Drupal modules
Does Drupal module development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to Master Drupal 7 Module Development.
I am