}
function directory_content(&$a) {
+ $o = '';
+ $o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
$search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');
- $tpl .= file_get_contents('view/directory_header.tpl');
+ $tpl = load_view_file('view/directory_header.tpl');
+
+ $globaldir = '';
+ $gdirpath = dirname(get_config('system','directory_submit_url'));
+ if(strlen($gdirpath)) {
+ $globaldir = '<ul><li><div id="global-directory-link"><a href="'
+ . $gdirpath . '">' . t('Global Directory') . '</a></div></li></ul>';
+ }
$o .= replace_macros($tpl, array(
'$search' => $search,
- '$finding' => (strlen($search) ? "<h4>Finding: '$search'</h4>" : "")
+ '$globaldir' => $globaldir,
+ '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : "")
));
if($search)
);
if(count($r)) {
- $tpl = file_get_contents('view/directory_item.tpl');
+ $tpl = load_view_file('view/directory_item.tpl');
if(in_array('small', $a->argv))
$photo = 'thumb';
foreach($r as $rr) {
+
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$details = '';
if(strlen($rr['locality']))