• Thống kê diễn đàn


fb_Vote đánh giá bài viết và thông báo lên tường

View previous topic View next topic Go down

fb_Vote đánh giá bài viết và thông báo lên tường Empty fb_Vote đánh giá bài viết và thông báo lên tường

Post by Bui Minh Phong™ 26/11/2013, 4:53 pm

[You must be registered and logged in to see this link.]
fb_Vote sẽ thay đổi giao diện nút vote mặc định thành giao diện nút like của facebook(). Có một vài thay đổi so với phiên bản trước.


  1. Vote plus chuyển thành nút Thích, có thể gửi một lời khen lên tường người viết. (nếu họ cho phép)
  2. Vote minus chuyển thành nút Báo xấu, có thể gửi một báo cáo đến Ban quản trị diễn đàn.
  3. Các thông số hiển thị ngay bên cạnh nút bấm.
  4. Cả 2 nút đều có thể gửi thông điệp trực tiếp.
  5. Thông điệp không được gửi nếu người dùng không nhấn Gửi.
  6. Có một thông điệp mặc định nếu người dùng không nhập nội dung.
fb_Vote chưa nhấn
Sau khi nhấn có thể gửi tin


Hướng dẫn:


Bước 1: Kích hoạt chức năng Vote và Report của diễn đàn.

ACP >> Modules >> Points and reputation >> Points system
Activate points system :
Display average points per message :

ACP >> QLTT >> Reports >> Report Post Hack - Configuration
Report status : Members
Allows users to report their own posts. Self-Reports :
Allows your users to edit their own reports. Report edit by users :


Bước 2: ACP >> Display >> Pictures and Colors >> Colors >> CSS Stylesheet

