You are not connected. Please login or register

    Style 1
    15062013
    Admin
    Admin
    [Only topic] Đánh giá bài viết (Like, Dislike, Thank,... buttons) Captur19(*) Phiên bản hỗ trợphpBB2punBb, Invision, PhpBB3
    B1: Tạo 1 file js: (ACP - Modules - HTML & JAVASCRIPT - Javascript codes management:
    - Title * : Trích dẫn bài viết
    - Placement: In the topics
    - Javascript Code * :
    Code:
    var like_version = 'phpbb3';
    var DOM_IS_READY = false;
    $(function(){DOM_IS_READY=true;});
    var vote_singular = 'Like';
    var vote_plural = 'Likes';
    $.getScript('http://www.avacweb.net/like');
    Thay phpbb3 trong đoạn code trên thành phiên bản tương ứng: phpbb2, punbb, invision
    B2: Thêm vào CSS:
    Code:
    .LGlike {
      background: #105289;
      padding: 3px;
      border-radius: 4px;
      color: #fff;
      font-size: 10px;
      font-weight: bold;
      text-shadow: -1px 0.5px #888;
      box-shadow: 1px 1px 1px #888;
      cursor: pointer;
      margin-right: 4px;
     }
     .LGvote { margin: 0 5px; }
     .LGnovote {
      filter:Alpha(opacity=50);
      opacity: 0.5;
      cursor: default;
      box-shadow: none;
      text-shadow: none;
     }



    Được sửa bởi Admin ngày 15/06/13, 10:49 am; sửa lần 1.

    https://fm-wiki.123.st/
    Share this post on: reddit

    Permissions in this forum:
    Bạn không có quyền trả lời bài viết

    Comments

     15/06/13, 10:36 am
    Admin
    Admin
    [Only topic] Đánh giá bài viết (Like, Dislike, Thank,... buttons) Untitl11(*) Phiên bản hỗ trợ: Invision
    Tạo 1 js mới, đặt In the topics:
    Code:
    $(function () {
        var b = $(".vote").get();
        for (i = b.length - 1; 0 <= i; i--) {
            var c = "0",
                d = "0",
                e = '<span class="i_ liked" title="You cannot vote this post"><img id="liked" width="23px" height="23px" src="http://2img.net/i/fa/empty.gif"/></img> Liked</span>',
                f = '<span class="i_ disliked" title="You cannot vote this post" style="margin-left:3px"><img id="disliked" width="23px" height="23px" src="http://2img.net/i/fa/empty.gif"/></img></span>',
                l = "0",
                a = $(b[i]).find(".vote-button a").get();
            for (j = 0; j < a.length; j++) {
                "+" == a[j].innerHTML ? e = ' <div class="vote vote-button like"><a href="' + a[j].href + '" alt="plus" title="Like" alt="iplus" class="iplus lvote"><span style="margin-left: -2px; color: #3B5998;"><img id="like" width="23px" height="23px" src="http://2img.net/i/fa/empty.gif"> <w>Like</w></span><b style="display:none"><font color="green">liked</font></b><i style="display:none"><font color="green">thích</font></i></a></div>' : "-" == a[j].innerHTML && (f = '<div class="vote vote-button dislike"><a href="' + a[j].href + '" title="Dislike" alt="minus" class="iminus lvote"><span style="margin-left: -2px; color: #3B5998;"><img id="dislike" width="23px" height="23px" src="http://2img.net/i/fa/empty.gif"></span><b style="display:none"><font color="red">disliked</font></b><i style="display:none"><font color="red">không thích</font></i></a></div>')
            }
            if (a = $(b[i]).find(".vote-bar")[0]) {
                c = a.title.split(" "), d = parseInt(c[3].replace(/%/, "")) / 100, a = parseInt(c[4].replace(/\(/, "")), c = String(Math.round(a * d)), d = String(a - c);
                l = Math.round((c - d) / a * 100)
            }
            $(b[i]).parents('.post').find('.posting-icons').prepend('<li class="ddvote"> ' + e + '' + f + '      <span class="ivau" style="display: inline; opacity: 1;"><span class="no"><span class="vop"><img class="vopi" width="9px" height="14px" src="http://2img.net/i/fa/empty.gif"><span class="plus">' + c + '</span> +</span> <span style="color:#C2D5E3">|</span> <span class="vom"><img class="vomi" width="9px" height="14px" src="http://2img.net/i/fa/empty.gif"><span class="minus">' + d + '</span> -</span></span> <span class="qua">Đánh giá: <span class="qu">' + l + "</span>% </span></span>       </li>");
            b[i].parentNode.removeChild(b[i])
        }
        c = $(".ddvote a").get();
        for (g = 0; g < c.length; g++) {
            $(".ddvote a:eq(" + g + ")").attr("target", "vote" + g);
            $(".ddvote a:eq(" + g + ")").after('<iframe name="vote' + g + '" style="display:none"></iframe>');
            b = $(".ddvote a:eq(" + g + ")").attr("href"), $(".ddvote a:eq(" + g + ")").attr("href", "" + b + ""), $(".ddvote a:eq(" + g + ")").click(function () {
                var a = $(this).attr("alt");
                $(this).parent().parent().fadeOut("slow").fadeIn("slow");
                $(this).parent().parent().children('.ivau').children('.no').find("." + a).html(Number($(this).parent().parent().find("." + a).html()) + 1);
                var c = Number($(this).parent().parent().find(".plus").html()),
                    d = Number($(this).parent().parent().find(".minus").html());
                $(this).parent().parent().find(".qu").html(100 * (c - d) / (c + d));
                "plus" == a ? ($(this).parent().next().remove(), $(this).remove()) : ($(this).parent().prev().remove(), $(this).remove())
            })
        }
    });
    Nhét vào CSS để làm đẹp:
    Code:
       /*vote*/
    .ivau .qua,.no,.ost,.sharez{background-position:5px 50%;background-repeat:no-repeat;border:1px solid #C2D5E3!important;margin:6px 2px 0;padding:5px 8px 5px 25px}
    .sharez{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/fav10.png)}
    .qua{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/no10.gif);padding-left:31px!important}
    .no{padding:5px 8px}
    .vopi,.vomi{margin-right:3px;margin-top:-2px}
    .vopi{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -202px -68px;background-size:auto;padding:0 8px 0 0;width:9px}
    .vomi{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) 0 -81px;background-size:auto;padding:0 8px 0 0;width:9px}
    .vote-button{float:left;width:60px;margin-top:-3px}
    .iplus,.iminus{font-family:'Trebuchet MS', Helvetica;font-size:11px;color:#737373!important;padding:5px 6px 7px;border-radius:2px;text-shadow:0 1px 0 rgba(255,255,255,.5);border:1px solid #d3d3d3;background-color:#f8f8f8;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fffcfcfc,EndColorStr=#fff8f8f8);background-image:-moz-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-ms-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fcfcfc),color-stop(100%,#f8f8f8));background-image:-webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fcfcfc 0,#f8f8f8 100%)}
    .i_{font-family:'Trebuchet MS', Helvetica;font-size:11px;color:#737373!important;padding:5px 6px 7px;border-radius:2px;text-shadow:0 1px 0 rgba(255,255,255,.5);border:1px solid #d3d3d3}
    #like{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -374px -58px;background-size:auto;padding:0}
    .liked,.disliked{border-color:#c6c6c6;background-color:#e9e9e9;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.20);-ms-box-shadow:inset 0 1px 1px rgba(0,0,0,.20);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.20);box-shadow:inset 0 1px 1px rgba(0,0,0,.20);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fff8f8f8,EndColorStr=#ffeeeeee);background-image:-moz-linear-gradient(top,#f8f8f8 0,#eee 100%);background-image:-ms-linear-gradient(top,#f8f8f8 0,#eee 100%);background-image:-o-linear-gradient(top,#f8f8f8 0,#eee 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f8f8f8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f8f8f8 0,#eee 100%);background-image:linear-gradient(to bottom,#f8f8f8 0,#eee 100%)}
    #liked{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -17px -45px!important;background-size:auto;padding:0}
    #dislike{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -213px -143px;background-size:auto;padding:0}
    .iplus:hover,.iminus:hover{text-shadow:0 1px 0 rgba(255,255,255,.5);border-color:#d3d3d3;background-color:#f8f8f8;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fffcfcfc,EndColorStr=#fff8f8f8);background-image:-moz-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-ms-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fcfcfc),color-stop(100%,#f8f8f8));background-image:-webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fcfcfc 0,#f8f8f8 100%)}
    .iplus:hover #like{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -157px -241px}
    .iminus:hover #dislike,#disliked{background:no-repeat url(http://i81.servimg.com/u/f81/17/70/31/89/www-hi10.png) -244px -220px}
    .plus,.minus,.qu{font-weight:700;font-size:12px}
    .plus{color:green}
    .minus{color:red}
    .qu{color:#EE82EE}

    Bài gửi
     15/06/13, 10:37 am
    Admin
    Admin
    [Only topic] Đánh giá bài viết (Like, Dislike, Thank,... buttons) Ifc610(*) Phiên bản hỗ trợ: Invision
    Tạo 1 js mới, đặt In the topics:
    Code:
    $(function () {
        var b = $(".vote").get();
        for(i = b.length - 1; 0 <= i; i--) {
            var c = "0",
                d = "0",
                e = '',
                f = '',
                l = "0",
                a = $(b[i]).find(".vote-button a").get();
            for(j = 0; j < a.length; j++) {
                "+" == a[j].innerHTML ? e = ' <div class="vote vote-button"><a href="' + a[j].href + '" alt="plus" alt="iplus" class="iplus lvote"><span style="margin-left: -2px; color: #3B5998;">Like</span></a></div>' : "-" == a[j].innerHTML && (f = '<div class="vote vote-button"><a href="' + a[j].href + '" alt="minus" class="iminus lvote"><span style="margin-left: -2px; color: #3B5998;">Dislike</span></a></div>')
            }
            if(a = $(b[i]).find(".vote-bar")[0]) {
                c = a.title.split(" "), d = parseInt(c[3].replace(/%/, "")) / 100, a = parseInt(c[4].replace(/\(/, "")), c = String(Math.round(a * d)), d = String(a - c);
                l = (c - d) / a * 100
            }
            $(b[i].parentNode.parentNode.parentNode.nextSibling.childNodes[1]).prepend('<li class="ddvote"><div class="loadding" style="display: none "><img src="http: https://i.servimg.com/u/f43/16/03/04/56/icon_l12.gif"> Chờ chút nhé ^^! </div> ' + e + '' + f + '       <span class="ivau" style="display: inline; opacity: 1;"><span class="no"><span class="vop"><span class="plus">' + c + '</span> +</span> <span style="color:#C2D5E3">|</span> <span class="vom"><span class="minus">' + d + '</span> -</span></span> <span class="qua">Đánh giá: <span class="qu">' + l + "</span>% </span></span>      </li>");
            b[i].parentNode.removeChild(b[i])
        }
        c = $(".ddvote a").get();
        for(g = 0; g < c.length; g++) {
            b = $(".ddvote a:eq(" + g + ")").attr("href"), $(".ddvote a:eq(" + g + ")").attr("href", "javascript:$.post('" + b + "')"), $(".ddvote a:eq(" + g + ")").click(function () {
                var a = $(this).attr("alt");
                $(this).parent().parent().fadeOut(1000);
                $(this).parent().parent().find(".loading").show(1000);
                $(this).parent().parent().find(".loading").fadeOut(1000);
                $(this).parent().parent().fadeIn(1000);
                $(this).parent().parent().children('.ivau').children('.no').find("." + a).html(Number($(this).parent().parent().find("." + a).html()) + 1);
                var c = Number($(this).parent().parent().find(".plus").html()),
                    d = Number($(this).parent().parent().find(".minus").html());
                $(this).parent().parent().find(".qu").html(100 * (c - d) / (c + d));
                "plus" == a ? ($(this).parent().next().remove(), $(this).remove()) : ($(this).parent().prev().remove(), $(this).remove())
            })
        }
    });
    Nhét vào CSS:
    Code:
    .ivau .qua,.no,.ost,.share{background-position:5px 50%;background-repeat:no-repeat;border:1px solid #C2D5E3!important;margin:6px 2px 0;padding:5px 8px 5px 25px}
    .share{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/fav10.png)}
    .qua{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/no10.gif);padding-left:31px!important}
    .no{padding:5px 8px}
    .no .vop{background:url(http://i42.servimg.com/u/f42/17/92/41/65/discou10.png) no-repeat left center;padding:0 0 0 18px}
    .no .vom{background:url(http://i42.servimg.com/u/f42/17/92/41/65/discou11.png) no-repeat left center;padding:0 0 0 18px}
    .vote-button{float:left;width:60px}
    .iplus{background:url(http://i42.servimg.com/u/f42/17/92/41/65/discou10.png) no-repeat scroll 0 0 #E0E0E0;background-position:6px 36%;background-repeat:no-repeat;border:1px solid #E0E0E0;border-radius:3px 3px 3px 3px;color:#fff!important;display:block;float:left;height:13px;position:relative;text-align:left;width:25px;margin:-4px 2px 0;padding:4px 4px 5px 24px}
    .iminus{background:url(http://i42.servimg.com/u/f42/17/92/41/65/discou11.png) no-repeat scroll #E0E0E0;background-position:6px 36%;background-repeat:no-repeat;border:1px solid #CAD4E7;border-radius:3px 3px 3px 3px;color:#fff!important;display:block;float:left;height:13px;position:relative;text-align:left;width:45px;margin:-4px 0 0;padding:4px 4px 5px 24px}
    .iplus:hover,.iminus:hover{background-color:#ebedf4;border-color:#9dacce}
    .plus,.minus,.qu{font-weight:700;font-size:12px}
    .plus{color:green}.minus{color:red}.qu{color:violet}

    Bài gửi
     15/06/13, 10:37 am
    Admin
    Admin
    [Only topic] Đánh giá bài viết (Like, Dislike, Thank,... buttons) 1-13-210(*) Phiên bản hỗ trợ: PunBb
    Bước 1: Thêm vào CSS:
    Code:
    /* star rating */
    .voteStar{background:url(http://i15.servimg.com/u/f15/16/58/89/73/star10.png) no-repeat scroll 0 0 transparent;width:16px;height:16px;display:inline-block}
    .v0{background-position:0 0}
    .v1{background-position:0 -16px}
    .v2{background-position:0 -32px}
    .v3{background-position:0 -48px}
    .v4{background-position:0 -64px}
    .votebutton{left:-64px;position:absolute;top:5px;z-index:10}
    .votebutton a{opacity:0.3;padding:0 7px}
    .votetip{text-align:center;background-color:#474747;margin-top:5px;padding:3px 7px}
    .voteBfmvi{position:relative;display:none;float:right}
    .voteBfmvi a:hover{opacity:1}
    .voteBfmvi:hover .voteshow{opacity:0.4}
    #firstvote .votebutton{top:0}
    .fmvistar,.fmviminus{height:10px;position:absolute;right:0;top:0;width:10px;margin:0}
    .rootvote{height:10px;left:553px;position:absolute;top:10px;width:10px;url(http://i12.servimg.com/u/f12/17/70/81/78/13580710.png);url(http://i12.servimg.com/u/f12/17/70/81/78/sticky10.png);url(http://i12.servimg.com/u/f12/17/70/81/78/like_b11.png);url(http://i12.servimg.com/u/f12/17/70/81/78/dislik11.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581110.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581111.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581112.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581113.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581114.png);url(http://i12.servimg.com/u/f12/17/70/81/78/13581115.png)}
    .rootvote img{display:none}

    Bước 2: Thay templates viewcomments_body:
    Code:
    <style type="text/css">
     #pun-qpost{display:block}
    </style>
    <span id="changeSfmvi" style="left: 0px; top: 47px; border-radius: 0px 3px 3px 0px; background-color: rgb(221, 221, 221); padding: 5px; width: 20px;" class="contactF">
     <img src="http://www.google.com/reader/ui/3369744051-view_options_list.png" />
     <img style="display:none" src="http://www.google.com/reader/ui/3538434020-view_options_details.png" />
    </span>
    <script type="text/javascript">
    //<![CDATA[
    var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };
    //]]>
    </script>
    <span id="tidX" style="display:none">{TOPIC_ID}</span>
    <div class="main paged">
     <div class="paged-head clearfix">
     <!-- BEGIN topicpagination -->
     <p class="paging">{PAGINATION}</p>
     <!-- END topicpagination -->
     <p class="posting">
     <!-- BEGIN switch_user_authpost -->
     <a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>  
     <!-- END switch_user_authpost -->
     <!-- BEGIN switch_user_authreply -->
     <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
     <!-- END switch_user_authreply -->
     </p>
     </div>{POLL_DISPLAY}
     <div class="main-head clearfix">
     <p class="h2">
     <a href="#bottom">{L_GOTO_DOWN}</a>{L_MESSAGE} [{PAGE_NUMBER}]</p>
     </div>
     <div class="main-content topic">
     <!-- BEGIN postrow -->
     <!-- BEGIN displayed -->
               <a name="{postrow.displayed.U_POST_ID}"></a>
     <div id="p{postrow.displayed.U_POST_ID}" class="post" {postrow.displayed.THANK_BGCOLOR}>
     <div class="postmain" {postrow.displayed.THANK_BGCOLOR}>
     <div class="posthead" style="position: relative;" {postrow.displayed.THANK_BGCOLOR}>
                                       <div class="rootvote" style="left: 867px;"><img class="fmvistar" alt="50,32,50" src="http://i12.servimg.com/u/f12/17/70/81/78/13581110.png" /><img class="fmvistar" alt="30,20,20" src="http://i12.servimg.com/u/f12/17/70/81/78/13581112.png" /><img class="fmvistar" alt="45,40,25" src="http://i12.servimg.com/u/f12/17/70/81/78/13581113.png" /><img class="fmvistar" alt="40,20,20" src="http://i12.servimg.com/u/f12/17/70/81/78/13581114.png" /><img class="fmvistar" alt="25,35,70" src="http://i12.servimg.com/u/f12/17/70/81/78/13581115.png" /><img class="fmvistar" alt="50,15,30" src="http://i12.servimg.com/u/f12/17/70/81/78/13581110.png" /><img class="fmvistar" alt="55,30,45" src="http://i12.servimg.com/u/f12/17/70/81/78/13581112.png" /><img class="fmvistar" alt="45,30,60" src="http://i12.servimg.com/u/f12/17/70/81/78/13581113.png" /><img class="fmvistar" alt="55,15,40" src="http://i12.servimg.com/u/f12/17/70/81/78/13581114.png" /><img class="fmvistar" alt="45,20,45" src="http://i12.servimg.com/u/f12/17/70/81/78/13581115.png" /><img class="fmviminus" src="http://i12.servimg.com/u/f12/17/70/81/78/13581111.png" /></div>
     <span id="firstvote" class="voteBfmvi">
     <!-- BEGIN switch_vote_active -->
     <!-- BEGIN switch_vote -->
     <div class="vote-button">
                                                     <a onclick="voteblog(this, 'm'); return false" class="mvote" onmouseover="show_tooltip(this, 'Quá tệ <img style=\'float: right\' alt=\'plus\' alt=\'minus\' src=\'http://i12.servimg.com/u/f12/17/70/81/78/sticky10.png\' />', 'FMvi.vn')" href="javascript:void(0)" alt="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}"><img src="http://i12.servimg.com/u/f12/17/70/81/78/dislik11.png" /></a>
     <a onclick="voteblog(this, 'p'); return false" class="pvote" onmouseover="show_tooltip(this, 'Rất hay <img style=\'float: right\' alt=\'plus\' alt=\'plus\' src=\'http://i12.servimg.com/u/f12/17/70/81/78/13580710.png\' />', 'FMvi.vn')" href="javascript:void(0)" alt="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}"><img src="http://i12.servimg.com/u/f12/17/70/81/78/like_b11.png" /></a>
     </div>
     <!-- END switch_vote -->
     <!-- BEGIN switch_bar -->
     <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
     </div>
     <!-- END switch_bar -->
     <!-- END switch_vote_active -->
     </span>
     <h2>{postrow.displayed.ICON} <a class="tieudeT" href="{postrow.displayed.POST_URL}">{postrow.displayed.POST_SUBJECT}</a></h2>
     </div>
     <div class="postbody" {postrow.displayed.THANK_BGCOLOR}>
     <div class="user online">
     <div class="user-ident" style="position: relative;">
     <div class="username authblog">
     {postrow.displayed.POSTER_NAME}
     </div>
     <div class="user-basic-info">
     <div class="useravatar" style="padding: 15px 10px">{postrow.displayed.POSTER_AVATAR}</div>
     <p class="rankimg" style="margin-left: -2px;">{postrow.displayed.RANK_IMAGE}</p>
     </div>
     </div>
     </div>
     <div class="post-entry">
     <div class="entry-content">
     <div>{postrow.displayed.MESSAGE}
     <!-- BEGIN switch_attachments -->
     <div class="clear"></div>
     <dl class="attachbox">
     <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
     <dd>
     <!-- BEGIN switch_post_attachments -->
     <dl class="file">
     <dt>
     <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" />
     <!-- BEGIN switch_dl_att -->
     <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a>{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}
     <!-- END switch_dl_att -->
     <!-- BEGIN switch_no_dl_att -->{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT}
     {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL}
     <!-- END switch_no_dl_att -->
     </dt>
     <!-- BEGIN switch_no_comment -->
     <dd>
     <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em>
     </dd>
     <!-- END switch_no_comment -->
     <!-- BEGIN switch_no_dl_att -->
     <dd>
     <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</em>
     </dd>
     <!-- END switch_no_dl_att -->
     <dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE})
     {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd>
     </dl>
     <!-- END switch_post_attachments -->
     </dd>
     </dl>
     <!-- END switch_attachments -->
     </div>
     </div>
     </div>
     </div>

     <div class="postfoot clearfix">
     <div class="options-button user-contact">{postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}
     <!-- BEGIN contact_field -->{postrow.displayed.contact_field.CONTENT}
     <!-- END contact_field -->
     </div>
     <div class="post-options options-button">
                                               {postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG}
                                       </div>
     </div>
     </div>
     </div>
     <!-- END displayed -->
     <!-- BEGIN hidden -->
     <p class="p-hidden">{postrow.hidden.MESSAGE}</p>
     <!-- END hidden -->
     <!-- END postrow -->
     </div>
     <div id="bookmarks">
     <!-- BEGIN social_bookmarking -->
     <a href="{social_bookmarking.URL}" title="{social_bookmarking.TITLE}"
     target="_blank" rel="nofollow">
     <img class="{social_bookmarking.CLASS}" src="http://2img.net/i/fa/empty.gif" alt="{social_bookmarking.TITLE}" title="{social_bookmarking.TITLE}" />
     </a>
     <!-- END social_bookmarking -->
     </div>
     <div class="clear"></div>
     <hr id="first-post-br" />
     <div class="main-content blog_comments">
     <!-- BEGIN comment -->
     <!-- BEGIN displayed -->
     <a name="{comment.displayed.U_POST_ID}"></a>
     <div id="p{comment.displayed.U_POST_ID}" class="post">
     <div class="blog_comment-avatar">{comment.displayed.POSTER_AVATAR}</div>
     <div class="postbody">
                               <span class="nonchange"><em class="authblog">{comment.displayed.POSTER_NAME}</em>
     <span class="onoffBlog">{comment.displayed.L_ONLINE}</span>
                                       <div class="rootvote"><img class="fmvistar" alt="50,32,50" src="http://i12.servimg.com/u/f12/17/70/81/78/13581110.png" /><img class="fmvistar" alt="30,20,20" src="http://i12.servimg.com/u/f12/17/70/81/78/13581112.png" /><img class="fmvistar" alt="45,40,25" src="http://i12.servimg.com/u/f12/17/70/81/78/13581113.png" /><img class="fmvistar" alt="40,20,20" src="http://i12.servimg.com/u/f12/17/70/81/78/13581114.png" /><img class="fmvistar" alt="25,35,70" src="http://i12.servimg.com/u/f12/17/70/81/78/13581115.png" /><img class="fmvistar" alt="50,15,30" src="http://i12.servimg.com/u/f12/17/70/81/78/13581110.png" /><img class="fmvistar" alt="55,30,45" src="http://i12.servimg.com/u/f12/17/70/81/78/13581112.png" /><img class="fmvistar" alt="45,30,60" src="http://i12.servimg.com/u/f12/17/70/81/78/13581113.png" /><img class="fmvistar" alt="55,15,40" src="http://i12.servimg.com/u/f12/17/70/81/78/13581114.png" /><img class="fmvistar" alt="45,20,45" src="http://i12.servimg.com/u/f12/17/70/81/78/13581115.png" /><img class="fmviminus" src="http://i12.servimg.com/u/f12/17/70/81/78/13581111.png" /></div>
     <span class="voteBfmvi" style="margin: -8px 250px 0 0 !important">
       <!-- BEGIN switch_vote_active -->
     <!-- BEGIN switch_vote -->
     <div class="vote-button">
                                                       <a onclick="voteblog(this, 'm'); return false" class="mvote" onmouseover="show_tooltip(this, 'Quá tệ <img style=\'float: right\' alt=\'plus\' alt=\'minus\' src=\'http://i12.servimg.com/u/f12/17/70/81/78/sticky10.png\' />', 'FMvi.vn')" href="javascript:void(0)" alt="{comment.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}"><img src="http://i12.servimg.com/u/f12/17/70/81/78/dislik11.png" /></a>
     <a onclick="voteblog(this, 'p'); return false" class="pvote" onmouseover="show_tooltip(this, 'Rất hay <img style=\'float: right\' alt=\'plus\' alt=\'plus\' src=\'http://i12.servimg.com/u/f12/17/70/81/78/13580710.png\' />', 'FMvi.vn')" href="javascript:void(0)" alt="{comment.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}"><img src="http://i12.servimg.com/u/f12/17/70/81/78/like_b11.png" /></a>
     </div>
     <!-- END switch_vote -->
     <!-- BEGIN switch_bar -->
     <div class="vote-bar" title="{comment.displayed.switch_vote_active.L_VOTE_TITLE}">
     </div>
     <!-- END switch_bar -->
     <!-- END switch_vote_active -->
     </span>
     </span>
     <span class="comment-time">{comment.displayed.POST_DATE_NEW} {postrow.displayed.ICON}</span>
     <span class="comment-number">
     <img src="http://i48.servimg.com/u/f48/16/58/89/73/edit_s10.png" />
     <div class="dropMenuP options-button">
                                                     {comment.displayed.THANK_IMG} {comment.displayed.MULTIQUOTE_IMG} {comment.displayed.QUOTE_IMG} {comment.displayed.EDIT_IMG} {comment.displayed.DELETE_IMG} {comment.displayed.IP_IMG} {comment.displayed.REPORT_IMG}
                                            </div>
     </span>
     <span class="comment-content" {comment.displayed.THANK_BGCOLOR}>
     <div class="post-entry">
     <div class="entry-content">
     <div>{comment.displayed.MESSAGE}</div>
     </div>
     </div>
     </span>
     <span class="dialog"></span>
     </div>
     </div>
     <!-- END displayed -->
     <!-- BEGIN hidden -->
     <p class="p-hidden">{comment.hidden.MESSAGE}</p>
     <!-- END hidden -->
     <!-- END comment -->
     <!-- BEGIN no_comment -->
     <div class="post">
     <div class="postbody no_comment">
     <p style="text-align:center">{no_comment.L_NO_COMMENT}</p>
     </div>
     </div>
     <!-- END no_comment -->
     <div class="main-foot clearfix">
     <p class="h2">
     <a href="#top">{L_BACK_TO_TOP}</a>{L_MESSAGE} [{PAGE_NUMBER}]</p>
     <p class="options options-button">
     <input type="hidden" name="t" value="{TOPIC_ID}" />
     <!-- <input type="hidden" name="sid" value="{S_SID}" />-->
     <input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}"
     />
     <!-- BEGIN viewtopic_bottom -->{S_TOPIC_ADMIN}
     <!-- END viewtopic_bottom -->
     </p>
     </div>

     <a name="bottomtitle"></a>
     <div class="paged-foot clearfix">
     <!-- BEGIN topicpagination -->
     <p class="paging">{PAGINATION}</p>
     <!-- END topicpagination -->
     <p class="posting">
     <!-- BEGIN switch_user_authpost -->
     <a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>  
     <!-- END switch_user_authpost -->

     <!-- BEGIN switch_user_authreply -->
     <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
     <!-- END switch_user_authreply -->
     </p>
     </div>
     </div>
    </div>
    <p style="padding: 20px 0; text-align: center">« <a href="{U_VIEW_OLDER_TOPIC}">Xem bài trước</a> | <a href="{U_VIEW_NEWER_TOPIC}">Xem bài kế tiếp</a> »</p>
    <script type="text/javascript">
    $(".voteBfmvi").each(function () {
     var c, f, a, d, h, b, e, g, j, k;
     c = $(this).find(".vote-bar").attr("title");
     /Message reputation :/.test(c) ? (f = c.split(/\W/), b = f[4], c = Math.round(b / 100 * f[7]), f = f[7] - c, a = Math.floor(b / 20), d = Math.round(b / 20), h = b / 20) : c = f = 0;
     k = $(this).find(".vote-button");
     k.length ? (e = "v4", g = "v2", j = "<font color='#E2FE6C'>B\u1ea1n ch\u01b0a b\u00ecnh ch\u1ecdn b\u00e0i vi\u1ebft n\u00e0y!</font>", k = "<div class='votebutton'>" + k.html() + "</div>") : (e = "v3", g = "v1", j = "<font color='#FF5B5B'>Kh\u00f4ng th\u1ec3 b\u00ecnh ch\u1ecdn b\u00e0i vi\u1ebft n\u00e0y!</font>", k = "");
     void 0 == a || c < f && 0 == c ? (a = d = -1, b = 0) : h > a && d > a ? a = d = a : d = -1;
     setstar($(this), a, d, g, e, k, c, f, b, j)
    });

    function voteblog(c, f) {
     $("#tooltip").css("visibility", "hidden");
     var a, d, h, b, e, g, j;
     a = $(c).parents(".voteBfmvi");
     d = eval(a.find(".bloglike").text());
     s = eval(a.find(".blogdlike").text());
     $.post($(c).attr("alt"));
     e = $(c).parents(".post");
     q = "b\u00e0i vi\u1ebft c\u1ee7a [color=green][b][i]" + e.find(".authblog").text() + "[/i][/b][/color] t\u1ea1i [url=http://" + location.host + location.pathname + "?showpost=" + e.prev().attr("name") + "]" + $(".tieudeT").text() + "[/url]";
     "p" == f ? (b = d + 1, sendbot("th\u00edch " + q), a.prev(".rootvote").find(".fmvistar").show().each(function () {
     var b = $(this).attr("alt").split(",");
     $(this).animate({
     right: b[0],
     width: b[1],
     height: b[1],
     top: b[2],
     opacity: 0
     }, 1E3, function () {
     a.prev(".rootvote").remove()
     })
     })) : (h = s + 1, sendbot("kh\u00f4ng th\u00edch " + q), a.prev(".rootvote").find(".fmviminus").show().animate({
     right: -20,
     width: 50,
     height: 50,
     top: -20,
     opacity: 0
     }, 1E3, function () {
     a.prev(".rootvote").remove()
     }));
     a.find(".bloglike").text(b);
     a.find(".blogdlike").text(h);
     d = eval(a.find(".bloglike").text());
     h = eval(a.find(".blogdlike").text());
     b = Math.round(100 * (d / (d + h)));
     e = Math.floor(b / 20);
     g = Math.round(b / 20);
     j = b / 20;
     d < h && 0 == d ? (g = e = -1, b = 0) : j > e && g > e ? g = e : (g = e, e = -1);
     setstar(a, g, e, "v1", "v3", "", d, h, b, "<font color='#FF5B5B'>Kh\u00f4ng th\u1ec3 b\u00ecnh ch\u1ecdn b\u00e0i vi\u1ebft n\u00e0y!</font>")
    }
    function setstar(c, f, a, d, h, b, e, g, j, k) {
     c.html(b + "<div class='voteshow' onmouseover='show_tooltip(this, $(this).parent().find(\"div:last\").html(), \"FMvi.vn\")'><div class='voteStar'></div><div class='voteStar'></div><div class='voteStar'></div><div class='voteStar'></div><div class='voteStar'></div></div><div style='display:none'><h3 class='tiplFMvi' style='color:#0099FF'>TH\u00d4NG TIN B\u00ccNH CH\u1eccN</h3><p><strong>Th\u00edch:</strong> <span class='bloglike' style='color:#FF66CC'>" + e + "</span> l\u01b0\u1ee3t</p><p><strong>Kh\u00f4ng th\u00edch:</strong> <span class='blogdlike' style='color:#009933'>" + g + "</span> l\u01b0\u1ee3t</p><p><strong>T\u1ec9 l\u1ec7 b\u00ecnh ch\u1ecdn:</strong> <span class='blogtlike' style='color:#FF6600'>" + j + "</span>%</p><p class='votetip'>" + k + "</p></div>").fadeIn(300);
     c.find(".voteStar:lt(" + f + ")").addClass(d);
     c.find(".voteStar:eq(" + a + ")").addClass(h)
    }
    </script>
    <!-- BEGIN switch_user_logged_in -->
    <a name="quickreply"></a>{QUICK_REPLY_FORM}
    <!-- END switch_user_logged_in -->
    <div class="fmviToggle" style="width: 300px">
      <div class="main">
        <div class="main-head clearfix">
          <p class="h2" style="width: 220px !important">Quyền hạn của bạn:</p>
        </div>
        <div id="onlinelist">{S_AUTH_LIST} </div>
      </div>
    </div>
    <!-- BEGIN switch_image_resize -->
    <script type="text/javascript">
    <script type="text/javascript">
    //<![CDATA[
    $(resize_images({ 'selector' : '.post-entry .entry-content', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
    //]]>
    </script>
    <!-- END switch_image_resize -->
    <script src="{JS_DIR}addthis/addthis_widget.js" type="text/javascript"></script>

    Viết bởi baivong - www.fmvi.vn

    Bài gửi
     15/06/13, 10:37 am
    Admin
    Admin
    [Only topic] Đánh giá bài viết (Like, Dislike, Thank,... buttons) Cats10(*) Phiên bản hỗ trợphpBB2 (chưa test)punBb
    B1: Tìm đoạn này trong Viewtopic và xóa nó đi:
    Code:
    <!-- BEGIN switch_vote_active -->
    <div class="vote gensmall">
       <!-- BEGIN switch_vote -->
       <div class="vote-button">
          <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a>
       </div>
       <!-- END switch_vote -->
       <!-- BEGIN switch_bar -->
       <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
          <!-- BEGIN switch_vote_plus -->
          <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;">
          </div>
          <!-- END switch_vote_plus -->
          <!-- BEGIN switch_vote_minus -->
          <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;">
          </div>
          <!-- END switch_vote_minus -->
       </div>
       <!-- END switch_bar -->
       <!-- BEGIN switch_no_bar -->
       <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">
          ----
       </div>
       <!-- END switch_no_bar -->
       <!-- BEGIN switch_vote -->
       <div class="vote-button">
          <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a>
       </div>
       <!-- END switch_vote -->
    </div>
    <!-- END switch_vote_active -->

    B2: Chèn 2 đoạn code sau vào Viewtopic:
    Đoạn hiển thị nút like
    Code:
    <div style="float: left;margin-top: 1px;">
                       <!-- BEGIN switch_vote_active -->
          <div class="vote vote-button" title="Thích bài viết này">
             <!-- BEGIN switch_vote -->
          <a target="v{postrow.displayed.U_POST_ID}" href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" alt="c3zplus" class="c3zplus lvote"><span style="font: normal 11px Tahoma, Arial, Helvetica, sans-serif;margin-left: -2px; color: #3B5998;">Thích</span></a>
              <!-- END switch_vote -->
          </div>
          <div class="vote vote-button" title="Không thích bài viết này">
              <!-- BEGIN switch_vote -->
            <a target="v{postrow.displayed.U_POST_ID}" href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}" alt="c3zminus" class="c3zminus lvote"><span style="font: normal 11px Tahoma, Arial, Helvetica, sans-serif;margin-left: -2px; color: #3B5998;">Không thích</span></a>
            <!-- END switch_vote --></div><div id="v{postrow.displayed.U_POST_ID}" class="loadding" style="display: none"><img src="http://i43.servimg.com/u/f43/16/03/04/56/icon_l12.gif"/> Đang Vote chờ xíu ^_^! </div>
                                                      <!-- END switch_vote_active --></div>
    Phần hiển thị số vote:
    Code:
    <div style="float:left; margin-top:5px;background-color:#FFF;">
                 <!-- BEGIN switch_vote_active -->        
      <iframe name="v{postrow.displayed.U_POST_ID}" class="ajaxvote" style="display:none"></iframe>  
    <!-- BEGIN switch_no_bar -->
      <span class="c3zvau v{postrow.displayed.U_POST_ID}" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">{postrow.displayed.switch_vote_active.L_VOTE_TITLE}</span>
     <!-- END switch_no_bar -->
    <!-- BEGIN switch_bar -->
      <span class="c3zvau v{postrow.displayed.U_POST_ID}" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">{postrow.displayed.switch_vote_active.L_VOTE_TITLE}</span>
     <!-- END switch_bar -->
                      <!-- END switch_vote_active --></div>
    Nhét đoạn dưới vào cuối viewtopic:
    Code:

    <style>
    /*vote*/
    .ost,.share,.c3zvau .qua,.no{background-position:5px 50%;background-repeat:no-repeat;border:1px solid #C2D5E3;margin:6px 2px 0;padding:5px 8px 5px 25px}.share{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/fav10.png)}.qua{background-image:url(http://i43.servimg.com/u/f43/16/03/04/56/no10.gif);padding-left:29px!important}.no{padding:5px 8px}.no .vop{background:url(http://i43.servimg.com/u/f43/16/03/04/56/like-f10.png) no-repeat left center;padding:0 0 0 18px}.no .vom{background:url(http://i43.servimg.com/u/f43/16/03/04/56/dislik10.png) no-repeat left center;padding:0 0 0 18px}
    .vote-button{float:left;width:60px}
    .c3zplus:hover{background-color:#ebedf4;border-color:#9dacce}
    .c3zminus:hover{background-color:#ebedf4;border-color:#9dacce}
    .c3zplus {
    background: url(http://i43.servimg.com/u/f43/16/03/04/56/like-f10.png) no-repeat scroll 0 0 #ECEEF5;
    background-position: 6px 36%;
    background-repeat: no-repeat;
    border: 1px solid #CAD4E7;
    border-radius: 3px 3px 3px 3px;
    color: white!important;
    display: block;
    float: left;
    height: 13px;
    margin: -4px 2px 0;
    padding: 4px 4px 5px 24px;
    position: relative;
    text-align: left;
    width: 25px;
    }
    .c3zminus {
    background: url(http://i43.servimg.com/u/f43/16/03/04/56/dislik10.png) no-repeat scroll #ECEEF5;
    background-position: 6px 36%;
    background-repeat: no-repeat;
    border: 1px solid #CAD4E7;
    border-radius: 3px 3px 3px 3px;
    color: white!important;
    display: block;
    float: left;
    height: 13px;
    margin: -4px 0px 0;
    padding: 4px 4px 5px 24px;
    position: relative;
    text-align: left;
    width: 55px;
    }
    </style>
    <script type="text/javascript">
     function chvote(a, b) {
       "Message not voted" == b && (b = "c3zone z vietk 0% (0 vote)");
       var d = parseInt(b.split(" ")[3], 10) / 100,
          c = parseInt(b.split(" ")[4].substr(1), 10),
          b = "Message reputation : " + Math.round(100 * ("c3zplus" == a ? (d * c + 1) / (c + 1) : d * c / (c + 1))) + "% (" + (c + 1) + " vote)";
       return votetrans(b)
    }
    $(".c3zvau").each(function () {
       var a = $(this).text();
       $(this).html(votetrans(a))
    });

    function votetrans(a) {
       if ("Message not voted" == a) return "<span class='qua'>Hãy là người đầu tiên thích điều này</span>";
       var b = parseInt(a.split(" ")[3], 10) / 100,
          a = parseInt(a.split(" ")[4].substr(1), 10),
          d = 0 != b ? "<span class=vop>" + Math.round(b * a) + "+</span>" : "",
          c = 0 != b && 1 != b ? ' <span style="color:#C2D5E3">|</span> ' : "",
          a = 1 != b ? "<span class=vom>" + Math.round(a - b * a) + "-</span>" : "",
          b = Math.round(100 * b);
       return "<span class=no>" + d + c + a + "</span> <span class=qua>Đánh giá: " + b + "%</span>"
    }
    $(".lvote").click(function () {
       "c3zplus" == $(this).attr("alt") ? $(this).parent().html("").next().html("") : $(this).parent().html("").prev().html("");
       var a = $(this).attr("target"),
          b = $(this).attr("alt"),
          d = $("." + a).attr("title");
       $("#" + a).show();
       $("." + a).html(chvote(b, d));
       $("#" + a).fadeIn("slow").animate({
          opacity: 1
       }, 1500).fadeOut("slow", function () {
          $("." + a).fadeOut("slow").animate({
             opacity: 1
          }, 1E3).fadeIn()
       });
       $("." + $(this).attr("target")).removeAttr("title")
    });
    </script>

    Bài gửi
    Sún
    Sún
    Tem đầu :y139:

    Bài gửi
    Sponsored content

    Bài gửi