51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
<?php
|
|
|
|
/**
|
|
* Implements hook_theme().
|
|
*/
|
|
function mon_agglo_comptecitoyen_theme($existing, $type, $theme, $path) {
|
|
$themes = array(
|
|
'news_lists' => array('template' => 'templates/news_lists'),//page principale
|
|
);
|
|
|
|
return $themes;
|
|
}
|
|
|
|
function mon_agglo_comptecitoyen_menu() {
|
|
$items['user/%user_uid_optional'] = array(
|
|
'title' => 'Newsletter',
|
|
'title callback' => 'user_page_title',
|
|
'title arguments' => array(1),
|
|
#'page callback' => 'mymodule_callback',
|
|
#'page arguments' => array(1),
|
|
'access callback' => 'user_view_access',
|
|
'access arguments' => array(1),
|
|
'parent' => '',
|
|
);
|
|
}
|
|
|
|
function _edit_user_callback() {
|
|
unset($_REQUEST['destination']);
|
|
return drupal_goto('http://idp-montpellier.entrouvert.org/fr/mon-compte');
|
|
}
|
|
|
|
function mon_agglo_comptecitoyen_menu_alter(&$items) {
|
|
// Specify the View page as just a regular tab.
|
|
$items['user/%user/view']['type'] = MENU_LOCAL_TASK;
|
|
$items['user/%user/view']['page callback'] = $items['user/%user_uid_optional']['page callback'];
|
|
$items['user/%user/view']['page arguments'] = $items['user/%user_uid_optional']['page arguments'];
|
|
$items['user/%user/view']['access callback'] = $items['user/%user_uid_optional']['access callback'];
|
|
$items['user/%user/view']['access arguments'] = $items['user/%user_uid_optional']['access arguments'];
|
|
$items['user/%user/view']['file'] = $items['user/%user_uid_optional']['file'];
|
|
// Normal tabs don't have a weight
|
|
unset($items['user/%user/view']['weight']);
|
|
|
|
$items['user/%user_uid_optional']['page callback'] = $items['user/%user/newsletter']['page callback'];
|
|
$items['user/%user_uid_optional']['page arguments'] = $items['user/%user/newsletter']['page arguments'];
|
|
|
|
$items['user/%user/newsletter']['type'] = MENU_DEFAULT_LOCAL_TASK;
|
|
$items['user/%user/newsletter']['weight'] = -10;
|
|
|
|
$items['user/%user/edit']['page callback'] = '_edit_user_callback';
|
|
}
|