Article
Posted on 17th February 2009
Takes about 1 min to read

One of those little Drupal annoyances this, there is now easy way to alter a comment (using hook_comment) before the comment is written to the DB. Hook comment is invoked during the validation phase, with $op set to "validate", and the comment array is passed by reference - but unfortunately any changes made to the comment are not passed on to the comment save function. A quick and slightly dirty way around this is to...

Published in: #comments #Drupal 5 #Drupal Planet
Article
Posted on 7th February 2009
Takes about 1 min to read

We love the views bulk operations module here at ComputerMinds, and frequently use it to create some lovely administrative interfaces. However we often find a need for an administrator to be able to perform operations in a quick and easy way on an individual node. While some of the core operations (publish, make sticky etc) can be performed from the edit tab of the node, many other node operations do not offer this facility ("rebuild...

Article
Posted on 27th January 2009
Takes about 1 min to read

Thought I would post this little function on here, we tend to use it a lot and it gives some nice little extras for you to play with when you come to template your nodes. $node->view_name : the name of the view this node is being rendered in $node->position_in_view : the position within the view for this node function phptemplate_views_view_nodes($view, $nodes, $type, $teasers = false, $links = true) { static $count; foreach ($nodes as $n)...

Article
Posted on 24th January 2009
Takes about 1 min to read

One for the small but handy category this. The standard "more" link the views module adds to it's blocks has no place on a modern accessible website, you really need a more verbose link in there. One solution has always been to add a bit of footer or header text into the block, but it's a little tedious - and clients always find views hard to edit. This simple solution will turn the block title...