aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-10-10 07:33:41 -0700
committerfabrixxm <fabrix.xm@gmail.com>2011-10-10 07:33:41 -0700
commited07a4def34a44be323a9b0d61e2d9eb0701ec4a (patch)
tree960cb038d94a5c7715a59e5346358e9ae7afe5e8 /boot.php
parent3174847de80600be5e0bf32864edca79388d6433 (diff)
parentf64e2d63b9ee66482b3461ecb6ee8f7776e23b87 (diff)
downloadvolse-hubzilla-ed07a4def34a44be323a9b0d61e2d9eb0701ec4a.tar.gz
volse-hubzilla-ed07a4def34a44be323a9b0d61e2d9eb0701ec4a.tar.bz2
volse-hubzilla-ed07a4def34a44be323a9b0d61e2d9eb0701ec4a.zip
Merge pull request #26 from fabrixxm/master
New common tab template. Updated css
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index c8ec84681..d4e9ed0d6 100644
--- a/boot.php
+++ b/boot.php
@@ -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));
+}}