aboutsummaryrefslogtreecommitdiff
path: root/muamba.module
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-23 13:12:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-23 13:12:54 -0300
commit38ceba80bef2c989d3431ba3173ea1f9a58b6fa6 (patch)
treefb5bbb32c97f6a4d5deb001c9b1442d341a395d4 /muamba.module
parentd39c2f5803fb6f01bc2b42b1f955fee3c2c64038 (diff)
downloadmuamba-38ceba80bef2c989d3431ba3173ea1f9a58b6fa6.tar.gz
muamba-38ceba80bef2c989d3431ba3173ea1f9a58b6fa6.tar.bz2
Fixing schema
Diffstat (limited to 'muamba.module')
-rw-r--r--muamba.module64
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;
+ }
+}