This commit is contained in:
friendica 2014-03-29 23:43:31 -07:00
parent c400303f22
commit 0b7588b1eb

View File

@ -1384,58 +1384,65 @@ function network_tabs() {
// tabs // tabs
$tabs = array(); $tabs = array();
if(get_config('system','discover_tab')) if(get_config('system','discover_tab')) {
$tabs[] = array( $tabs[] = array(
'label' => t('Discover'), 'label' => t('Discover'),
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&fh=1' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&fh=1' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'sel'=> $public_active, 'sel'=> $public_active,
'title'=> t('Imported public streams'), 'title'=> t('Imported public streams'),
); );
}
array_push($tabs, $tabs[] = array(
array( 'label' => t('Commented Order'),
'label' => t('Commented Order'), 'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'sel'=>$all_active,
'sel'=>$all_active, 'title'=> t('Sort by Comment Date'),
'title'=> t('Sort by Comment Date'), );
),
array( $tabs[] = array(
'label' => t('Posted Order'), 'label' => t('Posted Order'),
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'sel'=>$postord_active, 'sel'=>$postord_active,
'title' => t('Sort by Post Date'), 'title' => t('Sort by Post Date'),
), );
array(
if(feature_enabled(local_user(),'personal_tab')) {
$tabs[] = array(
'label' => t('Personal'), 'label' => t('Personal'),
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&conv=1', 'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&conv=1',
'sel' => $conv_active, 'sel' => $conv_active,
'title' => t('Posts that mention or involve you'), 'title' => t('Posts that mention or involve you'),
), );
array( }
if(feature_enable(local_user(),'new_tab')) {
$tabs[] = array(
'label' => t('New'), 'label' => t('New'),
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'sel' => $new_active, 'sel' => $new_active,
'title' => t('Activity Stream - by date'), 'title' => t('Activity Stream - by date'),
) );
); }
if(feature_enabled(local_user(),'star_posts')) if(feature_enabled(local_user(),'star_posts')) {
$tabs[] = array( $tabs[] = array(
'label' => t('Starred'), 'label' => t('Starred'),
'url'=>$a->get_baseurl(true) . '/' . $cmd . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1', 'url'=>$a->get_baseurl(true) . '/' . $cmd . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
'sel'=>$starred_active, 'sel'=>$starred_active,
'title' => t('Favourite Posts'), 'title' => t('Favourite Posts'),
); );
}
// Not yet implemented // Not yet implemented
if(feature_enabled(local_user(),'spam_filter')) if(feature_enabled(local_user(),'spam_filter')) {
$tabs[] = array( $tabs[] = array(
'label' => t('Spam'), 'label' => t('Spam'),
'url'=>$a->get_baseurl(true) . '/network?f=&spam=1', 'url'=>$a->get_baseurl(true) . '/network?f=&spam=1',
'sel'=> $spam_active, 'sel'=> $spam_active,
'title' => t('Posts flagged as SPAM'), 'title' => t('Posts flagged as SPAM'),
); );
}
$arr = array('tabs' => $tabs); $arr = array('tabs' => $tabs);
call_hooks('network_tabs', $arr); call_hooks('network_tabs', $arr);