aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-21 13:38:44 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-21 13:38:44 +0100
commit546867c1025d599f1176e3025246d3fe2e408a13 (patch)
tree65d1682024e256a4f6d04db6204e80c8bceb7e18 /include
parent42fbc28b1127243a39cafffa989e6147108e89a9 (diff)
downloadvolse-hubzilla-546867c1025d599f1176e3025246d3fe2e408a13.tar.gz
volse-hubzilla-546867c1025d599f1176e3025246d3fe2e408a13.tar.bz2
volse-hubzilla-546867c1025d599f1176e3025246d3fe2e408a13.zip
add icon, name and thumb to profile tabs. remove login app - we have login in the panel now.
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php40
1 files changed, 27 insertions, 13 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 99604f942..da4f974a6 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1775,6 +1775,9 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
if (App::$is_sys)
return;
+ if (get_pconfig($uid, 'system', 'noprofiletabs'))
+ return;
+
$channel = App::get_channel();
if (is_null($nickname))
@@ -1809,9 +1812,6 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
$has_webpages = (($r) ? true : false);
- if (get_pconfig($uid, 'system', 'noprofiletabs'))
- return;
-
if (x($_GET, 'tab'))
$tab = notags(trim($_GET['tab']));
@@ -1825,6 +1825,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'channel') ? 'active' : ''),
'title' => t('Status Messages and Posts'),
'id' => 'status-tab',
+ 'icon' => 'home'
),
);
@@ -1837,6 +1838,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'profile') ? 'active' : ''),
'title' => t('Profile Details'),
'id' => 'profile-tab',
+ 'icon' => 'user'
);
}
if ($p['view_storage']) {
@@ -1846,6 +1848,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'photos') ? 'active' : ''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
+ 'icon' => 'photo'
);
$tabs[] = array(
'label' => t('Files'),
@@ -1853,6 +1856,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'cloud' || argv(0) == 'sharedwithme') ? 'active' : ''),
'title' => t('Files and Storage'),
'id' => 'files-tab',
+ 'icon' => 'folder-open'
);
}
@@ -1863,6 +1867,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''),
'title' => t('Events'),
'id' => 'event-tab',
+ 'icon' => 'calendar'
);
}
@@ -1876,6 +1881,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'chat') ? 'active' : '' ),
'title' => t('Chatrooms'),
'id' => 'chat-tab',
+ 'icon' => 'comments-o'
);
}
}
@@ -1889,6 +1895,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'bookmarks') ? 'active' : ''),
'title' => t('Saved Bookmarks'),
'id' => 'bookmarks-tab',
+ 'icon' => 'bookmark'
);
}
@@ -1899,27 +1906,34 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
'title' => t('View Webpages'),
'id' => 'webpages-tab',
+ 'icon' => 'newspaper-o'
);
}
- if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
- $tabs[] = array(
- 'label' => t('Wikis'),
- 'url' => z_root() . '/wiki/' . $nickname,
- 'sel' => ((argv(0) == 'wiki') ? 'active' : ''),
- 'title' => t('Wiki'),
- 'id' => 'wiki-tab',
- );
+ if ($p['view_wiki']) {
+ if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
+ $tabs[] = array(
+ 'label' => t('Wikis'),
+ 'url' => z_root() . '/wiki/' . $nickname,
+ 'sel' => ((argv(0) == 'wiki') ? 'active' : ''),
+ 'title' => t('Wiki'),
+ 'id' => 'wiki-tab',
+ 'icon' => 'pencil-square-o'
+ );
+ }
}
-
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
call_hooks('profile_tabs', $arr);
$tpl = get_markup_template('profile_tabs.tpl');
- return replace_macros($tpl,array('$tabs' => $arr['tabs']));
+ return replace_macros($tpl, array(
+ '$tabs' => $arr['tabs'],
+ '$name' => App::$profile['channel_name'],
+ '$thumb' => App::$profile['thumb']
+ ));
}