I am fairly new to drupal, but i must say I am impressed with the ease of use so far. I am developing my own module to monitor the ammount of profit you got with your stocks. The stocks are monitored via finance.yahoo.com. I've done quite some work allready and all the info is put in the database correct. I now want to make a settings page under the administer menu. Something like the link "forums", where you can edit everything for the forum and add forums etc.
I looked at the code from the forums_menu() but somehow i cannot get a link working.
This is the code i have for my hook_menu
function stock_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/stock', 'title' => t('Stock'),
'access' => user_access('add stock));
$items[] = array('path' => 'stock_show',
'title' => t('Stocks'),
'callback' => 'stock_all',
'access' => user_access('access content'),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/stock', 'title' => t('Stocks'),
'callback' => 'stock_all',
'access' => user_access('administer stocks'),
'type' => MENU_NORMAL_ITEM);
}
The node/add/stock works fine and shows up under the create content menu. I guess its quite a simple problem but somehow i cant manage to get it working.