TeComment
TeComment
usr/plugins/
Console>Plug ins
TeComment
<? php TeComment_Plugin::showTool();?>
/** *Rewrite comment display function */ function threadedComments($comments, $options){ $html = TeComment_Plugin::parseCommentHtml($comments, $options); $children = ''; if ($comments->children) { ob_start(); $comments->threadedComments(); $children = ob_get_contents(); ob_end_clean(); } $html = str_replace('>{children}<','>'.$children.'<',$html); echo $html; }
<? php $this->comments()->to($comments); ?> <? php if ($comments->have()): ?> <? php $comments->listComments(); ?> <? php $comments->pageNav('« Previous', 'Next');?> <? php endif; ?>
<? php if($this->options->plugin('TeComment')->commentAjaxLoad): ?> <div id="comment-ajax-list" data-cid="<?php $this->cid();?> " data-num="<? php $this->commentsNum();?> " data-comment-page="<? php echo $this->request->commentPage;?>"></div> <? php else: ?> <? php $this->comments()->to($comments); ?> <? php if ($comments->have()): ?> <? php $comments->listComments(); ?> <? php $comments->pageNav('« Previous', 'Next');?> <? php endif; ?> <? php endif; ?>
<? php $comments->cancelReply(); ?>
<? php echo '<a id="cancel-comment-reply-link" href="' . $ this->permalink . '#' . $this->respondId . '" rel="nofollow"' . ($this->request->filter('int')->replyTo ? '' : ' style="display:none"') . ' onclick="return TypechoComment.cancelReply(); ">'. _t ('cancel reply'). '</a>';?>
This function is compatible with the default anti garbage protection function of the system
<li id="{theId}" class="widget {commentClass}"> <div class="comment-meta"> <div class="comment-meta-avatar">{authorAvatar}</div> <div class="comment-meta-author"> <strong>{beforeAuthor}<a href="{authorUrl}" rel="external nofollow" target="_blank">{authorName}</a>{afterAuthor}{commentStatus}</strong> </div> <div class="comment-meta-time">{beforeDate}{created}{afterDate}</div> <div class="comment-meta-reply">{replyLink}</div> </div> <div class="comment-content">{content}</div> <div class="comment-children">{children}</div> </li>
{theId}
{commentClass}
{authorAvatar}
{authorName}
{authorUrl}
{authorUrl}
{created}
{replyLink}
{content}
{children}
<? php TeComment_Plugin::showTool();?>