hide the automentions in comments.

This commit is contained in:
zotlabs 2020-05-13 17:39:48 -07:00
parent 02d1fbe903
commit ce0be41023
3 changed files with 12 additions and 9 deletions

View file

@ -317,6 +317,7 @@ class Item extends Controller {
$parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
$parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
$hidden_mentions = ((x($_REQUEST,'hidden_mentions')) ? trim($_REQUEST['hidden_mentions']) : '');
/**
* Who is viewing this page and posting this thing
@ -863,8 +864,9 @@ class Item extends Controller {
// Look for tags and linkify them
$summary_tags = linkify_tags($summary, ($uid) ? $uid : $profile_uid);
$body_tags = linkify_tags($body, ($uid) ? $uid : $profile_uid);
foreach ( [ $summary_tags, $body_tags ] as $results ) {
$comment_tags = linkify_tags($hidden_mentions, ($uid) ? $uid : $profile_uid);
foreach ( [ $summary_tags, $body_tags, $comment_tags ] as $results ) {
if ($results) {

View file

@ -356,13 +356,13 @@ function commentInsert(obj, id) {
}
function commentAuthors(id) {
var auths = $("#thread-authors-" + id).html();
if(typeof(auths) != 'undefined') {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == '') {
$("#comment-edit-text-" + id).val(auths);
}
}
$("#hidden-mentions-" + id).val($("#thread-authors-" + id).html());
// if(typeof(auths) != 'undefined') {
// var tmpStr = $("#comment-edit-text-" + id).val();
// if(tmpStr == '') {
// $("#comment-edit-text-" + id).val(auths);
// }
// }
}

View file

@ -13,6 +13,7 @@
<input type="hidden" name="return" value="{{$return_path}}" />
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="hidden_mentions" id="hidden-mentions-{{$id}}" value="" />
{{if $anoncomments && ! $observer}}
<div id="comment-edit-anon-{{$id}}" style="display: none;" >
{{include file="field_input.tpl" field=$anonname}}