Comment Voting

add very simple comment voting like we know it from php.net


_comments.php


<?php

    $tpl
->votedown $this->href('rate''', ['vote' => 1]);
    
$tpl->votedown $this->href('rate''', ['vote' => 0]) ;

    
// reply button
    
if ($this->is_admin() || $this->is_owner($comment['page_id']))
    {
        
$tpl->reply_captcha $this->href('''', ['parent_id' => $comment['page_id'], '#' => 'commentform']);
    }


template

<div class="comment-tool">
	<ul class="" style="padding-left: 0;">
		<li class="voting">
			<a title="Vote up" class="vote-up  count-0" href="[ 'voteup ' ]">
				<span class="updatable count">0</span>
				<span class="control">&and;</span>
			</a>
			<a title="Vote down" class="vote-down  count-0" href="[ ' votedown ' ]">
				<span class="control">&or;</span>
			</a>
		</li>
		<li class="bullet">.</li>
		<li class="reply">
		[= reply _ =
			<a href="[ 'href ' ]">[ ' _t: ReplyComment ' ]</a>
		=]
		</li>
	</ul>
</div>

.vote-down {
    border-color: rgba(0, 39, 59, 0.08);
    border-left: 2px solid rgba(0, 39, 59, 0.08);
    padding-left: 6px;
    padding-right: 0;
}