From 80ed4242ee71031f73aa4ef32f17edbf6e989f51 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 28 Feb 2011 19:44:47 -0800 Subject: [PATCH] singleuser site mode plus fix search template layout --- include/nav.php | 10 +++++++++- mod/home.php | 6 ++++-- mod/network.php | 1 + mod/search.php | 1 + view/search_item.tpl | 7 ++++--- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/nav.php b/include/nav.php index 430841722b..bfbc10f5a7 100644 --- a/include/nav.php +++ b/include/nav.php @@ -63,8 +63,16 @@ function nav(&$a) { } $a->page['nav'] .= '' . t('Search') . "\r\n"; - $a->page['nav'] .= '' . t('Directory') . "\r\n"; + $gdirpath = 'directory'; + + if(strlen(get_config('system','singleuser'))) { + $gdir = dirname(get_config('system','directory_submit_url')); + if(strlen($gdir)) + $gdirpath = $gdir; + } + + $a->page['nav'] .= '' . t('Directory') . "\r\n"; /** * diff --git a/mod/home.php b/mod/home.php index d45b13ed5f..20d38cfca9 100644 --- a/mod/home.php +++ b/mod/home.php @@ -4,9 +4,11 @@ if(! function_exists('home_init')) { function home_init(&$a) { if(local_user() && ($a->user['nickname'])) - goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); + goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); + + if(strlen(get_config('system','singleuser'))) + goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser')); - $a->page['htmlhead'] .= "get_baseurl() . "/profile/%s" . "\" />\r\n"; }} diff --git a/mod/network.php b/mod/network.php index e50723ae72..8ac51cee36 100644 --- a/mod/network.php +++ b/mod/network.php @@ -245,6 +245,7 @@ function network_content(&$a, $update = 0) { $o .= replace_macros($tpl,array( '$id' => $item['item_id'], + '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, '$name' => $profile_name, '$sparkle' => $sparkle, diff --git a/mod/search.php b/mod/search.php index a6a4b613fc..561bb6c620 100644 --- a/mod/search.php +++ b/mod/search.php @@ -113,6 +113,7 @@ function search_content(&$a) { $o .= replace_macros($tpl,array( '$id' => $item['item_id'], + '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, '$name' => $profile_name, '$sparkle' => $sparkle, diff --git a/view/search_item.tpl b/view/search_item.tpl index 0547fd9efb..fcdaac834c 100644 --- a/view/search_item.tpl +++ b/view/search_item.tpl @@ -2,19 +2,20 @@
- +
$lock - $name + $name
$ago
$location
$title
+
$body