allow your own likes/comments to be updated when in static update mode

This commit is contained in:
zotlabs 2016-11-02 15:48:29 -07:00
parent 5d3e04216d
commit f91031bd65
8 changed files with 43 additions and 15 deletions

View File

@ -74,6 +74,7 @@ class Channel extends \Zotlabs\Web\Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : ''); $category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : ''); $hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$groups = array(); $groups = array();
@ -110,6 +111,8 @@ class Channel extends \Zotlabs\Web\Controller {
if(! $update) { if(! $update) {
$static = intval(feature_enabled(\App::$profile['profile_uid'],'static_updates'));
$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']); $o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']);
$o .= common_friends_visitor_widget(\App::$profile['profile_uid']); $o .= common_friends_visitor_widget(\App::$profile['profile_uid']);
@ -176,6 +179,9 @@ class Channel extends \Zotlabs\Web\Controller {
if($load) if($load)
$simple_update = ''; $simple_update = '';
if($static && $simple_update)
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if(($update) && (! $load)) { if(($update) && (! $load)) {
if($mid) { if($mid) {
@ -304,7 +310,7 @@ class Channel extends \Zotlabs\Web\Controller {
'$nouveau' => '0', '$nouveau' => '0',
'$wall' => '1', '$wall' => '1',
'$fh' => '0', '$fh' => '0',
'$static' => intval(feature_enabled(\App::$profile['profile_uid'],'static_updates')), '$static' => $static,
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1), '$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => '', '$search' => '',
'$order' => '', '$order' => '',

View File

@ -122,6 +122,8 @@ class Display extends \Zotlabs\Web\Controller {
} }
} }
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$simple_update = (($update) ? " AND item_unseen = 1 " : ''); $simple_update = (($update) ? " AND item_unseen = 1 " : '');
@ -130,12 +132,14 @@ class Display extends \Zotlabs\Web\Controller {
if($load) if($load)
$simple_update = ''; $simple_update = '';
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0); if($static && $simple_update)
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if((! $update) && (! $load)) { if((! $update) && (! $load)) {
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
$o .= '<div id="live-display"></div>' . "\r\n"; $o .= '<div id="live-display"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1)) $o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
. "; var netargs = '?f='; var profile_page = " . \App::$pager['page'] . "; </script>\r\n"; . "; var netargs = '?f='; var profile_page = " . \App::$pager['page'] . "; </script>\r\n";

View File

@ -54,6 +54,7 @@ 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); $nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 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'] : '');
@ -187,6 +188,8 @@ class Network extends \Zotlabs\Web\Controller {
$status_editor = status_editor($a,$x); $status_editor = status_editor($a,$x);
$o .= $status_editor; $o .= $status_editor;
$static = intval(feature_enabled(local_channel(),'static_updates'));
} }
@ -295,7 +298,7 @@ class Network extends \Zotlabs\Web\Controller {
'$fh' => (($firehose) ? $firehose : '0'), '$fh' => (($firehose) ? $firehose : '0'),
'$nouveau' => (($nouveau) ? $nouveau : '0'), '$nouveau' => (($nouveau) ? $nouveau : '0'),
'$wall' => '0', '$wall' => '0',
'$static' => intval(feature_enabled(local_channel(),'static_updates')), '$static' => $static,
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0), '$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1), '$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => (($search) ? $search : ''), '$search' => (($search) ? $search : ''),
@ -403,6 +406,7 @@ class Network extends \Zotlabs\Web\Controller {
$simple_update = (($update) ? " and item_unseen = 1 " : ''); $simple_update = (($update) ? " and item_unseen = 1 " : '');
// This fixes a very subtle bug so I'd better explain it. You wake up in the morning or return after a day // This fixes a very subtle bug so I'd better explain it. You wake up in the morning or return after a day
// or three and look at your matrix page - after opening up your browser. The first page loads just as it // or three and look at your matrix page - after opening up your browser. The first page loads just as it
// should. All of a sudden a few seconds later, page 2 will get inserted at the beginning of the page // should. All of a sudden a few seconds later, page 2 will get inserted at the beginning of the page
@ -420,6 +424,9 @@ class Network extends \Zotlabs\Web\Controller {
if($load) if($load)
$simple_update = ''; $simple_update = '';
if($static && $simple_update)
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if($nouveau && $load) { if($nouveau && $load) {
// "New Item View" - show all items unthreaded in reverse created date order // "New Item View" - show all items unthreaded in reverse created date order

View File

@ -22,10 +22,13 @@ class Pubstream extends \Zotlabs\Web\Controller {
$item_normal = item_normal(); $item_normal = item_normal();
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0); $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
if(! $update) { if(! $update) {
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
$maxheight = get_config('system','home_divmore_height'); $maxheight = get_config('system','home_divmore_height');
if(! $maxheight) if(! $maxheight)
$maxheight = 400; $maxheight = 400;
@ -100,6 +103,9 @@ class Pubstream extends \Zotlabs\Web\Controller {
if($load) if($load)
$simple_update = ''; $simple_update = '';
if($static && $simple_update)
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
//logger('update: ' . $update . ' load: ' . $load); //logger('update: ' . $update . ' load: ' . $load);
if($update) { if($update) {

View File

@ -54,6 +54,8 @@ class Search extends \Zotlabs\Web\Controller {
$search = ((x($_GET,'tag')) ? trim(rawurldecode($_GET['tag'])) : ''); $search = ((x($_GET,'tag')) ? trim(rawurldecode($_GET['tag'])) : '');
} }
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
if((! local_channel()) || (! feature_enabled(local_channel(),'savedsearch'))) if((! local_channel()) || (! feature_enabled(local_channel(),'savedsearch')))
$o .= search($search,'search-box','/search',((local_channel()) ? true : false)); $o .= search($search,'search-box','/search',((local_channel()) ? true : false));
@ -96,10 +98,12 @@ class Search extends \Zotlabs\Web\Controller {
// OR your own posts if you are a logged in member // OR your own posts if you are a logged in member
// No items will be shown if the member has a blocked profile wall. // No items will be shown if the member has a blocked profile wall.
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
if((! $update) && (! $load)) { if((! $update) && (! $load)) {
$static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater, // This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
// because browser prefetching might change it on us. We have to deliver it with the page. // because browser prefetching might change it on us. We have to deliver it with the page.

View File

@ -1,6 +1,6 @@
[b]Using The Cloud - Konqueror[/b] [b]Using The Cloud - Konqueror[/b]
Simply visit webdavs://example.com/cloud after logging in to your hub, where &quot;example.com&quot; is the URL of your hub. Simply visit webdavs://example.com/dav after logging in to your hub, where &quot;example.com&quot; is the URL of your hub.
No further authentication is required if you are logged in to your hub in the normal manner. No further authentication is required if you are logged in to your hub in the normal manner.

View File

@ -754,12 +754,12 @@ function liveUpdate() {
update_mode = 'append'; update_mode = 'append';
} }
else { else {
if(bParam_static) { // if(bParam_static) {
in_progress = false; // in_progress = false;
if(timer) clearTimeout(timer); // if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,10000); // timer = setTimeout(NavUpdate,10000);
return; // return;
} // }
update_mode = 'update'; update_mode = 'update';
var orgHeight = $("#region_2").height(); var orgHeight = $("#region_2").height();

View File

@ -37,6 +37,7 @@
if(bParam_cmax != 99) bCmd = bCmd + "&cmax=" + bParam_cmax; if(bParam_cmax != 99) bCmd = bCmd + "&cmax=" + bParam_cmax;
if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; } if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
if(bParam_static != 0) { bCmd = bCmd + "&static=" + bParam_static; }
if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star; if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked; if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv; if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;