Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I want to add a new item to the node menu (the edit/view tabs under the node title). I have constructed the following menu item, but it doesn't show up.
$items[] = array(
"path" => "node/{$nid}/mymodule", //$nid was determined before
"title" => "My module action",
"callback" => "mymodule_additional_node_info",
"type" => MENU_LOCAL_TASK,
"access" => true //Just to make sure it really shows up
);
I am using article module and I would like to add some content to mysite.com/article before showing all the articles. Where should I add html? please help.
Thanks in advance.
Kind regards
Onesimpleman
I am new to the Drupal way of doing things and I've looked through a lot of docs pertaining to modules (and worked through a couple tutorials) but I'm still confused. Basically my main concern right now is that I can set up a node module (no block needed right now) and set up the settings function so that an admin user can change certain settings in the control panel. I don't really need all the advanced function hooks, just the basics plus the settings hook. What function hook do you use if you don't set up the module as a block?
I'll start this by saying that I'm working on my very first Drupal module, and I'm confused.
I'm trying to create a module that integrates Colourmod with Drupal to select colours. I've checked out the Colourmod installation instructions and the whole thing relies on some id's and classes being specified and detected by the scripts:
So at this point I'm basically trying to get it working in the settings area to eventually specify "default colours" that would be able to be used by other modules. The problem is that the hook_settings only seem to allow form items and not any other code.
Could someone point out an example of a settings page that doesn't use the hook, a method to use the hook, or point out what I am missing?
I started mucking around with Drupal 4.7 today. I was surprised by the total change to the forms API. I had already written a few modules for 4.6.3 and it was too much of a PITA to rewrite all the code manually. So instead I took a couple of hours to write a PHP script that would help me. Just put this somewhere in your drupal directory and access it through a browser.
Hi,
I am just learnign drupal and I mostly copy pasted together my own node module out of node example and the image.module with the help of this great thread:
Everything works fine so far, but when I submit a new post with my own node I get the following error : 'File copy failed: source file does not exist.' Everything works fine though, drupal creates the thumbnails, previews and the original