1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-27 08:14:46 +02:00

Fixes #2425 Fixes #2281 Fixes #2937 Comment navigation issues.

This commit is contained in:
Cameron
2018-07-28 16:10:23 -07:00
parent e5af746153
commit 64d821a2d1
5 changed files with 40 additions and 20 deletions

View File

@@ -1174,11 +1174,9 @@ class comment
{
$text = "<ul class='media-list' id='comments-container'><li><!-- --></li></ul>";
}
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}");
$pagination = '';
$replace = array($modcomment,$text,$comment,$pagination);
$TEMPL = str_replace($search,$replace,$this->template['layout']);
$TEMPL = $this->parseLayout($text,$comment,$modcomment);
// $return = null;
@@ -1209,8 +1207,8 @@ class comment
}
$ret = array();
$ret['comment'] = $text;
$ret['moderate'] = $modcomment;
$ret['comment_form'] = $comment;
@@ -1219,7 +1217,22 @@ class comment
return (!$return) ? "" : $ret;
}
/**
* Parse the Comment Layout template
* @param $comment
* @param $form
* @param $modcomment
* @return mixed
*/
public function parseLayout($comment, $form, $modcomment)
{
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}");
$pagination = '';
$replace = array($modcomment,$comment,$form,$pagination);
return str_replace($search,$replace,$this->template['layout']);
}