Merge pull request #2871 from Hypolite/issue/#2803-alt

Fix Issue #2803 - Hovercard view profile link and public directory link
This commit is contained in:
Michael Vogel 2016-10-23 10:27:58 +02:00 committed by GitHub
commit 2ca7953471
3 changed files with 200 additions and 202 deletions

View file

@ -159,7 +159,7 @@ function mark_for_death($contact) {
} }
else { else {
/// @todo /// @todo
/// We really should send a notification to the owner after 2-3 weeks /// We really should send a notification to the owner after 2-3 weeks
/// so they won't be surprised when the contact vanishes and can take /// so they won't be surprised when the contact vanishes and can take
/// remedial action if this was a serious mistake or glitch /// remedial action if this was a serious mistake or glitch
@ -288,84 +288,88 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
return($profile); return($profile);
} }
if(! function_exists('contact_photo_menu')){ if (! function_exists('contact_photo_menu')) {
function contact_photo_menu($contact, $uid = 0) { function contact_photo_menu($contact, $uid = 0)
{
$a = get_app(); $a = get_app();
$contact_url=""; $contact_url = '';
$pm_url=""; $pm_url = '';
$status_link=""; $status_link = '';
$photos_link=""; $photos_link = '';
$posts_link=""; $posts_link = '';
$contact_drop_link = ""; $contact_drop_link = '';
$poke_link=""; $poke_link = '';
if ($uid == 0) if ($uid == 0) {
$uid = local_user(); $uid = local_user();
}
if ($contact["uid"] != $uid) { if ($contact['uid'] != $uid) {
if ($uid == 0) { if ($uid == 0) {
$profile_link = zrl($contact['url']); $profile_link = zrl($contact['url']);
$menu = Array('profile' => array(t("View Profile"), $profile_link, true)); $menu = Array('profile' => array(t('View Profile'), $profile_link, true));
return $menu; return $menu;
} }
$r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d", $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d",
dbesc($contact["nurl"]), dbesc($contact["network"]), intval($uid)); dbesc($contact['nurl']), dbesc($contact['network']), intval($uid));
if ($r) if ($r) {
return contact_photo_menu($r[0], $uid); return contact_photo_menu($r[0], $uid);
else { } else {
$profile_link = zrl($contact['url']); $profile_link = zrl($contact['url']);
$connlnk = 'follow/?url='.$contact['url']; $connlnk = 'follow/?url='.$contact['url'];
$menu = Array( $menu = array(
'profile' => array(t("View Profile"), $profile_link, true), 'profile' => array(t('View Profile'), $profile_link, true),
'follow' => array(t("Connect/Follow"), $connlnk, true) 'follow' => array(t('Connect/Follow'), $connlnk, true)
); );
return $menu; return $menu;
} }
} }
$sparkle = false; $sparkle = false;
if($contact['network'] === NETWORK_DFRN) { if ($contact['network'] === NETWORK_DFRN) {
$sparkle = true; $sparkle = true;
$profile_link = $a->get_baseurl() . '/redir/' . $contact['id']; $profile_link = $a->get_baseurl() . '/redir/' . $contact['id'];
} } else {
else
$profile_link = $contact['url']; $profile_link = $contact['url'];
if($profile_link === 'mailbox')
$profile_link = '';
if($sparkle) {
$status_link = $profile_link . "?url=status";
$photos_link = $profile_link . "?url=photos";
$profile_link = $profile_link . "?url=profile";
} }
if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA))) if ($profile_link === 'mailbox') {
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id']; $profile_link = '';
}
if ($contact["network"] == NETWORK_DFRN) if ($sparkle) {
$status_link = $profile_link . '?url=status';
$photos_link = $profile_link . '?url=photos';
$profile_link = $profile_link . '?url=profile';
}
if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) {
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
}
if ($contact['network'] == NETWORK_DFRN) {
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id']; $poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
}
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id']; $contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
$posts_link = $a->get_baseurl() . "/contacts/" . $contact['id'] . '/posts';
$contact_drop_link = $a->get_baseurl() . "/contacts/" . $contact['id'] . '/drop?confirm=1';
$posts_link = $a->get_baseurl() . '/contacts/' . $contact['id'] . '/posts';
$contact_drop_link = $a->get_baseurl() . '/contacts/' . $contact['id'] . '/drop?confirm=1';
/** /**
* menu array: * menu array:
* "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ] * "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ]
*/ */
$menu = Array( $menu = array(
'status' => array(t("View Status"), $status_link, true), 'status' => array(t("View Status"), $status_link, true),
'profile' => array(t("View Profile"), $profile_link, true), 'profile' => array(t("View Profile"), $profile_link, true),
'photos' => array(t("View Photos"), $photos_link,true), 'photos' => array(t("View Photos"), $photos_link, true),
'network' => array(t("Network Posts"), $posts_link,false), 'network' => array(t("Network Posts"), $posts_link, false),
'edit' => array(t("Edit Contact"), $contact_url, false), 'edit' => array(t("View Contact"), $contact_url, false),
'drop' => array(t("Drop Contact"), $contact_drop_link, false), 'drop' => array(t("Drop Contact"), $contact_drop_link, false),
'pm' => array(t("Send PM"), $pm_url, false), 'pm' => array(t("Send PM"), $pm_url, false),
'poke' => array(t("Poke"), $poke_link, false), 'poke' => array(t("Poke"), $poke_link, false),
@ -378,9 +382,11 @@ function contact_photo_menu($contact, $uid = 0) {
$menucondensed = array(); $menucondensed = array();
foreach ($menu AS $menuname=>$menuitem) foreach ($menu AS $menuname => $menuitem) {
if ($menuitem[1] != "") if ($menuitem[1] != '') {
$menucondensed[$menuname] = $menuitem; $menucondensed[$menuname] = $menuitem;
}
}
return $menucondensed; return $menucondensed;
}} }}

