| 80 |
} |
} |
| 81 |
|
|
| 82 |
/** |
/** |
| 83 |
* Implementation of space->links(). |
* Implementation of space->user_links(). |
| 84 |
*/ |
*/ |
| 85 |
function links(&$links) { |
function user_links() { |
| 86 |
if ($this->admin_access()) { |
return array(); |
| 87 |
// Add settings link for administering spaces |
} |
| 88 |
|
|
| 89 |
|
/** |
| 90 |
|
* Implementation of space->admin_links(). |
| 91 |
|
*/ |
| 92 |
|
function admin_links() { |
| 93 |
|
$item = menu_get_item("user/{$this->sid}/edit"); |
| 94 |
|
if ($item && $item['access']) { |
| 95 |
$links['settings'] = array( |
$links['settings'] = array( |
| 96 |
'title' => t('Account settings'), |
'title' => t('Account settings'), |
| 97 |
'href' => 'user/'. $this->sid .'/edit', |
'href' => $item['href'], |
|
'attributes' => array('class' => 'settings'), |
|
| 98 |
); |
); |
| 99 |
} |
} |
| 100 |
} |
} |
| 243 |
} |
} |
| 244 |
|
|
| 245 |
/** |
/** |
| 246 |
|
* Implementation of hook_menu_alter(). |
| 247 |
|
*/ |
| 248 |
|
function spaces_user_menu_alter(&$items) { |
| 249 |
|
// Remove the "View" local task from the user menu, since we are pushing |
| 250 |
|
// visitors to the user's configured space homepage anyway. |
| 251 |
|
$items['user/%user/view']['type'] = MENU_CALLBACK; |
| 252 |
|
} |
| 253 |
|
|
| 254 |
|
/** |
| 255 |
* Implementation of hook_spaces_types(). |
* Implementation of hook_spaces_types(). |
| 256 |
*/ |
*/ |
| 257 |
function spaces_user_spaces_types() { |
function spaces_user_spaces_types() { |