diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2014-12-06 14:55:23 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2014-12-07 12:31:12 +0100 |
commit | 647311db3eab87cfe15747765485df782abfa657 (patch) | |
tree | 56628d310ca8c47cb4b18075631f7859bfa723cb /include | |
parent | 3855be49104b6c874a1c91c7db134e642d3fda20 (diff) | |
download | volse-hubzilla-647311db3eab87cfe15747765485df782abfa657.tar.gz volse-hubzilla-647311db3eab87cfe15747765485df782abfa657.tar.bz2 volse-hubzilla-647311db3eab87cfe15747765485df782abfa657.zip |
Directory sorting as a dropdown, forum filter as checkbox, option to sort oldest first
Diffstat (limited to 'include')
-rw-r--r-- | include/dir_fns.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php index 909005bbb..8bec974fb 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -51,13 +51,30 @@ function check_upstream_directory() { } function dir_sort_links() { + // Build urls without order and pubforums so it's easy to tack on the changed value + // Probably there's an easier way to do this + $url = 'directory?'; + $tmp = $_REQUEST; + unset($tmp['order']); + $sorturl = $url . http_build_query($tmp); + $tmp = $_REQUEST; + + unset($tmp['pubforums']); + $forumsurl = $url . http_build_query($tmp); $o = replace_macros(get_markup_template('dir_sort_links.tpl'), array( '$header' => t('Directory Options'), '$normal' => t('Alphabetic'), '$reverse' => t('Reverse Alphabetic'), '$date' => t('Newest to Oldest'), + '$reversedate' => t('Oldest to Newest'), '$pubforums' => t('Public Forums Only'), + '$pubforumsonly' => x($_REQUEST,'pubforums') ? $_REQUEST['pubforums'] : '', + '$sort' => t('Sort'), + '$selected_sort' => x($_REQUEST,'order') ? $_REQUEST['order'] : 'normal', + '$sorturl' => $sorturl, + '$forumsurl' => $forumsurl, + )); return $o; } |