You are here

drupal 专业开发第一个开发模块的例子跑不起来。

changan 的头像
Submitted by changan on 星期三, 2009-04-29 14:40

我照着书上的列子一步步往下做。写了annotate.info, annotate.module和annotate.admin.inc文件。。
在站点构建->模块中看到了我的annotate模块,并购选了它。保存设置后,到站点->设置(site configuration)中看不到我的注释模块的菜单。。不知道是什么原因。我把我的文件贴出来。大家看看有什么地方不对?谢谢

<?php
// $Id$
/**
* @file
* Lets users add private annotations to nodes.
*
* Adds a text field when a node is displayed
* so that authenticated users may make notes.
*/

/**
* Implementation of hook_menu()
*/
function annotate_menu(){
$items[ 'admin/settings/annotate' ] = array(
'title' => 'Annotation settings',
'description' => 'Change how annotations behave.',
'page callback' => 'drupal_get_form',
'page arguments' => array( 'annotate_admin_settings' ),
'access arguments' => array( 'administer site configuration' ),
'type' => MENU_NORMAL_ITEM,
'file' => 'annotate.admin.inc'
);

return $items;
}

论坛:

g089h515r806 的头像

缓存,有没有清空Drupal缓存

g089h515r806 的头像

经验的问题,刚开始总会遇到这个问题,建议你按照我讲的20个问题中,做一下缓存试验,还有阅读Drupal专业开发指南的缓存一节,
初学者,还有特别高的高手经常会遇到缓存的问题。