]> git.mxchange.org Git - friendica.git/commitdiff
Normalize item comment template variable name
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 13 Sep 2020 23:43:42 +0000 (19:43 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 14 Sep 2020 00:01:54 +0000 (20:01 -0400)
include/conversation.php
src/Object/Post.php
view/templates/wall_thread.tpl
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/quattro/templates/wall_item_tag.tpl
view/theme/quattro/templates/wall_thread.tpl
view/theme/smoothly/templates/wall_thread.tpl
view/theme/vier/templates/wall_item_tag.tpl
view/theme/vier/templates/wall_thread.tpl

index 8b658521ed7a4e2a877fadd858121f3496de0b04..0c007851cd471b4c8892b156d7cb756a32990f6b 100644 (file)
@@ -628,7 +628,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'vote' => $likebuttons,
                                        'like' => '',
                                        'dislike' => '',
-                                       'comment' => '',
+                                       'comment_html' => '',
                                        'conv' => (($preview) ? '' : ['href'=> 'display/'.$item['guid'], 'title'=> DI::l10n()->t('View in context')]),
                                        'previewing' => $previewing,
                                        'wait' => DI::l10n()->t('Please wait'),
index 6e5088f1677bc12019cc8415f15412ac80bd93a5..70142e887f913939b327792e4180f260bb0b55a6 100644 (file)
@@ -349,7 +349,7 @@ class Post
                        }
                }
 
-               $comment = $this->getCommentBox($indent);
+               $comment_html = $this->getCommentBox($indent);
 
                if (strcmp(DateTimeFormat::utc($item['created']), DateTimeFormat::utc('now - 12 hours')) > 0) {
                        $shiny = 'shiny';
@@ -479,7 +479,7 @@ class Post
                        'responses'       => $responses,
                        'switchcomment'   => DI::l10n()->t('Comment'),
                        'reply_label'     => DI::l10n()->t('Reply to %s', $name_e),
-                       'comment'         => $comment,
+                       'comment_html'    => $comment_html,
                        'remote_comment'  => $remote_comment,
                        'menu'            => DI::l10n()->t('More'),
                        'previewing'      => $conv->isPreview() ? ' preview ' : '',
index 235889930f692852d041b21b23f33fa488a58e3e..73e99cb1bddcd79c520ff6a11822a6825ad20802 100644 (file)
                {{/foreach}}
        {{/if}}
                        {{if $item.threaded}}
-                       {{if $item.comment}}
+                       {{if $item.comment_html}}
                        <div class="wall-item-comment-wrapper {{$item.indent}}" >
-                               {{$item.comment nofilter}}
+                               {{$item.comment_html nofilter}}
                        </div>
                        {{/if}}
                        {{/if}}
 
 {{if $item.flatten}}
 <div class="wall-item-comment-wrapper" >
-       {{$item.comment nofilter}}
+       {{$item.comment_html nofilter}}
 </div>
 {{/if}}
 </div>
index bb01b48ddbd0e928640b04f784c29bf9fd162bf7..d7a22927ccdd78be9450a4b4e0f71bb064093a14 100644 (file)
                        <p class="wall-item-actions">
                                {{* Action buttons to interact with the item (like: like, dislike, share and so on *}}
                                <span class="wall-item-actions-left">
-                                       <!--comment this out to try something different {{if $item.threaded}}{{if $item.comment}}
+                                       <!--comment this out to try something different {{if $item.threaded}}{{if $item.comment_html}}
                                        <div id="button-reply" class="pull-left">
                                                <button type="button" class="btn-link" id="comment-{{$item.id}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"><i class="fa fa-reply" title="{{$item.switchcomment}}"></i> </span>
                                        </div>
                                                {{if $item.vote.dislike}}
                                        <button type="button" class="btn btn-defaultbutton-likes{{if $item.responses.like.self}} active" aria-pressed="true{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="doLikeAction({{$item.id}}, 'dislike'{{if $item.responses.dislike.self}}, true{{/if}});">{{$item.vote.dislike.0}}</button>
                                                {{/if}}
-                                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
+                                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment_html}}
                                        <span role="presentation" class="separator">•</span>
                                                {{/if}}
                                        {{/if}}
 
                                        {{* Button to open the comment text field *}}
-                                       {{if $item.comment}}
+                                       {{if $item.comment_html}}
                                                <button type="button" class="btn btn-default" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}}</button>
                                        {{/if}}
 
                                        {{* Button for sharing the item *}}
                                        {{if $item.vote}}
                                                {{if $item.vote.share}}
