diff options
Diffstat (limited to 'muamba.module')
-rw-r--r-- | muamba.module | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/muamba.module b/muamba.module index 08daf72..ada81d0 100644 --- a/muamba.module +++ b/muamba.module @@ -4,3 +4,67 @@ * @file * Multiple-user Asset Manager and Borrowing Ambient. */ + +/** + * Implements hook_permission() + */ +function muamba_permission() { + return array( + /* + *'administer my module' => array( + * 'title' => t('Administer my module'), + * 'description' => t('Perform administration tasks for my module.'), + *), + */ + 'request item' => array( + 'title' => t('Request an item.'), + 'description' => t('Request an item to be borrowed or donated.'), + ), + ); +} + +/** + * Implements hook_menu() + */ +function muamba_menu() { + /* + *$items['blog'] = array( + * 'title' => 'blogs', + * 'page callback' => 'blog_page', + * 'access arguments' => array('access content'), + * 'type' => MENU_SUGGESTED_ITEM, + *); + */ + $items['muamba/request'] = array( + 'title' => 'Request item', + 'page callback' => 'muamba_request', + 'access arguments' => array('request item'), + 'type' => MENU_SUGGESTED_ITEM, + 'file' => 'muamba.misc.inc', + ); + + return $items; +} + +/** + * Implements hook_node_view() + */ +function muamba_node_view($node, $view_mode, $langcode) { + /* + *$node->content['my_additional_field'] = array( + * '#markup' => $additional_field, + * '#weight' => 10, + * '#theme' => 'mymodule_my_additional_field', + *); + */ + global $user; + + if ($view_mode == 'full') { + $node->content['muamba'] = array( + '#markup' => 'Request item.', + '#weight' => 100, + ); + + return $node; + } +} |