View file

@ -903,79 +903,86 @@ function best_link_url($item,&$sparkle,$ssl_state = false) {
} }
if(! function_exists('item_photo_menu')){ if (! function_exists('item_photo_menu')) {
function item_photo_menu($item){ function item_photo_menu($item)
{
$ssl_state = false; $ssl_state = false;
if(local_user()) if(local_user()) {
$ssl_state = true; $ssl_state = true;
}
$sub_link=""; $sub_link = '';
$poke_link=""; $poke_link = '';
$contact_url=""; $contact_url = '';
$pm_url=""; $pm_url = '';
$status_link=""; $status_link = '';
$photos_link=""; $photos_link = '';
$posts_link=""; $posts_link = '';
$network = ""; $network = '';
if((local_user()) && local_user() == $item['uid'] && $item['parent'] == $item['id'] && (! $item['self'])) { if ((local_user()) && local_user() == $item['uid'] && $item['parent'] == $item['id'] && (! $item['self'])) {
$sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;'; $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
} }
$sparkle = false; $sparkle = false;
$profile_link = best_link_url($item,$sparkle,$ssl_state); $profile_link = best_link_url($item, $sparkle, $ssl_state);
if($profile_link === 'mailbox') if ($profile_link === 'mailbox') {
$profile_link = ''; $profile_link = '';
}
$cid = 0; $cid = 0;
$network = ""; $network = '';
$rel = 0; $rel = 0;
$r = q("SELECT `id`, `network`, `rel` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1", $r = q("SELECT `id`, `network`, `rel` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1",
intval(local_user()), dbesc(normalise_link($item['author-link']))); intval(local_user()), dbesc(normalise_link($item['author-link'])));
if ($r) { if ($r) {
$cid = $r[0]["id"]; $cid = $r[0]['id'];
$network = $r[0]["network"]; $network = $r[0]['network'];
$rel = $r[0]["rel"]; $rel = $r[0]['rel'];
} }
if($sparkle) { if($sparkle) {
$status_link = $profile_link."?url=status"; $status_link = $profile_link . '?url=status';
$photos_link = $profile_link."?url=photos"; $photos_link = $profile_link . '?url=photos';
$profile_link = $profile_link."?url=profile"; $profile_link = $profile_link . '?url=profile';
$zurl = ''; $zurl = '';
} else } else {
$profile_link = zrl($profile_link); $profile_link = zrl($profile_link);
}
if($cid && !$item['self']) { if ($cid && !$item['self']) {
$poke_link = 'poke/?f=&c='.$cid; $poke_link = 'poke/?f=&c=' . $cid;
$contact_url = 'contacts/'.$cid; $contact_url = 'contacts/' . $cid;
$posts_link = 'contacts/'.$cid.'/posts'; $posts_link = 'contacts/' . $cid . '/posts';
if (in_array($network, array(NETWORK_DFRN, NETWORK_DIASPORA))) if (in_array($network, array(NETWORK_DFRN, NETWORK_DIASPORA))) {
$pm_url = 'message/new/'.$cid; $pm_url = 'message/new/' . $cid;
}
} }
if (local_user()) { if (local_user()) {
$menu = Array( $menu = Array(
t("Follow Thread") => $sub_link, t('Follow Thread') => $sub_link,
t("View Status") => $status_link, t('View Status') => $status_link,
t("View Profile") => $profile_link, t('View Profile') => $profile_link,
t("View Photos") => $photos_link, t('View Photos') => $photos_link,
t("Network Posts") => $posts_link, t('Network Posts') => $posts_link,
t("Edit Contact") => $contact_url, t('View Contact') => $contact_url,
t("Send PM") => $pm_url t('Send PM') => $pm_url
); );
if ($network == NETWORK_DFRN) if ($network == NETWORK_DFRN) {
$menu[t("Poke")] = $poke_link; $menu[t("Poke")] = $poke_link;
}
if ((($cid == 0) OR ($rel == CONTACT_IS_FOLLOWER)) AND if ((($cid == 0) OR ($rel == CONTACT_IS_FOLLOWER)) AND
in_array($item['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) in_array($item['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) {
$menu[t("Connect/Follow")] = "follow?url=".urlencode($item['author-link']); $menu[t('Connect/Follow')] = 'follow?url=' . urlencode($item['author-link']);
} else }
$menu = array(t("View Profile") => $item['author-link']); } else {
$menu = array(t('View Profile') => $item['author-link']);
}
$args = array('item' => $item, 'menu' => $menu); $args = array('item' => $item, 'menu' => $menu);
@ -983,13 +990,14 @@ function item_photo_menu($item){
$menu = $args['menu']; $menu = $args['menu'];
$o = ""; $o = '';
foreach($menu as $k=>$v){ foreach ($menu as $k => $v) {
if(strpos($v,'javascript:') === 0) { if (strpos($v, 'javascript:') === 0) {
$v = substr($v,11); $v = substr($v, 11);
$o .= "<li role=\"menuitem\"><a onclick=\"$v\">$k</a></li>\n"; $o .= '<li role="menuitem"><a onclick="' . $v . '">' . $k . '</a></li>' . PHP_EOL;
} elseif ($v!='') {
$o .= '<li role="menuitem"><a href="' . $v . '">' . $k . '</a></li>' . PHP_EOL;
} }
elseif ($v!="") $o .= "<li role=\"menuitem\"><a href=\"$v\">$k</a></li>\n";
} }
return $o; return $o;
}} }}

View file

@ -43,181 +43,165 @@ function nav(&$a) {
call_hooks('page_header', $a->page['nav']); call_hooks('page_header', $a->page['nav']);
} }
/**
function nav_info(&$a) { * @brief Prepares a list of navigation links
*
* @param App $a
* @return array
*/
function nav_info(App $a)
{
$ssl_state = ((local_user()) ? true : false); $ssl_state = ((local_user()) ? true : false);
/* /*
*
* Our network is distributed, and as you visit friends some of the * Our network is distributed, and as you visit friends some of the
* sites look exactly the same - it isn't always easy to know where you are. * sites look exactly the same - it isn't always easy to know where you are.
* Display the current site location as a navigation aid. * Display the current site location as a navigation aid.
*
*/ */
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : ''); $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
$sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 ); $sitelocation = $myident . substr($a->get_baseurl($ssl_state), strpos($a->get_baseurl($ssl_state), '//') + 2 );
// nav links: array of array('href', 'text', 'extra css classes', 'title') // nav links: array of array('href', 'text', 'extra css classes', 'title')
$nav = Array(); $nav = array();
/* // Display login or logout
* Display login or logout $nav['usermenu'] = array();
*/
$nav['usermenu']=array();
$userinfo = null; $userinfo = null;
if(local_user()) { if (local_user()) {
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session')); $nav['logout'] = array('logout', t('Logout'), '', t('End this session'));
// user menu // user menu
$nav['usermenu'][] = Array('profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations')); $nav['usermenu'][] = array('profile/' . $a->user['nickname'], t('Status'), '', t('Your posts and conversations'));
$nav['usermenu'][] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page')); $nav['usermenu'][] = array('profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), '', t('Your profile page'));
$nav['usermenu'][] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); $nav['usermenu'][] = array('photos/' . $a->user['nickname'], t('Photos'), '', t('Your photos'));
$nav['usermenu'][] = Array('videos/' . $a->user['nickname'], t('Videos'), "", t('Your videos')); $nav['usermenu'][] = array('videos/' . $a->user['nickname'], t('Videos'), '', t('Your videos'));
$nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events')); $nav['usermenu'][] = array('events/', t('Events'), '', t('Your events'));
$nav['usermenu'][] = Array('notes/', t('Personal notes'), "", t('Your personal notes')); $nav['usermenu'][] = array('notes/', t('Personal notes'), '', t('Your personal notes'));
// user info // user info
$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self` = 1", intval($a->user['uid']));
$userinfo = array( $userinfo = array(
'icon' => (count($r) ? $a->remove_baseurl($r[0]['micro']) : "images/person-48.jpg"), 'icon' => (count($r) ? $a->remove_baseurl($r[0]['micro']) : 'images/person-48.jpg'),
'name' => $a->user['username'], 'name' => $a->user['username'],
); );
} else {
} $nav['login'] = array('login', t('Login'), ($a->module == 'login' ? 'selected' : ''), t('Sign in'));
else {
$nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in'));
} }
// "Home" should also take you home from an authenticated remote profile connection
/*
* "Home" should also take you home from an authenticated remote profile connection
*/
$homelink = get_my_url(); $homelink = get_my_url();
if(! $homelink) if (! $homelink) {
$homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : ''); $homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : '');
}
if(($a->module != 'home') && (! (local_user()))) if (($a->module != 'home') && (! (local_user()))) {
$nav['home'] = array($homelink, t('Home'), "", t('Home Page')); $nav['home'] = array($homelink, t('Home'), '', t('Home Page'));
}
if (($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) {
if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) $nav['register'] = array('register', t('Register'), '', t('Create an account'));
$nav['register'] = array('register',t('Register'), "", t('Create an account')); }
$help_url = 'help'; $help_url = 'help';
if(! get_config('system','hide_help')) if (! get_config('system', 'hide_help')) {
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation')); $nav['help'] = array($help_url, t('Help'), '', t('Help and documentation'));
}
if(count($a->apps)>0) if (count($a->apps) > 0) {
$nav['apps'] = array('apps', t('Apps'), "", t('Addon applications, utilities, games')); $nav['apps'] = array('apps', t('Apps'), '', t('Addon applications, utilities, games'));
}
if (local_user() OR !get_config('system','local_search')) { if (local_user() OR !get_config('system', 'local_search')) {
$nav['search'] = array('search', t('Search'), "", t('Search site content')); $nav['search'] = array('search', t('Search'), '', t('Search site content'));
$nav['searchoption'] = array( $nav['searchoption'] = array(
t("Full Text"), t('Full Text'),
t("Tags"), t('Tags'),
t("Contacts")); t('Contacts'));
if (get_config('system','poco_local_search')) if (get_config('system', 'poco_local_search')) {
$nav['searchoption'][] = t("Forums"); $nav['searchoption'][] = t('Forums');
}
} }
$gdirpath = 'directory'; $gdirpath = 'directory';
if(strlen(get_config('system','singleuser'))) { if (strlen(get_config('system', 'singleuser'))) {
$gdir = get_config('system','directory'); $gdir = get_config('system', 'directory');
if(strlen($gdir)) if(strlen($gdir)) {
$gdirpath = $gdir; $gdirpath = zrl($gdir, true);
}
} elseif (get_config('system', 'community_page_style') == CP_USERS_ON_SERVER) {
$nav['community'] = array('community', t('Community'), '', t('Conversations on this site'));
} elseif (get_config('system', 'community_page_style') == CP_GLOBAL_COMMUNITY) {
$nav['community'] = array('community', t('Community'), '', t('Conversations on the network'));
} }
elseif(get_config('system','community_page_style') == CP_USERS_ON_SERVER)
$nav['community'] = array('community', t('Community'), "", t('Conversations on this site'));
elseif(get_config('system','community_page_style') == CP_GLOBAL_COMMUNITY)
$nav['community'] = array('community', t('Community'), "", t('Conversations on the network'));
if(local_user()) if (local_user()) {
$nav['events'] = Array('events', t('Events'), "", t('Events and Calendar')); $nav['events'] = array('events', t('Events'), '', t('Events and Calendar'));
}
$nav['directory'] = array($gdirpath, t('Directory'), "", t('People directory')); $nav['directory'] = array($gdirpath, t('Directory'), '', t('People directory'));
$nav['about'] = Array('friendica', t('Information'), "", t('Information about this friendica instance')); $nav['about'] = array('friendica', t('Information'), '', t('Information about this friendica instance'));
/* // The following nav links are only show to logged in users
* if (local_user()) {
* The following nav links are only show to logged in users $nav['network'] = array('network', t('Network'), '', t('Conversations from your friends'));
* $nav['net_reset'] = array('network/0?f=&order=comment&nets=all', t('Network Reset'), '', t('Load Network page with no filters'));
*/
if(local_user()) { $nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), '', t('Your posts and conversations'));
$nav['network'] = array('network', t('Network'), "", t('Conversations from your friends')); if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP))) {
$nav['net_reset'] = array('network/0?f=&order=comment&nets=all', t('Network Reset'), "", t('Load Network page with no filters')); // only show friend requests for normal pages. Other page types have automatic friendship.
if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP))) {
$nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations')); $nav['introductions'] = array('notifications/intros', t('Introductions'), '', t('Friend Requests'));
}
if(in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP))) { if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
/* only show friend requests for normal pages. Other page types have automatic friendship. */ $nav['notifications'] = array('notifications', t('Notifications'), '', t('Notifications'));
if(in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP))) $nav['notifications']['all'] = array('notifications/system', t('See all notifications'), '', '');
$nav['introductions'] = array('notifications/intros', t('Introductions'), "", t('Friend Requests')); $nav['notifications']['mark'] = array('', t('Mark as seen'), '', t('Mark all system notifications seen'));
if(in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
$nav['notifications'] = array('notifications', t('Notifications'), "", t('Notifications'));
$nav['notifications']['all']=array('notifications/system', t('See all notifications'), "", "");
$nav['notifications']['mark'] = array('', t('Mark as seen'), '',t('Mark all system notifications seen'));
} }
} }
$nav['messages'] = array('message', t('Messages'), "", t('Private mail')); $nav['messages'] = array('message', t('Messages'), '', t('Private mail'));
$nav['messages']['inbox'] = array('message', t('Inbox'), "", t('Inbox')); $nav['messages']['inbox'] = array('message', t('Inbox'), '', t('Inbox'));
$nav['messages']['outbox']= array('message/sent', t('Outbox'), "", t('Outbox')); $nav['messages']['outbox'] = array('message/sent', t('Outbox'), '', t('Outbox'));
$nav['messages']['new'] = array('message/new', t('New Message'), "", t('New Message')); $nav['messages']['new'] = array('message/new', t('New Message'), '', t('New Message'));
if(is_array($a->identities) && count($a->identities) > 1) { if (is_array($a->identities) && count($a->identities) > 1) {
$nav['manage'] = array('manage', t('Manage'), "", t('Manage other pages')); $nav['manage'] = array('manage', t('Manage'), '', t('Manage other pages'));
} }
$nav['delegations'] = Array('delegate', t('Delegations'), "", t('Delegate Page Management')); $nav['delegations'] = array('delegate', t('Delegations'), '', t('Delegate Page Management'));
$nav['settings'] = array('settings', t('Settings'),"", t('Account settings')); $nav['settings'] = array('settings', t('Settings'), '', t('Account settings'));
if(feature_enabled(local_user(),'multi_profiles')) if (feature_enabled(local_user(), 'multi_profiles')) {
$nav['profiles'] = array('profiles', t('Profiles'),"", t('Manage/Edit Profiles')); $nav['profiles'] = array('profiles', t('Profiles'), '', t('Manage/Edit Profiles'));
}
$nav['contacts'] = array('contacts', t('Contacts'),"", t('Manage/edit friends and contacts')); $nav['contacts'] = array('contacts', t('Contacts'), '', t('Manage/edit friends and contacts'));
} }
/* if (is_site_admin()) {
* Admin page $nav['admin'] = array('admin/', t('Admin'), '', t('Site setup and configuration'));
*/ }
if (is_site_admin()){
$nav['admin'] = array('admin/', t('Admin'), "", t('Site setup and configuration'));
}
$nav['navigation'] = array('navigation/', t('Navigation'), '', t('Site map'));
$nav['navigation'] = array('navigation/', t('Navigation'), "", t('Site map')); // Provide a banner/logo/whatever
$banner = get_config('system', 'banner');
if ($banner === false) {
/* $banner = '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
* }
* Provide a banner/logo/whatever
*
*/
$banner = get_config('system','banner');
if($banner === false)
$banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
call_hooks('nav_info', $nav); call_hooks('nav_info', $nav);
return array( return array(
'sitelocation' => $sitelocation, 'sitelocation' => $sitelocation,
'nav' => $nav, 'nav' => $nav,