-                                                       {{if $item.vote.like OR $item.vote.dislike OR $item.comment}}
+                                                       {{if $item.vote.like OR $item.vote.dislike OR $item.comment_html}}
                                        <span role="presentation" class="separator">•</span>
                                                        {{/if}}
                                        <button type="button" class="btn btn-default" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}});"><i class="fa fa-retweet" aria-hidden="true"></i>&nbsp;{{$item.vote.share.0}}</button>
index 03a1889e2f7bb14d324b0c1c788cf518a88743d7..048fbc226884f474c823e0a6290f50c92b485064 100644 (file)
@@ -295,7 +295,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                <button type="button" class="btn-link button-likes{{if $item.responses.dislike.self}} active" aria-pressed="true{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="doLikeAction({{$item.id}}, 'dislike'{{if $item.responses.dislike.self}}, true{{/if}});" data-toggle="button"><i class="fa fa-thumbs-down" aria-hidden="true"></i>&nbsp;{{$item.vote.dislike.1}}</button>
                                {{/if}}
 
-                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
+                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment_html}}
                                <span role="presentation" class="separator"></span>
                                {{/if}}
                        {{/if}}
@@ -305,14 +305,14 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
 
                        {{* Button to open the comment text field *}}
-                       {{if $item.comment}}
+                       {{if $item.comment_html}}
                                <button type="button" class="btn-link button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" {{if $item.thread_level != 1}}onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" {{else}} onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"{{/if}}><i class="fa fa-commenting" aria-hidden="true"></i>&nbsp;{{$item.switchcomment}}</button>
                        {{/if}}
 
                        {{* Button for sharing the item *}}
                        {{if $item.vote}}
                                {{if $item.vote.share}}
-                                       {{if $item.vote.like OR $item.vote.dislike OR $item.comment}}
+                                       {{if $item.vote.like OR $item.vote.dislike OR $item.comment_html}}
                                <span role="presentation" class="separator"></span>
                                        {{/if}}
                                <button type="button" class="btn-link button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}});"><i class="fa fa-retweet" aria-hidden="true"></i>&nbsp;{{$item.vote.share.1}}</button>
@@ -422,7 +422,7 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
 
                        {{* Button to open the comment text field *}}
-                       {{if $item.comment}}
+                       {{if $item.comment_html}}
                                <div class="btn-group" role="group">
                                        <button type="button" class="btn btn-sm button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" {{if $item.thread_level != 1}}onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" {{else}} onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"{{/if}}><i class="fa fa-commenting" aria-hidden="true"></i></button>
                                </div>
@@ -536,9 +536,9 @@ as the value of $top_child_total (this is done at the end of this file)
        {{/if}}
 
                {{* Insert comment box of threaded children *}}
-               {{if $item.threaded && $item.comment && $item.indent==comment}}
+               {{if $item.threaded && $item.comment_html && $item.indent==comment}}
                        <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" data-display="block" style="display: none;">
-                               {{$item.comment nofilter}}
+                               {{$item.comment_html nofilter}}
                        </div>
                {{/if}}
 
@@ -553,13 +553,13 @@ as the value of $top_child_total (this is done at the end of this file)
        {{* Insert the comment box of the top level post at the bottom of the thread.
                Display this comment box if there are any comments. If not hide it. In this
                case it could be opend with the "comment" button *}}
-       {{if $item.comment && $item.thread_level==1}}
+       {{if $item.comment_html && $item.thread_level==1}}
                {{if $item.total_comments_num}}
                <div class="comment-fake-form" id="comment-fake-form-{{$item.id}}">
                        <textarea id="comment-fake-text-{{$item.id}}" class="comment-fake-text-empty form-control" placeholder="{{$item.reply_label}}" onFocus="commentOpenUI(this, {{$item.id}});"  rows="1"></textarea>
                </div>
                {{/if}}
-               <div class="wall-item-comment-wrapper well well-small" id="item-comments-{{$item.id}}" data-display="block" style="display: none">{{$item.comment nofilter}}</div>
+               <div class="wall-item-comment-wrapper well well-small" id="item-comments-{{$item.id}}" data-display="block" style="display: none">{{$item.comment_html nofilter}}</div>
        {{/if}}
 </div><!-- ./panel-body or ./wall-item-container -->
 
index 93e6abaef6f910eda1f3241a7211400d944236cf..71c7e0844f88d26ec8b33c70746fcad676975018 100644 (file)
 {{/if}}
 
 {{* top thread comment box *}}
