diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-09-23 18:33:07 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-09-23 18:33:07 -0700 |
commit | 0ebd4aa78303792a97c111229080224ba1bcf2de (patch) | |
tree | c6da0c5a9cdb95f347ec895429f975667388e91a | |
parent | 4c2fbc81a043eabb984bf2da56081102dda64b70 (diff) | |
download | volse-hubzilla-0ebd4aa78303792a97c111229080224ba1bcf2de.tar.gz volse-hubzilla-0ebd4aa78303792a97c111229080224ba1bcf2de.tar.bz2 volse-hubzilla-0ebd4aa78303792a97c111229080224ba1bcf2de.zip |
per design spec, hide global directory if update url not present
-rw-r--r-- | mod/directory.php | 8 | ||||
-rw-r--r-- | view/directory_header.tpl | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mod/directory.php b/mod/directory.php index 6aa890226..01cb1a3ff 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -10,10 +10,16 @@ function directory_content(&$a) { $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>' : "") )); diff --git a/view/directory_header.tpl b/view/directory_header.tpl index ba39236f2..03eed62b3 100644 --- a/view/directory_header.tpl +++ b/view/directory_header.tpl @@ -1,6 +1,6 @@ <h1>Site Directory</h1> -<ul><li><div id="global-directory-link"><a href="http://dir.dfrn.org">Global Directory</a></div></li></ul> +$globaldir $finding |