aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-10 12:56:51 -0700
committerFriendika <info@friendika.com>2011-10-10 12:56:51 -0700
commitcaf18164f0f7bd336e61d4393dabf6d93c739879 (patch)
tree15053927bc3605fb52af6e51d84cf055b93341b7 /boot.php
parent06c268b3db815d56a92bfabd8df297f5e4331689 (diff)
parent2ea2e7f4b4a1f890cfcba95e92bf81a273042196 (diff)
downloadvolse-hubzilla-caf18164f0f7bd336e61d4393dabf6d93c739879.tar.gz
volse-hubzilla-caf18164f0f7bd336e61d4393dabf6d93c739879.tar.bz2
volse-hubzilla-caf18164f0f7bd336e61d4393dabf6d93c739879.zip
Merge branch 'pull'
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 3da6d2c33..140ef095a 100644
--- a/boot.php
+++ b/boot.php
@@ -1161,3 +1161,49 @@ function load_contact_links($uid) {
return;
}}
+if(! function_exists('profile_tabs')){
+function profile_tabs($a, $is_owner=False, $nickname=Null){
+ //echo "<pre>"; var_dump($a->user); killme();
+
+ if (is_null($nickname))
+ $nickname = $a->user['nickname'];
+
+ if(x($_GET,'tab'))
+ $tab = notags(trim($_GET['tab']));
+
+ $url = $a->get_baseurl() . '/profile/' . $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/' . $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));
+}}