aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Network.php12
-rw-r--r--Zotlabs/Widget/Activity_filter.php2
-rw-r--r--Zotlabs/Widget/Activity_order.php2
-rw-r--r--doc/hook/network_tabs.bb1
-rw-r--r--doc/hooklist.bb9
-rw-r--r--include/conversation.php113
6 files changed, 12 insertions, 127 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index c3db15ef2..ffe605538 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -167,8 +167,6 @@ class Network extends \Zotlabs\Web\Controller {
}
if(! $update) {
- $tabs = ''; //network_tabs();
- $o .= $tabs;
// search terms header
if($search) {
@@ -256,8 +254,7 @@ class Network extends \Zotlabs\Web\Controller {
));
}
- $o = $tabs;
- $o .= $title;
+ $o = $title;
$o .= $status_editor;
}
@@ -283,8 +280,7 @@ class Network extends \Zotlabs\Web\Controller {
'$title' => '<a href="' . zid($cid_r[0]['xchan_url']) . '" ><img src="' . zid($cid_r[0]['xchan_photo_s']) . '" alt="' . urlencode($cid_r[0]['xchan_name']) . '" /></a> <a href="' . zid($cid_r[0]['xchan_url']) . '" >' . $cid_r[0]['xchan_name'] . '</a>'
));
- $o = $tabs;
- $o .= $title;
+ $o = $title;
$o .= $status_editor;
}
elseif($xchan) {
@@ -297,8 +293,8 @@ class Network extends \Zotlabs\Web\Controller {
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($r[0]['xchan_url']) . '" ><img src="' . zid($r[0]['xchan_photo_s']) . '" alt="' . urlencode($r[0]['xchan_name']) . '" /></a> <a href="' . zid($r[0]['xchan_url']) . '" >' . $r[0]['xchan_name'] . '</a>'
));
- $o = $tabs;
- $o .= $title;
+
+ $o = $title;
$o .= $status_editor;
}
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index fadf39144..d725f8b55 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -180,7 +180,7 @@ class Activity_filter {
$arr = ['tabs' => $tabs];
- call_hooks('network_tabs', $arr);
+ call_hooks('activity_filter', $arr);
$o = '';
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index 27d1a971a..2dceee70e 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -110,7 +110,7 @@ class Activity_order {
$arr = ['tabs' => $tabs];
- call_hooks('network_tabs', $arr);
+ call_hooks('activity_order', $arr);
$o = '';
diff --git a/doc/hook/network_tabs.bb b/doc/hook/network_tabs.bb
deleted file mode 100644
index 677d7f2b9..000000000
--- a/doc/hook/network_tabs.bb
+++ /dev/null
@@ -1 +0,0 @@
-[h2]network_tabs[/h2]
diff --git a/doc/hooklist.bb b/doc/hooklist.bb
index 1de9c330a..4b36fa3e0 100644
--- a/doc/hooklist.bb
+++ b/doc/hooklist.bb
@@ -31,6 +31,12 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/account_settings_post]account_settings_post[/zrl]
Called when posting from the account settings form
+[zrl=[baseurl]/help/hook/activity_filter]activity_filter[/zrl]
+ Called when generating the list of filters for the network page
+
+[zrl=[baseurl]/help/hook/activity_order]activity_order[/zrl]
+ Called when generating the list of order options for the network page
+
[zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl]
Called when an activity (post, comment, like, etc.) has been received from a zot source
@@ -394,9 +400,6 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/network_ping]network_ping[/zrl]
Called during a ping request
-[zrl=[baseurl]/help/hook/network_tabs]network_tabs[/zrl]
- Called when generating the list of tabs for the network page
-
[zrl=[baseurl]/help/hook/network_to_name]network_to_name[/zrl]
Deprecated
diff --git a/include/conversation.php b/include/conversation.php
index 1df46bd16..28a339479 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1644,119 +1644,6 @@ function prepare_page($item) {
));
}
-
-function network_tabs() {
-
- $no_active='';
- $starred_active = '';
- $new_active = '';
- $all_active = '';
- $search_active = '';
- $conv_active = '';
- $spam_active = '';
- $postord_active = '';
-
- if(x($_GET,'new')) {
- $new_active = 'active';
- }
-
- if(x($_GET,'search')) {
- $search_active = 'active';
- }
-
- if(x($_GET,'star')) {
- $starred_active = 'active';
- }
-
- if(x($_GET,'conv')) {
- $conv_active = 'active';
- }
-
- if(x($_GET,'spam')) {
- $spam_active = 'active';
- }
-
- if (($new_active == '')
- && ($starred_active == '')
- && ($conv_active == '')
- && ($search_active == '')
- && ($spam_active == '')) {
- $no_active = 'active';
- }
-
- if ($no_active=='active' && x($_GET,'order')) {
- switch($_GET['order']){
- case 'post': $postord_active = 'active'; $no_active=''; break;
- case 'comment' : $all_active = 'active'; $no_active=''; break;
- }
- }
-
- if ($no_active=='active') $all_active='active';
-
- $cmd = App::$cmd;
-
- // tabs
- $tabs = array();
-
- $tabs[] = array(
- 'label' => t('Commented Order'),
- 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
- 'sel'=>$all_active,
- 'title'=> t('Sort by Comment Date'),
- );
-
- $tabs[] = array(
- 'label' => t('Posted Order'),
- 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
- 'sel'=>$postord_active,
- 'title' => t('Sort by Post Date'),
- );
-
- if(feature_enabled(local_channel(),'personal_tab')) {
- $tabs[] = array(
- 'label' => t('Personal'),
- 'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&conv=1',
- 'sel' => $conv_active,
- 'title' => t('Posts that mention or involve you'),
- );
- }
-
- if(feature_enabled(local_channel(),'new_tab')) {
- $tabs[] = array(
- 'label' => t('New'),
- 'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
- 'sel' => $new_active,
- 'title' => t('Activity Stream - by date'),
- );
- }
-
- if(feature_enabled(local_channel(),'star_posts')) {
- $tabs[] = array(
- 'label' => t('Starred'),
- 'url'=>z_root() . '/' . $cmd . '/?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&star=1',
- 'sel'=>$starred_active,
- 'title' => t('Favourite Posts'),
- );
- }
- // Not yet implemented
-
- if(feature_enabled(local_channel(),'spam_filter')) {
- $tabs[] = array(
- 'label' => t('Spam'),
- 'url'=> z_root() . '/network?f=&spam=1',
- 'sel'=> $spam_active,
- 'title' => t('Posts flagged as SPAM'),
- );
- }
-
- $arr = array('tabs' => $tabs);
- call_hooks('network_tabs', $arr);
-
- $tpl = get_markup_template('common_tabs.tpl');
-
- return replace_macros($tpl, array('$tabs' => $arr['tabs']));
-}
-
function get_responses($conv_responses,$response_verbs,$ob,$item) {
$ret = array();