Garfield minus garfield

Everybody knows the cat Garfield from the comic, they even made (horrible) movies about him. But what happens if we leave garfield out of the comic ? Quote from the site: the result is an even better comic about schizophrenia, bipolar disorder, and the empty desperation of modern life. Especially this one is hilarious: http://garfieldminusgarfield.tumblr.com/post/29944829

Topics 

humor

Extend node filters form

I've been wanting to extend the default node_filter_form on admin/content/node since ages so I finally wrote my own patch because I really needed it for some projects. The patches attached introduce a new hook called hook_node_filters. Modules can hook into the default node_filters function to add their own select boxes and types to filter on. An example hook could look like this:

<?php
/**
* Implementation of hook_node_filters().
* Returns extra filter option at admin/content/node to filter on every page.
*/
function testmodule_node_filters() {
  
$q = "SELECT n.nid, n.title FROM {node} n WHERE n.type = 'page'";
  
$result = db_query(db_rewrite_sql($q));
   while (
$row = db_fetch_object($result)) {
    
$options[$row->nid] = $row->title;
   }
   return array(
'page' => array(
      
'title' => 'page',
      
'options' => $options,
      
'where' => 'n.nid = %d',
      
'join' => '')
   );
}
?>

Although I'm pretty sure this patch is safe, this is not an official patch reviewed by the Drupal community. In the event something might go wrong, don't hold me responsible allright ? ;) Also, take a look at http://drupal.org/project/better_node_admin_content which will hopefully serve as a patch for D7.

Topics 

drupal, hooks

Goodbye sweet passwords

I just installed my own openid identity server on my own URL so I can finally login on other websites with my own openID. Now I don't have to worry about passwords anymore and I'm going to be very strict about this: any new site not supporting openID will be gladly ignored by me from now on. And the ones I like allready might get a friendly mail from me :)

Topics 

openid

Upgrade

I did an upgrade of my site to Drupal 6 this evening and so far everything looks fine. If you encounter problems, let me know! Not depending on cck & views is a major advantage even after D6 is out for almost two months now. In fact, I only have the spam module to replace - or find another solution - because there is no 6 version out yet for it. For now you always must preview your comment, I wonder (probably naively) if spambots can circumvent this ;-)

I've tested D6 a few times allready at work, but not on a production site yet. The drag & drop features and the actions/triggers module are really wonderfull and I'm sure I'll discover some more cool features in the days to come.

update 2/4 : I just installed mollom on my site, so you can now submit comments directly!

Topics 

drupal

Imagecrop on drupal cvs

I just added my imagecrop module to cvs on Drupal. A 5.x development version should be out soon, so everyone is invited to test and submit patches. A lot of things need to be optimized, especially the javascript and css. If anyone is interested being a co-maintainer, I'd be glad to give access to cvs also.

This module makes a javascript toolbox action available thanks to the power of Imagecache 2. It can currently 'hook' into the image module and cck imagefield widget. It provides a 'javascript crop' link on the edit form of an image node or a node with an imagefield widget. The popup window displays all available imagecache presets with a javascript crop action. In your theming you can use the imagecache theme function with a preset and the imagecache action makes a database call to choose the right crop area you have chosen.

More info, CVS and downloads on http://drupal.org/project/imagecrop and a screencast is also available.

Topics 

drupal, imagecrop

Pages

Subscribe to realize.be RSS