drupal 6

By Phil Frilling, 12 June, 2014
Drupal's calendar module is a great tool for building calendars quickly with views. However, the default theme is still using tables, blech! After some searching, I came across a sandbox module to fix this, https://drupal.org/node/1675894#comment-7903527. Like some of the user's in that thread, I did not want to add another module to my site. So, I set off to theme the calendar in a responsive way. Surprisingly, this was much easier than I anticipated.
By Phil Frilling, 15 June, 2012
We have a website that updates numerous nodes nightly with an uploaded XML file. This XML file is then processed with Drupal's batch api, and when the XML file is uploaded manually, the script works perfectly. However, in real life, this XML file is uploaded programmatically by a script running on another server. Programmatically, the file gets uploaded and the batch begins properly, but on the successive redirects, the batch fails. This is because, the pseudo browser window from our publishing script closes.

Drush to the rescue

Luckily we have Drush installed on the server.
By Phil Frilling, 13 April, 2012
Today I ran into an issue of needing to programmatically remove file attachments from a node. To accomplish this I referred to the upload_nodeapi() function and found the upload_save() function. After examining the code I found that upload_save looks for the 'remove' parameter for the file object. If $file->remove exists, the file will be deleted from the database and file system. So by adding the 'remove' parameter to the files I needed removed before calling node_save() results in the files being removed from the node upon calling node_save(). Done!
By Phil Frilling, 31 January, 2012
Today I needed to create a view the filtered items by a range of prices. The prices for these nodes were stored in a CCK number field. After searching for an easy 'plug and play' method of doing this I quickly began writing my own code to accomplish this task. To summarize, I accomplished this by using the following functions:
  • hook_form_alter()
  • hook_views_query_alter()

Step 1.

Begin by creating your view and adding your CCK number field as an exposed filter. You'll want to be sure that you use the 'is between' operator.