add link to search forums in the directory

This commit is contained in:
friendica 2014-11-23 18:54:33 -08:00
parent 5bb794cc28
commit 79e5c2456b
3 changed files with 12 additions and 2 deletions

View file

@ -53,10 +53,11 @@ function check_upstream_directory() {
function dir_sort_links() {
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
'$header' => t('Sort Options'),
'$header' => t('Directory Options'),
'$normal' => t('Alphabetic'),
'$reverse' => t('Reverse Alphabetic'),
'$date' => t('Newest to Oldest')
'$date' => t('Newest to Oldest'),
'$pubforums' => t('Public Forums Only'),
));
return $o;
}

View file

@ -96,10 +96,18 @@ function directory_content(&$a) {
if(! is_null($pubforums))
$query .= '&pubforums=' . intval($pubforums);
if(! is_null($pubforums))
$query .= '&pubforums=' . intval($pubforums);
$sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : '');
if($pubforums)
$sort_order = 'normal';
if($sort_order)
$query .= '&order=' . urlencode($sort_order);
if($a->pager['page'] != 1)
$query .= '&p=' . $a->pager['page'];

View file

@ -4,5 +4,6 @@
<li><a href="directory?f=&order=normal">{{$normal}}</a></li>
<li><a href="directory?f=&order=reverse">{{$reverse}}</a></li>
<li><a href="directory?f=&order=date">{{$date}}</a></li>
<li><a href="directory?f=&pubforums=1">{{$pubforums}}</a></li>
</ul>
</div>