Code:
/* fb_Vote */
.vote-Zzbaivong{float:left;height:24px;text-align:left;position:relative;white-space:nowrap;line-height:22px}
.vote-plus-post,.vote-minus-post{z-index:10;position:absolute;top:32px;left:0;display:none;width:250px;background:#FFF;border:1px solid #F2F2F2;box-shadow:4px 4px 7px 0 #999;padding:5px}
.vote-minus-post{left:120px}
.vote-note{height:20px;line-height:20px;font-size:11px;background:#ffffd3;border:1px solid #F7EB93;margin-bottom:2px;padding:0 5px}
.vote-mess{width:200px;resize:vertical;min-height:40px;height:40px}
.vote-Zzbaivong .vote-send{width:36px;margin-top:0!important;margin-left:2px;cursor:pointer;text-align:center;vertical-align:top;height:40px;background:#0085FF;border:1px #87CEEB;color:#FFF}
.vote-plus-post:before,.vote-minus-post:before{content:'';display:inline-block;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #E2E2E2;position:absolute;left:10px;width:10px;right:-10px;top:-10px}
.vote-plus-post:after,.vote-minus-post:after{content:'';display:inline-block;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid #fff;position:absolute;left:11px;right:-9px;width:9px;top:-9px}
.vote-plus{background:url(http://i57.servimg.com/u/f57/17/05/17/70/like10.png) no-repeat 5px 2px #deeaf7;height:24px;border:1px solid #C8D7EC;color:#5089BE!important;font-family:sans-serif;border-radius:2px;display:inline-block;padding:0 5px 0 25px}
.vote-plus:hover{border-color:#6A9AD6}
.vote-plus[href="javascript:;"]{color:#666!important;background-color:#DDD;cursor:no-drop;background-image:url(http://i57.servimg.com/u/f57/17/05/17/70/gpqbxh10.png);border-color:#CCC}
.vote-time{position:relative;border-radius:2px;display:inline-block;height:24px;line-height:22px;border:1px solid #D8D7D7;margin:auto 5px;padding:0 5px}
.vote-time:before{content:'';display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #CCC;position:absolute;left:-6px;width:6px;top:5px}
.vote-time:after{content:'';display:inline-block;border-bottom:5px solid transparent;border-top:5px solid transparent;border-right:5px solid #fff;position:absolute;left:-5px;width:5px;top:6px}
.vote-minus{margin-left:20px;color:#666!important}
.vote-minus:hover{color:red!important}
.vote-minus[href="javascript:;"]{color:#C5C5C5!important;cursor:no-drop}
Bước 3: ACP >> Display >> QLTT >> Templates >> viewtopic_body

Tìm và xóa đoạn sau:
Code:
<!-- BEGIN switch_vote_active -->
...
<!-- END switch_vote_active -->
Tìm:
Code:
<div class="post-options profile_{postrow.displayed.PROFILE_POSITION}">
Và thêm vào bên dưới nó code sau:
Code:
<div class="vote-Zzbaivong">
    <!-- BEGIN switch_vote_active -->
    <a class="vote-plus" href="<!-- BEGIN switch_vote -->{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}<!-- END switch_vote -->">
        Thích
    </a>
    <span class="vote-time plus-time">0</span>
    <a class="vote-minus" href="<!-- BEGIN switch_vote -->{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}<!-- END switch_vote -->">
        Báo xấu
    </a>
    <span class="vote-time minus-time">0</span>
    <div class="vote-plus-post vote-cmt">
        <p class="vote-note">Gửi một tin nhắn lên tường.</p>
        <textarea class="vote-mess"></textarea>
        <input class="vote-send" tyle="button" value="Gửi" />
    </div>
    <div class="vote-minus-post vote-cmt">
        <p class="vote-note">Gửi báo cáo lỗi về bài viết này.</p>
        <textarea class="vote-mess"></textarea>
        <input class="vote-send" tyle="button" value="Gửi" />
    </div>
    <input class="vote-tip" type="hidden" value="<!-- BEGIN switch_bar -->{postrow.displayed.switch_vote_active.L_VOTE_TITLE}<!-- END switch_bar --><!-- BEGIN switch_no_bar -->{postrow.displayed.switch_vote_active.L_VOTE_TITLE}<!-- END switch_no_bar -->" />
    <!-- END switch_vote_active -->
</div>
Thêm code dưới đây vào cuối viewtopic_body:
Code:
<script type="text/javascript">
    //<![CDATA[
    $(".vote-Zzbaivong").each(function () {
        var b = $(this);
        if (b.is(":empty")) b.html('<a class="vote-plus" href="">Th\u00edch</a><span class="vote-time plus-time">0</span><a class="vote-minus" href="">B\u00e1o x\u1ea5u</a><span class="vote-time minus-time">0</span>');
        else {
            var a = b.find(".vote-tip").val(),
                c;
            /Message\sreputation\s:/.test(a) ? (c = a.split(/\W/), a = Math.round(c[4] / 100 * c[7]), c = c[7] - a) : a = c = 0;
            b.find(".plus-time").text(a);
            b.find(".minus-time").text(c)
        }
    });
    $(document).click(function (b) {
        $(".vote-cmt").fadeOut()
    });
    $(".vote-Zzbaivong").click(function (b) {
        b.stopPropagation()
    });
    $(".vote-plus, .vote-minus").one("click", function (b) {
        b.preventDefault();
        var a = $(this);
        b = a.attr("href");
        /us\&p_vote\=/.test(this.href) && (a.parent().children(".vote-plus, .vote-minus").attr("href", "javascript:;"), a.next(".vote-time").text(function () {
            return parseInt($(this).text()) + 1
        }), a.parent().find(".vote-plus").css("background-image", "url(http://i57.servimg.com/u/f57/17/05/17/70/preloa10.gif)"), $.get(b, function () {
            a.parent().children(".vote-plus").removeAttr("style")
        }), a.siblings("." + a.attr("class") +
            "-post").fadeIn().children(".vote-mess").focus())
    });
    $(".vote-send").one("click", function () {
        var b = $(this),
            a = b.closest(".post"),
            c = a.find("a[href^='/report']").attr("href"),
            d = b.parent().children(".vote-mess").val(),
            f = b.parent().children(".vote-note");
        f.text("\u0110ang x\u1eed l\u00fd...");
        if ("vote-plus-post vote-cmt" == b.parent().attr("class")) {
            var e = "http://" + location.host + location.pathname + "#" + c.replace(/.*p=(\d+).*/, "$1"),
                c = a.find(".user.leftname strong").text(),
                a = a.find(".user.leftname a").attr("href").replace(/.*\/u(\d+).*/, "$1"),
                e = "M\u00ecnh th\u00edch b\u00e0i vi\u1ebft c\u1ee7a b\u1ea1n t\u1ea1i [url=" +
                    e + "]" + document.title + "[/url]";
            d.replace(/\s/g, "").length && (e = e + "[quote]" + d + "[/quote]");
            $.post("/privmsg", {
                subject: "B\u00e0i vi\u1ebft hay",
                message: e,
                username: c,
                u: a,
                mode: "post_profile",
                folder: "profile",
                post: "Send"
            }, function () {
                f.text("Tin nh\u1eafn \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1eedi");
                b.closest(".vote-cmt").delay(300).fadeOut()
            })
        } else 3 >= d.replace(/\s/g, "").length && (d = "B\u00e0i vi\u1ebft vi ph\u1ea1m n\u1ed9i quy di\u1ec5n \u0111\u00e0n."), $.post(c, {
            message: d,
            post: "Save"
        }, function () {
            f.text("B\u00e1o c\u00e1o \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1eedi");
            b.closest(".vote-cmt").delay(300).fadeOut()
        })
    });
    $(".vote-Zzbaivong > a[href='']").attr("href", "javascript:;");
    //]]>
</script>
Zzbaivong
Bui Minh Phong™
Bui Minh Phong™
Quản Trị Cấp Cao
Quản Trị Cấp Cao

Posts : 3260
Points : 371212
Thanked : 1927
Birthday : 1994-12-18
Status Hãy Lặng Yên Để Cảm Nhận Tình Yêu Xung Quanh Bạn :x
Giới tính : Male Rất dễ thương

Back to top Go down

fb_Vote đánh giá bài viết và thông báo lên tường Empty Re: fb_Vote đánh giá bài viết và thông báo lên tường

Post by vippro 7/1/2014, 10:48 am

forum tôi ko có  Report Post Hack - Configuration
vippro
vippro
Thành Viên Đồng
Thành Viên Đồng

Posts : 270
Points : 189302
Thanked : 8
Birthday : 1995-01-10
Status ffg
Giới tính : Male

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum