mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 01:40:22 +02:00
simplified comment reply view
This commit is contained in:
@@ -932,13 +932,19 @@ class comment
|
||||
'subject' => $subject,
|
||||
'rate' => $rate
|
||||
);
|
||||
$text = $lock = $modcomment ='';
|
||||
|
||||
if($action != 'reply')
|
||||
{
|
||||
$tmp = $this->getComments($table,$id,0,$options); // render all comments;
|
||||
$text = $tmp['comments'];
|
||||
$lock = $tmp['lock'];
|
||||
|
||||
unset($tmp);
|
||||
}
|
||||
// -------------------------------------------------------
|
||||
|
||||
if($text)
|
||||
{
|
||||
if($this->totalComments && getperms("B"))
|
||||
{
|
||||
$modcomment = "<div class='comment-moderate'>";
|
||||
@@ -948,6 +954,7 @@ class comment
|
||||
}
|
||||
|
||||
$modcomment .= $this->nextprev($table,$id,$from);
|
||||
}
|
||||
// ---------------------------
|
||||
|
||||
if ($lock != '1')
|
||||
@@ -959,14 +966,14 @@ class comment
|
||||
$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}");
|
||||
$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']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!$return)
|
||||
{
|
||||
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['caption'] = "<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99;
|
||||
|
Reference in New Issue
Block a user