Posted by sohailx2x on December 5, 2012 at 5:09am
I am learning to create a module. I have created a simple module. The modules successfully appeared in modules list in admin panel. Now I am learning to implement a hook. But the Help link doesn't appear in the admin panel. Following are files I created for module. Please review these codes and help me if there is something wrong there? I am using drupal 7.
customsite.info file code
; $Id$
name = Custom Site functions
description = Custom functions for this site.
core = 7.xcustomsite.install file code
?php
// $Id: customsite.install
/**
* Implementation of hook_install()
*/
function customsite_install() {
// Set the module weight so it can override other modules.
db_query("UPDATE {system} SET weight = 99 WHERE name = 'customsite'");
}
/**
* Implementation of hook_uninstall()
*/
function customsite_uninstall() {
// Remove variables which is defined in our module
variable_del('customsite_setting1');
variable_del('customsite_setting2');
}customsite.module file code
<?php
// $Id: customsite.module
/**
* @file
* Custom functions for this site.
*/
function customsite_help($path, $arg) {
switch ($path) {
case "admin/help#customsite":
return '<p>' . t("Displays links to nodes created on this date") . '</p>';
break;
}
}