From 2206d894b3fec7064b91e0420bcc2b16e9e7009b Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 11 Oct 2011 19:27:58 -0700 Subject: add contact_widgets and provide widgets on appropriate pages, fix the saved search widget fix directory page on testbubble, don't use system theme for community, directory, and search if the viewer is logged in. --- mod/directory.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'mod/directory.php') diff --git a/mod/directory.php b/mod/directory.php index 93abcd5de..5f00b4f5a 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -2,6 +2,17 @@ function directory_init(&$a) { $a->set_pager_itemspage(60); + + if(local_user()) { + require_once('include/contact_widgets.php'); + + $a->page['aside'] .= findpeople_widget(); + + } + else + unset($_SESSION['theme']); + + } @@ -23,8 +34,6 @@ function directory_content(&$a) { $o = ''; nav_set_selected('directory'); - if(x($_SESSION,'theme')) - unset($_SESSION['theme']); if(x($a->data,'search')) $search = notags(trim($a->data['search'])); @@ -45,12 +54,13 @@ function directory_content(&$a) { if($everything) $admin = ''; else - $admin = ''; + $admin = ''; } $o .= replace_macros($tpl, array( '$search' => $search, '$globaldir' => $globaldir, + '$desc' => t('Find on this site'), '$admin' => $admin, '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : ""), '$sitedir' => t('Site Directory'), -- cgit v1.2.3