post/comment order options

This commit is contained in:
Friendika 2011-10-17 18:24:23 -07:00
parent 42a9817350
commit 0f24f3b505
1 changed files with 15 additions and 1 deletions

View File

@ -133,14 +133,28 @@ function network_content(&$a, $update = 0) {
&& ($search_active == '')) { && ($search_active == '')) {
$all_active = 'active'; $all_active = 'active';
} }
$postord_active = '';
if($all_active && x($_GET,'order') && $_GET['order'] !== 'comment') {
$all_active = '';
$postord_active = 'active';
}
// tabs // tabs
$tabs = array( $tabs = array(
array( array(
'label' => t('All'), 'label' => t('Commented Order'),
'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : ''), 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : ''),
'sel'=>$all_active, 'sel'=>$all_active,
), ),
array(
'label' => t('Posted Order'),
'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '?order=post' . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : ''),
'sel'=>$postord_active,
),
array( array(
'label' => t('New'), 'label' => t('New'),
'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : ''), 'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : ''),