first cut on restructuring the previously called network tabs
This commit is contained in:
parent
7d088c8d56
commit
9fcb3bf2e8
@ -57,13 +57,26 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
|
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
|
||||||
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
|
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
|
||||||
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
|
|
||||||
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
|
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
|
||||||
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
|
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
|
||||||
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
||||||
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
||||||
$verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : '');
|
$verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : '');
|
||||||
|
|
||||||
|
|
||||||
|
$order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
|
||||||
|
switch($order) {
|
||||||
|
case 0:
|
||||||
|
$order = 'comment';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$order = 'post';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$nouveau = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$search = (($_GET['search']) ? $_GET['search'] : '');
|
$search = (($_GET['search']) ? $_GET['search'] : '');
|
||||||
if($search) {
|
if($search) {
|
||||||
$_GET['netsearch'] = escape_tags($search);
|
$_GET['netsearch'] = escape_tags($search);
|
||||||
@ -84,7 +97,7 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($datequery)
|
if($datequery)
|
||||||
$_GET['order'] = 'post';
|
$order = 'post';
|
||||||
|
|
||||||
|
|
||||||
// filter by collection (e.g. group)
|
// filter by collection (e.g. group)
|
||||||
@ -150,7 +163,7 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(! $update) {
|
if(! $update) {
|
||||||
$tabs = network_tabs();
|
$tabs = ''; //network_tabs();
|
||||||
$o .= $tabs;
|
$o .= $tabs;
|
||||||
|
|
||||||
// search terms header
|
// search terms header
|
||||||
|
@ -385,6 +385,15 @@ function get_features($filtered = true, $level = (-1)) {
|
|||||||
feature_level('savedsearch',2),
|
feature_level('savedsearch',2),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'order_tab',
|
||||||
|
t('Alternate Stream Order'),
|
||||||
|
t('Ability to order the stream by last post date, last comment date or unthreaded activities'),
|
||||||
|
false,
|
||||||
|
get_config('feature_lock','order_tab'),
|
||||||
|
feature_level('order_tab',2),
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'personal_tab',
|
'personal_tab',
|
||||||
t('Network Personal Tab'),
|
t('Network Personal Tab'),
|
||||||
@ -394,15 +403,6 @@ function get_features($filtered = true, $level = (-1)) {
|
|||||||
feature_level('personal_tab',1),
|
feature_level('personal_tab',1),
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
|
||||||
'new_tab',
|
|
||||||
t('Network New Tab'),
|
|
||||||
t('Enable tab to display all new Network activity'),
|
|
||||||
false,
|
|
||||||
get_config('feature_lock','new_tab'),
|
|
||||||
feature_level('new_tab',2),
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
[
|
||||||
'affinity',
|
'affinity',
|
||||||
t('Affinity Tool'),
|
t('Affinity Tool'),
|
||||||
|
@ -284,7 +284,7 @@ function group_side($every="connections",$each="group",$edit = false, $group_id
|
|||||||
'text' => t('All Channels'),
|
'text' => t('All Channels'),
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'selected' => (($group_id == 0) ? 'group-selected' : ''),
|
'selected' => (($group_id == 0) ? 'group-selected' : ''),
|
||||||
'href' => $every . (($every === 'network') ? '?f=&gid=0' : '') . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : ''),
|
'href' => $every . (($every === 'network') ? '?f=&gid=0' : ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -3334,3 +3334,23 @@ function unique_multidim_array($array, $key) {
|
|||||||
}
|
}
|
||||||
return $temp_array;
|
return $temp_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function network_qstring($req) {
|
||||||
|
|
||||||
|
$ret = '?f=';
|
||||||
|
|
||||||
|
if(x($req, 'cid'))
|
||||||
|
$ret .= '&cid=' . $req['cid'];
|
||||||
|
|
||||||
|
if(x($req, 'gid'))
|
||||||
|
$ret .= '&gid=' . $req['gid'];
|
||||||
|
|
||||||
|
if(x($req, 'star'))
|
||||||
|
$ret .= '&star=' . $req['star'];
|
||||||
|
|
||||||
|
if(x($req, 'conv'))
|
||||||
|
$ret .= '&conv=' . $req['conv'];
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
[region=aside]
|
[region=aside]
|
||||||
|
[widget=activity_order][/widget]
|
||||||
[widget=collections][/widget]
|
[widget=collections][/widget]
|
||||||
|
[widget=activity_filter][/widget]
|
||||||
[widget=forums][/widget]
|
[widget=forums][/widget]
|
||||||
[widget=suggestions][/widget]
|
[widget=suggestions][/widget]
|
||||||
[widget=savedsearch][/widget]
|
[widget=savedsearch][/widget]
|
||||||
|
Reference in New Issue
Block a user