mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
parent
e5af746153
commit
64d821a2d1
@ -162,7 +162,10 @@ class cpage_shortcodes extends e_shortcode
|
||||
{
|
||||
$com = $this->var['comments'];
|
||||
//if($parm && isset($com[$parm])) return $com[$parm];
|
||||
return $com['comment'].$com['comment_form'];
|
||||
|
||||
return e107::getComment()->parseLayout($com['comment'],$com['comment_form'],$com['moderate']);
|
||||
|
||||
// return $com['comment'].$com['moderate'].$com['comment_form'];
|
||||
}
|
||||
|
||||
function sc_cpagenav()
|
||||
|
@ -764,13 +764,15 @@ function sc_user_email($parm='')
|
||||
|
||||
function sc_profile_comments($parm)
|
||||
{
|
||||
if(e107::getPref('profile_comments'))
|
||||
if(!e107::getPref('profile_comments'))
|
||||
{
|
||||
$ret = e107::getComment()->compose_comment('profile', 'comment', $this->var['user_id'], null, $this->var['user_name'], FALSE,true);
|
||||
|
||||
return e107::getRender()->tablerender($ret['caption'],$ret['comment_form']. $ret['comment'], 'profile_comments', TRUE);
|
||||
return '';
|
||||
}
|
||||
return "";
|
||||
|
||||
return e107::getComment()->compose_comment('profile', 'comment', $this->var['user_id'], null, $this->var['user_name'], false,'html');
|
||||
|
||||
// return e107::getRender()->tablerender($ret['caption'],$ret['comment_form']. $ret['comment'], 'profile_comments', TRUE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -321,8 +321,8 @@ if(deftrue('BOOTSTRAP'))
|
||||
$USER_WRAPPER['view']['USER_SIGNATURE'] = '<div>{---}</div>';
|
||||
$USER_WRAPPER['view']['USER_RATING'] = '<div>{---}</div>';
|
||||
$USER_WRAPPER['view']['USER_SENDPM'] = '<div>{---}</div>';
|
||||
$USER_WRAPPER['view']['PROFILE_COMMENTS'] = '<div class="panel panel-default clearfix">{---}';
|
||||
$USER_WRAPPER['view']['PROFILE_COMMENT_FORM'] = '{---} </div>';
|
||||
$USER_WRAPPER['view']['PROFILE_COMMENTS'] = '<div class="clearfix">{---}</div>';
|
||||
// $USER_WRAPPER['view']['PROFILE_COMMENT_FORM'] = '{---} </div>';
|
||||
|
||||
$USER_TEMPLATE['view'] = '
|
||||
{SETIMAGE: w=600}
|
||||
@ -372,12 +372,16 @@ if(deftrue('BOOTSTRAP'))
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{PROFILE_COMMENTS}
|
||||
{PROFILE_COMMENT_FORM}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start Comments -->
|
||||
{PROFILE_COMMENTS}
|
||||
<!-- End Comments -->
|
||||
|
||||
';
|
||||
}
|
||||
|
||||
|
@ -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']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1193,9 +1193,7 @@ class news_front
|
||||
|
||||
if(!empty($text))
|
||||
{
|
||||
// $text = $comments['comment_form'] . $comments['comment'] .$comments['moderate'];
|
||||
return $text;
|
||||
// return e107::getRender()->tablerender($comments['caption'], $text,'comment', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user