mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
@@ -162,7 +162,10 @@ class cpage_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
$com = $this->var['comments'];
|
$com = $this->var['comments'];
|
||||||
//if($parm && isset($com[$parm])) return $com[$parm];
|
//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()
|
function sc_cpagenav()
|
||||||
|
@@ -764,13 +764,15 @@ function sc_user_email($parm='')
|
|||||||
|
|
||||||
function sc_profile_comments($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 '';
|
||||||
|
|
||||||
return e107::getRender()->tablerender($ret['caption'],$ret['comment_form']. $ret['comment'], 'profile_comments', TRUE);
|
|
||||||
}
|
}
|
||||||
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_SIGNATURE'] = '<div>{---}</div>';
|
||||||
$USER_WRAPPER['view']['USER_RATING'] = '<div>{---}</div>';
|
$USER_WRAPPER['view']['USER_RATING'] = '<div>{---}</div>';
|
||||||
$USER_WRAPPER['view']['USER_SENDPM'] = '<div>{---}</div>';
|
$USER_WRAPPER['view']['USER_SENDPM'] = '<div>{---}</div>';
|
||||||
$USER_WRAPPER['view']['PROFILE_COMMENTS'] = '<div class="panel panel-default clearfix">{---}';
|
$USER_WRAPPER['view']['PROFILE_COMMENTS'] = '<div class="clearfix">{---}</div>';
|
||||||
$USER_WRAPPER['view']['PROFILE_COMMENT_FORM'] = '{---} </div>';
|
// $USER_WRAPPER['view']['PROFILE_COMMENT_FORM'] = '{---} </div>';
|
||||||
|
|
||||||
$USER_TEMPLATE['view'] = '
|
$USER_TEMPLATE['view'] = '
|
||||||
{SETIMAGE: w=600}
|
{SETIMAGE: w=600}
|
||||||
@@ -372,12 +372,16 @@ if(deftrue('BOOTSTRAP'))
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{PROFILE_COMMENTS}
|
|
||||||
{PROFILE_COMMENT_FORM}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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>";
|
$text = "<ul class='media-list' id='comments-container'><li><!-- --></li></ul>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}");
|
|
||||||
$pagination = '';
|
$TEMPL = $this->parseLayout($text,$comment,$modcomment);
|
||||||
$replace = array($modcomment,$text,$comment,$pagination);
|
|
||||||
$TEMPL = str_replace($search,$replace,$this->template['layout']);
|
|
||||||
|
|
||||||
|
|
||||||
// $return = null;
|
// $return = null;
|
||||||
@@ -1209,8 +1207,8 @@ class comment
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$ret = array();
|
||||||
$ret['comment'] = $text;
|
$ret['comment'] = $text;
|
||||||
$ret['moderate'] = $modcomment;
|
$ret['moderate'] = $modcomment;
|
||||||
$ret['comment_form'] = $comment;
|
$ret['comment_form'] = $comment;
|
||||||
@@ -1219,7 +1217,22 @@ class comment
|
|||||||
return (!$return) ? "" : $ret;
|
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))
|
if(!empty($text))
|
||||||
{
|
{
|
||||||
// $text = $comments['comment_form'] . $comments['comment'] .$comments['moderate'];
|
|
||||||
return $text;
|
return $text;
|
||||||
// return e107::getRender()->tablerender($comments['caption'], $text,'comment', true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user