I am planning to extend a module to include aditional functionalities. I am pondering between inserting this new functionality either in a extra php file which the module includes, or to add new hooks to the module that then calls the implementing module.
I am aware the second option seems the most desirable, but how much overhead does the hook system adds, if the hook is made in a place where multiple call to it can be made per page request (up to 20 requests)?
Could someone give me an advice on the best approach?
I'm creating a module that needs to know the uid of a new user to update a db table. I've tried placing my SQL call in the 'validate' and 'insert' sections of hook_user, but neither work: in validate I get a uid of 0, in insert I don't get a uid at all.
Any help on this? The life-cycle documentation for many of the hooks with operation arguments is pretty poorly documented. I'm not even sure that $user or $edit is valid in a hook_user 'insert'.
I'm trying to use the field select that comes with the contrib folder in flexinode.
I'm trying to edit my own node-flexinode-x.tpl.php, and I'm trying to fetch all sorts of fields, using $node->flexinode_y (where y is the field ID).
For the most part it works fine. But with the select field, I only get the option number, and not the text.
For example, say I defined a select field (lets say, with field ID 7) with the options:
OptionOne
OptionTwo
OptionThree
OptionFour