implement features
This commit is contained in:
@@ -181,7 +181,7 @@ function network_init(&$a) {
|
||||
$a->page['content'] .= '<h2>' . t('Search Results For:') . ' ' . $search . '</h2>';
|
||||
}
|
||||
|
||||
$a->page['aside'] .= group_side('network/0','network',true,$group_id);
|
||||
$a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network',true,$group_id) : '');
|
||||
$a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false);
|
||||
$a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
|
||||
$a->page['aside'] .= saved_searches($search);
|
||||
@@ -191,6 +191,9 @@ function network_init(&$a) {
|
||||
|
||||
function saved_searches($search) {
|
||||
|
||||
if(! feature_enabled(local_user(),'savedsearch'))
|
||||
return '';
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$srchurl = '/network?f='
|
||||
@@ -403,30 +406,30 @@ function network_content(&$a, $update = 0) {
|
||||
'title' => t('Sort by Post Date'),
|
||||
),
|
||||
|
||||
array(
|
||||
/* array(
|
||||
'label' => t('Personal'),
|
||||
'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
|
||||
'sel' => $conv_active,
|
||||
'title' => t('Posts that mention or involve you'),
|
||||
),
|
||||
array(
|
||||
),*/
|
||||
/* array(
|
||||
'label' => t('New'),
|
||||
'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
|
||||
'sel' => $new_active,
|
||||
'title' => t('Activity Stream - by date'),
|
||||
),
|
||||
array(
|
||||
),*/
|
||||
/* array(
|
||||
'label' => t('Starred'),
|
||||
'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
|
||||
'sel'=>$starred_active,
|
||||
'title' => t('Favourite Posts'),
|
||||
),
|
||||
array(
|
||||
),*/
|
||||
/* array(
|
||||
'label' => t('Shared Links'),
|
||||
'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
|
||||
'sel'=>$bookmarked_active,
|
||||
'title'=> t('Interesting Links'),
|
||||
),
|
||||
), */
|
||||
// array(
|
||||
// 'label' => t('Spam'),
|
||||
// 'url'=>$a->get_baseurl(true) . '/network?f=&spam=1'
|
||||
@@ -436,6 +439,53 @@ function network_content(&$a, $update = 0) {
|
||||
|
||||
);
|
||||
|
||||
if(feature_enabled(local_user(),'personal_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Personal'),
|
||||
'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
|
||||
'sel' => $conv_active,
|
||||
'title' => t('Posts that mention or involve you'),
|
||||
);
|
||||
}
|
||||
|
||||
if(feature_enabled(local_user(),'new_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('New'),
|
||||
'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
|
||||
'sel' => $new_active,
|
||||
'title' => t('Activity Stream - by date'),
|
||||
);
|
||||
}
|
||||
|
||||
if(feature_enabled(local_user(),'link_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Shared Links'),
|
||||
'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
|
||||
'sel'=>$bookmarked_active,
|
||||
'title'=> t('Interesting Links'),
|
||||
);
|
||||
}
|
||||
|
||||
if(feature_enabled(local_user(),'star_posts')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Starred'),
|
||||
'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
|
||||
'sel'=>$starred_active,
|
||||
'title' => t('Favourite Posts'),
|
||||
);
|
||||
}
|
||||
|
||||
// Not yet implemented
|
||||
|
||||
/* if(feature_enabled(local_user(),'spam_filter')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Spam'),
|
||||
'url'=>$a->get_baseurl(true) . '/network?f=&spam=1',
|
||||
'sel'=> $spam_active,
|
||||
'title' => t('Posts flagged as SPAM'),
|
||||
);
|
||||
}*/
|
||||
|
||||
// save selected tab, but only if not in search or file mode
|
||||
if(!x($_GET,'search') && !x($_GET,'file')) {
|
||||
set_pconfig( local_user(), 'network.view','tab.selected',array($all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) );
|
||||
|
||||
Reference in New Issue
Block a user