chirale

IT and beyond

Following code is useful when installing a module that create a new content type programmatically on Drupal 6.x. Basically, it adds two variables setting default values for comments (core Comment module) and attachments (core Upload module). Code to write on my_funny_module/my_funny_module.install. function my_funny_module_install() { // Disable attachments // Read http://api.drupal.org/api/function/upload_nodeapi/6 on “load” variable_set(“upload_my_content_type”, 0); // …

Continue reading

Tested on: Drupal 5.7, Print 3.4 Drupal Printer Friendly module (Print) add “print this” functionality to nodes. Customization is pretty easy: according to README file you can add a print.tpl.php to your theme (or subtheme) directory and modify it. All override templates are (in check order): print.__node-type__.tpl.php in the theme directory print.__node-type__.tpl.php in the module …

Continue reading