diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-10 15:28:34 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-10 15:28:34 +0200 |
commit | f64e2d63b9ee66482b3461ecb6ee8f7776e23b87 (patch) | |
tree | 9aff5c840b9ec7affe78494e77ff9c2183b6394a /boot.php | |
parent | 077726a193809bed5b1433713b69ce985e177925 (diff) | |
download | volse-hubzilla-f64e2d63b9ee66482b3461ecb6ee8f7776e23b87.tar.gz volse-hubzilla-f64e2d63b9ee66482b3461ecb6ee8f7776e23b87.tar.bz2 volse-hubzilla-f64e2d63b9ee66482b3461ecb6ee8f7776e23b87.zip |
New common tab template. Update css
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -1161,3 +1161,47 @@ function load_contact_links($uid) { return; }} +if(! function_exists('profile_tabs')){ +function profile_tabs($a, $is_owner=False){ + //echo "<pre>"; var_dump($a->user); killme(); + + + if(x($_GET,'tab')) + $tab = notags(trim($_GET['tab'])); + + $url = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + + $tabs = array( + array( + 'label'=>t('Status'), + 'url' => $url, + 'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''), + ), + array( + 'label' => t('Profile'), + 'url' => $url.'/?tab=profile', + 'sel' => (($tab=='profile')?'active':''), + ), + array( + 'label' => t('Photos'), + 'url' => $a->get_baseurl() . '/photos/' . $a->user['nickname'], + 'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''), + ), + ); + + if ($is_owner){ + $tabs[] = array( + 'label' => t('Events'), + 'url' => $a->get_baseurl() . '/events', + 'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''), + ); + $tabs[] = array( + 'label' => t('Personal Notes'), + 'url' => $a->get_baseurl() . '/notes', + 'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''), + ); + } + + $tpl = get_markup_template('common_tabs.tpl'); + return replace_macros($tpl,array('$tabs'=>$tabs)); +}} |