mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 18:00:30 +02:00
simplified comment reply view
This commit is contained in:
@@ -932,22 +932,29 @@ class comment
|
|||||||
'subject' => $subject,
|
'subject' => $subject,
|
||||||
'rate' => $rate
|
'rate' => $rate
|
||||||
);
|
);
|
||||||
|
$text = $lock = $modcomment ='';
|
||||||
|
|
||||||
$tmp = $this->getComments($table,$id,0,$options); // render all comments;
|
if($action != 'reply')
|
||||||
$text = $tmp['comments'];
|
{
|
||||||
$lock = $tmp['lock'];
|
$tmp = $this->getComments($table,$id,0,$options); // render all comments;
|
||||||
|
$text = $tmp['comments'];
|
||||||
|
$lock = $tmp['lock'];
|
||||||
|
unset($tmp);
|
||||||
|
}
|
||||||
// -------------------------------------------------------
|
// -------------------------------------------------------
|
||||||
|
|
||||||
if($this->totalComments && getperms("B"))
|
if($text)
|
||||||
{
|
{
|
||||||
$modcomment = "<div class='comment-moderate'>";
|
if($this->totalComments && getperms("B"))
|
||||||
// $modcomment .= "<a href='".e_ADMIN_ABS."modcomment.php?$table.$id'>".COMLAN_314."</a>";
|
{
|
||||||
$modcomment .= "<a href='".e_ADMIN_ABS."comment.php?searchquery={$id}&filter_options=comment_type__".$this->getCommentType($table)."'>".COMLAN_314."</a>";
|
$modcomment = "<div class='comment-moderate'>";
|
||||||
$modcomment .= "</div>";
|
// $modcomment .= "<a href='".e_ADMIN_ABS."modcomment.php?$table.$id'>".COMLAN_314."</a>";
|
||||||
}
|
$modcomment .= "<a href='".e_ADMIN_ABS."comment.php?searchquery={$id}&filter_options=comment_type__".$this->getCommentType($table)."'>".COMLAN_314."</a>";
|
||||||
|
$modcomment .= "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
$modcomment .= $this->nextprev($table,$id,$from);
|
$modcomment .= $this->nextprev($table,$id,$from);
|
||||||
|
}
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
|
|
||||||
if ($lock != '1')
|
if ($lock != '1')
|
||||||
@@ -959,14 +966,14 @@ class comment
|
|||||||
$comment = "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
|
$comment = "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($text)
|
||||||
|
{
|
||||||
|
$text = "<div id='comments-container'>\n".$text."\n</div>";
|
||||||
|
}
|
||||||
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}");
|
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}");
|
||||||
$replace = array($modcomment,"<div id='comments-container'>\n".$text."\n</div>",$comment,$pagination);
|
$replace = array($modcomment,$text,$comment,$pagination);
|
||||||
$TEMPL = str_replace($search,$replace,$this->template['LAYOUT']);
|
$TEMPL = str_replace($search,$replace,$this->template['LAYOUT']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!$return)
|
if(!$return)
|
||||||
{
|
{
|
||||||
if ($tablerender)
|
if ($tablerender)
|
||||||
@@ -985,7 +992,7 @@ class comment
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ret['comment'] = "<div id='comments-container'>\n".$text."\n</div>";
|
$ret['comment'] = $text;
|
||||||
|
|
||||||
$ret['comment_form'] = $comment;
|
$ret['comment_form'] = $comment;
|
||||||
$ret['caption'] = "<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99;
|
$ret['caption'] = "<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99;
|
||||||
|
Reference in New Issue
Block a user