From 08d21336afb53383271527693614a114704bcbee Mon Sep 17 00:00:00 2001 From: Quitta Date: Mon, 2 Sep 2013 23:52:42 +0200 Subject: [PATCH] added help hook, to make it viewable in the help menu, however still unsure if I have to make a page or block or a combination.. --- .../ryzommanage/ryzommanage.module | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module index 6177aa3e3..647cf453e 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module @@ -115,6 +115,15 @@ function ryzommanage_menu() 'type' => MENU_CALLBACK, ); + $items['ams'] = array( + 'title' => 'Account Management System', + 'page callback' => '_collect_ams', + 'page arguments' => array(1, 2), + 'access callback' => 'user_access', + 'access arguments' => array('access content'), + 'type' => MENU_CALLBACK, + ); + //main menu item $items['admin/config/ryzommanage'] = array( 'title' => 'Ryzom Server Integration', @@ -384,7 +393,6 @@ function createUser($values, $user_id) }*/ function ryzommanage_user_login(&$edit, $account){ - echo "You just logged in with id"; $_SESSION['user'] = $account->name; $_SESSION['id'] = $account->uid; $_SESSION['ticket_user'] = Ticket_User::constr_ExternId($_SESSION['id']); @@ -495,6 +503,7 @@ function ryzommanage_form_user_register_form_alter(&$form, &$form_state, $form_i '#title' => t("I agree with the terms and conditions."), '#required' => TRUE, ); + } function ryzommanage_form_user_profile_form_alter(&$form, &$form_state, $form_id) { @@ -887,3 +896,20 @@ function return_client_httpdata() } } +/** +* Implements hook_help. +* +* Displays help and module information. +* +* @param path +* Which path of the site we're using to display help +* @param arg +* Array that holds the current path as returned from arg() function +*/ +function ryzommanage_help($path, $arg) { + switch ($path) { + case "admin/help#ryzommanage": + return '

' . t("A module that handles account registration and a ticketing service regarding ryzomcore.") . '

'; + break; + } +} \ No newline at end of file