drupal-hooks

Extending a module multiple times in Drupal

I created a nice extension for Drupal based on the webform module. Now, I need to implement different functionality that is also based on the webform module. What is the best way to do this? ...

Creating content input form with custom theme (Drupal)

I'm creating a site which I want to place content input form in custom themed template. I opted to do this because I wanted the whole site to be looked uniform. That said, I'm not sure as to what is the best approach to do this. Is it proper to invoke hook_insert/delete/update and hook_perm/hook_access by myself or is there anyway I can ...

drupal :: order complete hook and upgrade user permission/roles

Hello, I want to be able to upgrade user's permission after the order status shows complete. I figured out that I should use hook_order hook in order to achieve that. But how do I get to know which user has created that order and how do go about updating the permissions as well as setting up the expire time for that role automatically...

Search hook for filtering results?

Hi all, I have been going through the docs and source code looking for something without luck. Is there a Drupal 6 hook that gets called after hook_search(), but before the $results gets handed off to the template system? I need to do a fairly custom pruning and reordering of results that get returned. I could just reimplement hook_s...

hook_menu() - an unexpected behaviour (longer path issue)

I am initializing a number of items via hook_menu (Drupal 6) ... $items['webtv/block/%/playlist/edit/%'] = array( ... 'page arguments' => array('webtv_playlist_form', 2, 5), ... ); $items['webtv/block/%/playlist/edit/%/filter/new'] = array( ... 'page arguments' => array('webtv_playlist_param_form', 2, 5), ... ); $items['w...

hook_load/hook_view not called

I have a module with four node types declared. My problem is, hook_load, hook_view is never called. I used drupal_set_message to find out if certain hook is being called. And I found out hook_load, hook_view isn't. Just to give you clear picture, here's my structure of hook_load HERE'S UPDATED ONE function mymodule_node_info(){ retu...

How to work with hook_nodeapi after image thumbnail creation with ImageCache

Hi all, A bit of a followup from a previous question. As I mentioned in that question, my overall goal is to call a Ruby script after ImageCache does its magic with generating thumbnails and whatnot. Sebi's suggestion from this question involved using hook_nodeapi. Sadly, my Drupal knowledge of creating modules and/or hacking into e...