PHP

Theme Drupal 6 Search Results

with terms

In drupal 6, the variable $result is available in search-result.tpl.php.  The commented section at the top of this file makes no mention of this variable, so if you want to do something as simple as showing the created date on a node instead of the modified date, then you're in for a bit of researching (unless you read this blog post!).
 
So, if you want to modify how search results are displayed, then you need to:
1) Copy search-results.tpl.php and search-result.tpl.php from /modules/search to your theme's folder.

Bringing CKEditor to Drupal 5

At the moment, there is no pre-packaged way to add CKEditor to Drupal 5.  The following is a result of my attempt to port the Drupal 6 wysiwyg module's CKEditor plugin to the Drupal 5 version.  It's ugly, but accomplishes my goal of getting CKEditor going in D5 without having to create a new module from scratch or try to port the rather large D6 module for CKEditor.
 
Step 1) Create ckeditor.inc (this is based off the D5 version of fckeditor.inc and the D6 version of ckeditor.inc), and place it under wysiwyg/editors
 

My new favorite Drupal module

I recently discovered the Contemplate (Content Template) modules for Drupal. Wow, is it ever a handy little module. Contemplate allows you to create php templates for specific node types. You can create a template for one or all of the following : Body, Teaser, RSS. The great thing about creating node type specific templates in contemplate is that they are theme independent. You no longer have to create a .tpl.php file for that node type in all of the themes that might be in use.

Adding a multiple user autocomplete field to Drupal

with terms

The drupal user_autocomplete function is very handy for form fields where you are entering a single username.  But what about cases where you want your users to be able to enter multiple usernames?  Turns out that this is very easy to do without having to write any JavaScript.
 
drupal autocomplete field, multiple usernames

Adding a select all checkbox to your drupal form.

with terms

The following snippet can be useful in adding a "select all" box to your drupal forms (5.x - with or without jQuery update).  Note that the code is careful to not check or uncheck any boxes that are not part of the immediate form.
 

Don't buy cookies from this BakeSale

with terms

I recently took BakeSale [http://www.bakesalepro.com/] for a test drive and found that the cookies were a little moldy.  If you do try to use BakeSale, do not use the main download button on their site.  Instead use the link in this blog post : http://blog.bakesalepro.com/2008/08/bakesale-12-final-released/.  All of the releases that I tried for this project from CakeForge were missing CakePHP.  The "bugfix" release can't even be installed any

Syndicate content