diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-10-06 18:26:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-10-06 18:26:01 +0000 |
commit | 67e4f74449cf17f4769e401debb6a7b1d9fefd63 (patch) | |
tree | 82ca7b6cf013c3d32d468fd613a40b1ca1c68e09 /modules/tracker.module | |
parent | 67925ce081c30b7c1ec6ff591c1546013f032cb9 (diff) | |
download | brdo-67e4f74449cf17f4769e401debb6a7b1d9fefd63.tar.gz brdo-67e4f74449cf17f4769e401debb6a7b1d9fefd63.tar.bz2 |
- Usability improvement: the 'recent posts' feature on the user pages lead
to a page with a confusing (wrong) title so I shuffled things around a bit
and tab-ified it as 'track'.
Diffstat (limited to 'modules/tracker.module')
-rw-r--r-- | modules/tracker.module | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/tracker.module b/modules/tracker.module index 24951d50e..925c6b998 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -37,6 +37,13 @@ function tracker_menu($may_cache) { 'type' => MENU_LOCAL_TASK); } } + else { + if (arg(0) == 'user' && is_numeric(arg(1))) { + $items[] = array('path' => 'user/'. arg(1) .'/track', 'title' => t('track posts'), + 'callback' => 'tracker_track_user', 'access' => user_access('access content'), + 'type' => MENU_LOCAL_TASK); + } + } return $items; } @@ -44,6 +51,13 @@ function tracker_menu($may_cache) { /** * Menu callback. Prints a listing of active nodes on the site. */ +function tracker_track_user() { + tracker_page(arg(1)); +} + +/** + * Menu callback. Prints a listing of active nodes on the site. + */ function tracker_page($uid = 0) { global $user; @@ -90,10 +104,4 @@ function tracker_page($uid = 0) { print theme('page', $output); } -function tracker_user($type, &$edit, &$user) { - if ($type == 'view' && user_access('access content')) { - return array(t('History') => form_item(t('Recent posts'), l(t('recent posts'), "tracker/$user->uid"))); - } -} - ?> |