diff options
author | Friendika <info@friendika.com> | 2011-10-11 19:27:58 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-11 19:27:58 -0700 |
commit | 2206d894b3fec7064b91e0420bcc2b16e9e7009b (patch) | |
tree | dff69c246dbba923a76e68404e2c012acbb29c07 /mod/directory.php | |
parent | 557a7d0cec31a36d12898429c479c71671833dfd (diff) | |
download | volse-hubzilla-2206d894b3fec7064b91e0420bcc2b16e9e7009b.tar.gz volse-hubzilla-2206d894b3fec7064b91e0420bcc2b16e9e7009b.tar.bz2 volse-hubzilla-2206d894b3fec7064b91e0420bcc2b16e9e7009b.zip |
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.
Diffstat (limited to 'mod/directory.php')
-rw-r--r-- | mod/directory.php | 16 |
1 files changed, 13 insertions, 3 deletions
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 = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory' . '">' . t('Normal site view') . '</a></div></li></ul>'; else - $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory/all' . '">' . t('View all site entries') . '</a></div></li></ul>'; + $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory/all' . '">' . t('Admin - View all site entries') . '</a></div></li></ul>'; } $o .= replace_macros($tpl, array( '$search' => $search, '$globaldir' => $globaldir, + '$desc' => t('Find on this site'), '$admin' => $admin, '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""), '$sitedir' => t('Site Directory'), |