remove network_tabs() which has been deprecated and replaced by activity_{order, filters} widgets
This commit is contained in:
parent
56f88f2e30
commit
869534fafa
@ -167,8 +167,6 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(! $update) {
|
if(! $update) {
|
||||||
$tabs = ''; //network_tabs();
|
|
||||||
$o .= $tabs;
|
|
||||||
|
|
||||||
// search terms header
|
// search terms header
|
||||||
if($search) {
|
if($search) {
|
||||||
@ -256,8 +254,7 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = $tabs;
|
$o = $title;
|
||||||
$o .= $title;
|
|
||||||
$o .= $status_editor;
|
$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>'
|
'$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;
|
$o .= $status_editor;
|
||||||
}
|
}
|
||||||
elseif($xchan) {
|
elseif($xchan) {
|
||||||
@ -297,8 +293,8 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
$title = replace_macros(get_markup_template("section_title.tpl"),array(
|
$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>'
|
'$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;
|
$o .= $status_editor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ class Activity_filter {
|
|||||||
|
|
||||||
$arr = ['tabs' => $tabs];
|
$arr = ['tabs' => $tabs];
|
||||||
|
|
||||||
call_hooks('network_tabs', $arr);
|
call_hooks('activity_filter', $arr);
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ class Activity_order {
|
|||||||
|
|
||||||
$arr = ['tabs' => $tabs];
|
$arr = ['tabs' => $tabs];
|
||||||
|
|
||||||
call_hooks('network_tabs', $arr);
|
call_hooks('activity_order', $arr);
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
[h2]network_tabs[/h2]
|
|
@ -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]
|
[zrl=[baseurl]/help/hook/account_settings_post]account_settings_post[/zrl]
|
||||||
Called when posting from the account settings form
|
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]
|
[zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl]
|
||||||
Called when an activity (post, comment, like, etc.) has been received from a zot source
|
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]
|
[zrl=[baseurl]/help/hook/network_ping]network_ping[/zrl]
|
||||||
Called during a ping request
|
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]
|
[zrl=[baseurl]/help/hook/network_to_name]network_to_name[/zrl]
|
||||||
Deprecated
|
Deprecated
|
||||||
|
|
||||||
|
@ -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) {
|
function get_responses($conv_responses,$response_verbs,$ob,$item) {
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
Reference in New Issue
Block a user