Linked Questions

1
vote
3answers
530 views

What are Hooks in Drupal and can I learn and use them if I've yet to learn PHP? [duplicate]

Whenever I try to read about what are Hooks in Drupal, and how to manipulate forms or content with them, the text seem not to deal with the UI at all, but mostly with coding... Maybe I did not ...
4
votes
1answer
1k views

Difference between Hook and function [duplicate]

I have a confusion regarding the hook and a normal function, So can any one tell me what is the significant difference between a Drupal hook and a normal PHP function in Drupal.
1
vote
0answers
57 views

How hook work in drupal? [duplicate]

Possible Duplicate: What is basic concept behind hooks? How does comment_field_extra_fields() implement hook_field_extra_fields()? How is a hook implemented by another function? Does it extend ...
1
vote
1answer
42 views

Newbie-question: how to use hooks [duplicate]

Ok, this is a newbie-question i'm afraid to ask for some time .. how to use Drupal Hooks? Yes, i know where to look for the code, but then? Put it in the template-folder, a block, a custom module? ...
2
votes
2answers
3k views

What are Hooks, Actions and Triggers in basic terms

In basic terms what are hooks,actions and triggers. My ideas are that hooks allow you to do something when an event takes place and that the "something" is the action. I am having a bit of trouble ...
4
votes
1answer
262 views

What is the purpose of modulename.api.php?

What is the basic concept behind hooks? refers to modulename.api.php. Does this apply to Drupal 8? What is this file? Is there an example of how to code it somewhere?
0
votes
1answer
3k views

user register hook form alter not reaching

I am trying to request more information from users when they register for my site. I put a set-message in and it's not eve appearing nor any changes in the user register form. I cant seem to find ...
0
votes
1answer
2k views

Where do I place hook_cron()?

I think I need to use hook_cron() to cause my new module to be run each time cron runs, but in what file and directory do I place this code? Is it in my new module or some other place. Logically, it ...
0
votes
2answers
225 views

Why is arg() failing to get the router object on pages with aliased URLs?

So I posted this question about how to get NID of current node and I'm assured that arg() should work to return the router item for the current page, regardless of aliasing. However, it doesn't work. ...
1
vote
1answer
172 views

what is starting point of any drupal module.?

Only beginner can ask this type of question. as i am learning drupal recently. what is the first function that executes in .module file..how can i understand which function or hook executed.I just ...
2
votes
1answer
423 views

How to use drupal_get_form outside of a menu

I am trying to use the drupal_get_form funtion outside of a menu and am not having any luck finding examples of how this is done. An overview of what I am trying to achieve is: 1) Pass control from ...
2
votes
1answer
112 views

How to implement a hook? [closed]

I've been told I should implement this hook thing, what does that mean?
-1
votes
2answers
130 views

How to modify and the location of modified hook_form_FORM_ID_alter? [closed]

I am learning to add a checkbox to registration form about agreeing to terms of use, found in modules/system/system.api.php, line 1708 I found an information here in modifying the ...
1
vote
3answers
83 views

Display all nodes for which user appears as a field on that user's profile?

I have a site with a content type "Projects," which has a field "Project Manager" that takes a user. Is there a good way to display all Projects for which a user appears as the Project Manager for ...
0
votes
1answer
79 views

How to have a drupal module respond on node creation

I am trying to convert some of my rules to a custom module for more flexibility and better configuration. However, I am stuck; I want my module to read some fields on node creation (or update). In ...
1
vote
1answer
42 views

Need clarification for “use this hook and some code” type of answers

Whenever the answer to a Drupal question, either here or on blogs and other articles, is to use a hook and then some example code is provided, what are the assumed steps from beginning to end for ...
0
votes
1answer
25 views

why doesn't system_menu() return the option I am expecting [closed]

If you go to this website: https://api.drupal.org/api/drupal/modules%21system%21system.module/function/system_menu/7 You will see what system_menu is supposed to output. My Drupal 7 has a jquery ...