function directory_content(&$a) {
+
+ if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+ notice( t('Public access denied.') . EOL);
+ return;
+ }
+
$o = '';
$o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
if(x($_SESSION,'theme'))
else
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
- $tpl = load_view_file('view/directory_header.tpl');
+ $tpl = file_get_contents('view/directory_header.tpl');
$globaldir = '';
$gdirpath = dirname(get_config('system','directory_submit_url'));
$o .= replace_macros($tpl, array(
'$search' => $search,
'$globaldir' => $globaldir,
- '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : "")
+ '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""),
+ '$sitedir' => t('Site Directory'),
+ '$submit' => t('Find')
));
if($search)
);
if(count($r)) {
- $tpl = load_view_file('view/directory_item.tpl');
+ $tpl = file_get_contents('view/directory_item.tpl');
if(in_array('small', $a->argv))
$photo = 'thumb';