-{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}}
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}{{/if}}{{/if}}
 
 {{if $item.flatten}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}
index 6c557507bf6aac43194c41033631f6a139248ce9..a97a0cc5e4e08438d2764f282fbd38b0a3a218b0 100644 (file)
                {{/if}}
        </div>
 
-       {{if $item.threaded}}{{if $item.comment}}{{if $item.indent==comment}}
+       {{if $item.threaded}}{{if $item.comment_html}}{{if $item.indent==comment}}
        <div class="wall-item-bottom commentbox">
                <div class="wall-item-links"></div>
                <div class="wall-item-comment-wrapper">
-                                       {{$item.comment nofilter}}
+                                       {{$item.comment_html nofilter}}
                </div>
        </div>
        {{/if}}{{/if}}{{/if}}
 {{/if}}
 
 {{* top thread comment box *}}
-{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}}
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}{{/if}}{{/if}}
 
 
 {{if $item.flatten}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}
index d5138978dd12ae8df283c02ebd2b56a9e643f4d6..0cd52fcdeaa2d93621d26766d686eae571e89680 100644 (file)
        <div class="wall-item-dislike" id="wall-item-dislike-{{$item.id}}">{{$item.dislike nofilter}}</div>
 
        {{if $item.threaded}}
-       {{if $item.comment}}
+       {{if $item.comment_html}}
         <div class="wall-item-comment-wrapper {{$item.indent}} {{$item.shiny}}" >
-               {{$item.comment nofilter}}
+               {{$item.comment_html nofilter}}
        </div>
        {{/if}}
        {{/if}}
 
 {{if $item.flatten}}
 <div class="wall-item-comment-wrapper" >
-       {{$item.comment nofilter}}
+       {{$item.comment_html nofilter}}
 </div>
 {{/if}}
 </div>
index 960cb171af3d01f39b5b5cfce97d733c59ac4904..76e587f00ae1540259f4462b276476370f1783e8 100644 (file)
 {{/if}}
 
 {{* top thread comment box *}}
-{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}}
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}{{/if}}{{/if}}
 
 {{if $item.flatten}}
-<div class="wall-item-comment-wrapper" >{{$item.comment nofilter}}</div>
+<div class="wall-item-comment-wrapper" >{{$item.comment_html nofilter}}</div>
 {{/if}}
index aedcf34e4509f763beb58788815ac1ad25fc8ac2..944aee77b94dd4af94e4470efd96a74c0ca73792 100644 (file)
                                <a role="button" title="{{$item.remote_comment.0}}" href="{{$item.remote_comment.2}}"><i class="icon-commenting"><span class="sr-only">{{$item.remote_comment.1}}</span></i></a>
                        {{/if}}
 
-                       {{if $item.comment}}
+                       {{if $item.comment_html}}
                                <a role="button" id="comment-{{$item.id}}" class="fakelink togglecomment" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" title="{{$item.switchcomment}}"><i class="icon-commenting"><span class="sr-only">{{$item.switchcomment}}</span></i></a>
                        {{/if}}
 
 
        </div>
 
-       {{if $item.threaded}}{{if $item.comment}}
+       {{if $item.threaded}}{{if $item.comment_html}}
        <div class="wall-item-bottom">
                <div class="wall-item-links">
                </div>
                <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" style="display: none;">
-                                       {{$item.comment nofilter}}
+                                       {{$item.comment_html nofilter}}
                </div>
        </div>
        {{/if}}{{/if}}
 {{/if}}
 
 {{if $item.total_comments_num}}
-       {{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
-               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}">{{$item.comment nofilter}}</div>
+       {{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}}
+               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}">{{$item.comment_html nofilter}}</div>
        {{/if}}{{/if}}{{/if}}
 
        {{if $item.flatten}}
-               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}">{{$item.comment nofilter}}</div>
+               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}">{{$item.comment_html nofilter}}</div>
        {{/if}}
 {{else}}
-       {{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
-               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" style="display: none;">{{$item.comment nofilter}}</div>
+       {{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}}
+               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" style="display: none;">{{$item.comment_html nofilter}}</div>
        {{/if}}{{/if}}{{/if}}
 
        {{if $item.flatten}}
-               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" style="display: none;">{{$item.comment nofilter}}</div>
+               <div class="wall-item-comment-wrapper" id="item-comments-{{$item.id}}" style="display: none;">{{$item.comment_html nofilter}}</div>
        {{/if}}
 {{/if}}