]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
highlight any messages on page newer than 12 hours
[friendica.git] / mod / directory.php
index 6aa890226b6479679e7a04c6188655dfd2304810..703c08ce1bec37bfdd1add92c130fd5b812f05e4 100644 (file)
@@ -4,16 +4,23 @@ function directory_init(&$a) {
 }
 
 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 .= load_view_file('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,
+               '$globaldir' => $globaldir,
                '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : "")
        ));