aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Network.php21
-rw-r--r--include/features.php20
-rw-r--r--include/group.php2
-rw-r--r--include/text.php22
-rw-r--r--view/pdl/mod_network.pdl2
5 files changed, 51 insertions, 16 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 942b48109..060179217 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -57,13 +57,26 @@ class Network extends \Zotlabs\Web\Controller {
$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']) : '');
- $nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$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'] : '');
if($search) {
$_GET['netsearch'] = escape_tags($search);
@@ -84,7 +97,7 @@ class Network extends \Zotlabs\Web\Controller {
}
if($datequery)
- $_GET['order'] = 'post';
+ $order = 'post';
// filter by collection (e.g. group)
@@ -150,7 +163,7 @@ class Network extends \Zotlabs\Web\Controller {
}
if(! $update) {
- $tabs = network_tabs();
+ $tabs = ''; //network_tabs();
$o .= $tabs;
// search terms header
diff --git a/include/features.php b/include/features.php
index 616e3f6c5..3d3e41a05 100644
--- a/include/features.php
+++ b/include/features.php
@@ -386,21 +386,21 @@ function get_features($filtered = true, $level = (-1)) {
],
[
- 'personal_tab',
- t('Network Personal Tab'),
- t('Enable tab to display only Network posts that you\'ve interacted on'),
+ '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','personal_tab'),
- feature_level('personal_tab',1),
+ get_config('feature_lock','order_tab'),
+ feature_level('order_tab',2),
],
[
- 'new_tab',
- t('Network New Tab'),
- t('Enable tab to display all new Network activity'),
+ 'personal_tab',
+ t('Network Personal Tab'),
+ t('Enable tab to display only Network posts that you\'ve interacted on'),
false,
- get_config('feature_lock','new_tab'),
- feature_level('new_tab',2),
+ get_config('feature_lock','personal_tab'),
+ feature_level('personal_tab',1),
],
[
diff --git a/include/group.php b/include/group.php
index 8c95f6224..03ebf7ee5 100644
--- a/include/group.php
+++ b/include/group.php
@@ -284,7 +284,7 @@ function group_side($every="connections",$each="group",$edit = false, $group_id
'text' => t('All Channels'),
'id' => 0,
'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' : ''),
);
diff --git a/include/text.php b/include/text.php
index 34063cdd7..319de67a8 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3333,4 +3333,24 @@ function unique_multidim_array($array, $key) {
$i++;
}
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;
+
+}
diff --git a/view/pdl/mod_network.pdl b/view/pdl/mod_network.pdl
index 09fdba573..f93a6c66d 100644
--- a/view/pdl/mod_network.pdl
+++ b/view/pdl/mod_network.pdl
@@ -1,5 +1,7 @@
[region=aside]
+[widget=activity_order][/widget]
[widget=collections][/widget]
+[widget=activity_filter][/widget]
[widget=forums][/widget]
[widget=suggestions][/widget]
[widget=savedsearch][/widget]