First, I am new at Drupal. I am trying to add a submenu item to My homepage/Content/Options above all Add Post, Add Post by type, Add User Post... I would like to add to that submenu item Create new post. When user would click on that item, some kind of create node would show up in the content area.
I have managed so far to add a new link $output .= '<li>'. l('Create new Post', 'mysite/'. arg(1) .'/'. $link .'/'. $page .'/'. 'create') . '</li>';
in Mysite.module, inside the function theme_mysite_submenu. My problem is, that I do not know how to populate the content now. Where should go the code for create new post, where do I link it to Create new Post link? So far I have only worked with path that had a callback function, and then the function would take care of the content. But in the MySite module I do not understand which function is called when the user click on the '<li>'. l($item['label'], 'mysite/'. arg(1) .'/'. $link .'/'. $page .'/'. $key);
I would really appreciate any hint, I am kind of stuck here.
Urska
Comments
Comment #1
agentrickardDo not hack the core module. You want to create a Content Type plugin, as defined in the module's API.php file.
The 'droplet.inc' file in plugings/types is probably the closest to what you want.
MySite is closed to new features.
Comment #2
RSM CreditAttribution: RSM commentedDeprecated: Function ereg() is deprecated in C:\Program Files\wamp\www\drupal\includes\file.inc on line 895
Deprecated: Function ereg() is deprecated in C:\Program Files\wamp\www\drupal\includes\file.inc on line 895
Deprecated: Function ereg() is deprecated in C:\Program Files\wamp\www\drupal\includes\file.inc on line 895
Deprecated: Function ereg() is deprecated in C:\Program Files\wamp\www\drupal\includes\file.inc on line 895
Comment #3
agentrickard1) This has nothing to do with the MySite module.
2) This is a PHP 5.3 strict warning. If you are still running Drupal 5, it is not optimized for PHP 5.3. Search for proper solutions.