diff options
author | redmatrix <mike@macgirvin.com> | 2016-09-24 16:20:25 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-09-24 16:20:25 -0700 |
commit | c04c57ea0f34b84e59d63201314aa35eede2d875 (patch) | |
tree | 985d099acc10b91ba898068dd390c93d70bd8770 | |
parent | dca4db9d4dffb7840885abf20d50154ed72462a0 (diff) | |
download | volse-hubzilla-c04c57ea0f34b84e59d63201314aa35eede2d875.tar.gz volse-hubzilla-c04c57ea0f34b84e59d63201314aa35eede2d875.tar.bz2 volse-hubzilla-c04c57ea0f34b84e59d63201314aa35eede2d875.zip |
the rest of the backend for supporting scroll-to-comment from notifications. We still need an ajax handler as fragments are evaluated before content is loaded.
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 3 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 4 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 2 |
4 files changed, 10 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 92b9fddbd..a6ff528aa 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -115,6 +115,9 @@ class Enotify { // logger("notification: params = " . print_r($params, true), LOGGER_DEBUG); $itemlink = $params['link']; + if($params['item']['id']) + $itemlink .= '#item_' . $params['item']['id']; + // ignore like/unlike activity on posts - they probably require a separate notification preference diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index f50b9680e..2f5a0c325 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -412,6 +412,9 @@ class ThreadItem { if($visible_comments === false) $visible_comments = 3; + if(in_array(\App::$module,['display','update_display'])) + $visible_comments = 99999; + if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) { foreach($children as $child) { $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1); diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index ac2067356..dff1c6404 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -922,7 +922,9 @@ class Item extends \Zotlabs\Web\Controller { $post = item_store($datarray,$execflag); $post_id = $post['item_id']; - + + $datarray = $post['item']; + if($post_id) { logger('mod_item: saved item ' . $post_id); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index add80885b..7e42aa891 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -5,7 +5,7 @@ <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;"> {{/if}} <div id="thread-wrapper-{{$item.id}}" class="thread-wrapper{{if $item.toplevel}} {{$item.toplevel}} generic-content-wrapper h-entry {{else}} u-comment h-cite {{/if}}"> - <a name="{{$item.id}}" ></a> + <a name="item_{{$item.id}}" ></a> <div class="wall-item-outside-wrapper {{$item.indent}}{{$item.previewing}}" id="wall-item-outside-wrapper-{{$item.id}}" > <div class="wall-item-content-wrapper {{$item.indent}}" id="wall-item-content-wrapper-{{$item.id}}" style="clear:both;"> {{if $item.photo}} |