I'm writing a module that extends the user form. Within the form is a line:
drupal_add_js($js,'inline');
So, in a normal, standard, regular form, this works fine. It's absolutely perfect, and the script I've included in $js is added once, and it works. However, when I extend the user form and try to do the same thing, it's added twice.
i want 2 make module that when new user register in drupal so on another spot register to.
i use hook_user $op=='insert' for hook to new register user.
but i hav a problem for knowing the password variable for my second registration.
how can i get the passwordl??
if i use $account->password then the password was encrypt.
any solution or example for multiple registration???
I have a node which provides a 'lookup' for another type of node.
I want to validate when the administrator tries to delete that node if it has been used as a lookup. I have no problem with the routine for this but where to put it.
The only $op's used in the nodeapi used are load and delete. If I put it in delete how do I cancel the delete when I need to.
I posted a question to this effect before (http://drupal.org/node/163390), but didn't get a response; I've since learned more, and I'm hoping that my being more specific might yield an answer this time around. I'm trying to figure out how to set up variables that are:
Similar in nature to those that are configured within the Site Information (by default, www.example.com/admin/settings/site+information) - e.g., things like an acronym for the website, a noun that describes users of the website (on drupal.org, such a word might be 'Drupalers'), and other things), etc.
Similar in utility to those variables that are available for use in places like Organic Groups email configuration, or in the built-in User Settings admin section (by default, www.example.com/user/settings). That is, using only a simple syntax like !site, the variables are available for use in forms handling configuration and settings.
I am coding a module that needs to perform some operations when a node is submitted, but before the content is saved in the database.
Right now, in hook_nodeapi, I can add some code *after* an insert or update, but how do I perform some action before?
For information, I am adding a "Save as draft" button on the node form. What I want to do is check when that button is pressed, and then perform some action. (I will save the node content in a separate table, and don't want it to be saved as it normally is)