mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 17:29:10 +00:00
added amsblock and a menu item for the ams page
--HG-- branch : quitta-gsoc-2013
This commit is contained in:
parent
99fa5d938c
commit
6ccc60660a
1 changed files with 31 additions and 6 deletions
|
@ -11,6 +11,7 @@ menu items that do stuff
|
||||||
*/
|
*/
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors', 'on');
|
ini_set('display_errors', 'on');
|
||||||
|
ini_set('display_startup_errors', TRUE);
|
||||||
|
|
||||||
global $TOS_URL;
|
global $TOS_URL;
|
||||||
global $cfg;
|
global $cfg;
|
||||||
|
@ -103,7 +104,7 @@ function ryzommanage_menu()
|
||||||
'page arguments' => array(1, 2),
|
'page arguments' => array(1, 2),
|
||||||
'access callback' => 'user_access',
|
'access callback' => 'user_access',
|
||||||
'access arguments' => array('access content'),
|
'access arguments' => array('access content'),
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_CALLBACK
|
||||||
);
|
);
|
||||||
|
|
||||||
$items['login'] = array(
|
$items['login'] = array(
|
||||||
|
@ -112,16 +113,15 @@ function ryzommanage_menu()
|
||||||
'page arguments' => array(1, 2),
|
'page arguments' => array(1, 2),
|
||||||
'access callback' => 'user_access',
|
'access callback' => 'user_access',
|
||||||
'access arguments' => array('access content'),
|
'access arguments' => array('access content'),
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_CALLBACK
|
||||||
);
|
);
|
||||||
|
|
||||||
$items['ams'] = array(
|
$items['ams'] = array(
|
||||||
'title' => 'Account Management System',
|
'title' => 'Ryzom Account Management System',
|
||||||
'page callback' => '_collect_ams',
|
'page callback' => '_ams_callback',
|
||||||
'page arguments' => array(1, 2),
|
|
||||||
'access callback' => 'user_access',
|
'access callback' => 'user_access',
|
||||||
'access arguments' => array('access content'),
|
'access arguments' => array('access content'),
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_NORMAL_ITEM
|
||||||
);
|
);
|
||||||
|
|
||||||
//main menu item
|
//main menu item
|
||||||
|
@ -163,6 +163,12 @@ function ryzommanage_menu()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _ams_callback(){
|
||||||
|
//an empty call back function, because we need an empty page!
|
||||||
|
//without this the page gets access denied, perhaps for later use..
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Function ryzommanage_menu
|
* Function ryzommanage_menu
|
||||||
|
@ -198,6 +204,15 @@ function ryzommanage_block_info()
|
||||||
'region' => '-1', // Not usually provided.
|
'region' => '-1', // Not usually provided.
|
||||||
'visibility' => BLOCK_VISIBILITY_LISTED // Not usually provided.
|
'visibility' => BLOCK_VISIBILITY_LISTED // Not usually provided.
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$blocks['ryzommanage_amsblock'] = array(
|
||||||
|
// info: The name of the block.
|
||||||
|
'info' => t('Ryzom AMS Block'),
|
||||||
|
'status' => TRUE,
|
||||||
|
'region' => '-1', // Not usually provided.
|
||||||
|
'visibility' => BLOCK_VISIBILITY_LISTED,
|
||||||
|
'pages' => 'ams'
|
||||||
|
);
|
||||||
return $blocks;
|
return $blocks;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -219,6 +234,11 @@ function ryzommanage_block_view($delta = '')
|
||||||
$block['subject'] = t("uppercase this please");
|
$block['subject'] = t("uppercase this please");
|
||||||
$block['content'] = top_bar();
|
$block['content'] = top_bar();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'ryzommanage_amsblock':
|
||||||
|
$block['subject'] = t("uppercase this please");
|
||||||
|
$block['content'] = ams_handler();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return $block;
|
return $block;
|
||||||
}
|
}
|
||||||
|
@ -467,6 +487,11 @@ function top_bar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ams_handler()
|
||||||
|
{
|
||||||
|
return "This is a placeholder.";
|
||||||
|
}
|
||||||
|
|
||||||
function ryzommanage_user_presave(&$edit, $account, $category)
|
function ryzommanage_user_presave(&$edit, $account, $category)
|
||||||
{
|
{
|
||||||
if (isset($edit['unhashpass'])) {
|
if (isset($edit['unhashpass'])) {
|
||||||
|
|
Loading…
Reference in a new issue