First topic message reminder :
Bài viết này được viết theo yêu cầu: [You must be registered and logged in to see this link.]
Thực hiện như sau:
ACP -> Modules -> HTML & JAVASCRIPT -> Javascript codes management -> Change a Javascript Code -> Create a new javascript
Nội dung:
Title: Js for the slimbox
Placement: In all the page
Javascript Code:
Bài viết này được viết theo yêu cầu: [You must be registered and logged in to see this link.]
Thực hiện như sau:
ACP -> Modules -> HTML & JAVASCRIPT -> Javascript codes management -> Change a Javascript Code -> Create a new javascript
Nội dung:
Title: Js for the slimbox
Placement: In all the page
Javascript Code:
- Code:
//Được viết bởi MxTruong
//Vui lòng không xóa sửa nội dung trong code
jQuery(function () {
jQuery(".vote-button a").click(function (v) {
v.preventDefault();
a = jQuery(this).attr("href").split("eval=")[1].slice(0, 4);
b = _userdata["username"];
c = jQuery(this).parents(".post").find(".username a").html();
d = jQuery(this).attr("href");
a == "plus" ? a = "[b]Cộng[/b]" : a = "[b]Trừ[/b]";
jQuery.post("/privmsg", {
"mode": "post",
"subject": "[Hệ Thống]" + b + " đã vote cho bạn!",
"message": b + " đã vote " + a + " tại topic " + location.href,
"username[]": c,
"folder": "inbox",
"post": "Send"
}).done(function(){location.href=d;});
})
})
- Code:
_userdata["username"]
- Code:
jQuery('#logout').text().split(' ')[2]
- Code:
jQuery(this).parents(".post").find(".username a").html()
- Code:
jQuery(this).parents(".post").find('.author a').text()
Nếu muốn Viết lên Wall thay vì gửi tin nhắn thì thay:
- Code:
jQuery.post("/privmsg", {
"mode": "post",
"subject": "[Hệ Thống]" + b + " đã vote cho bạn!",
"message": b + " đã vote " + a + " tại topic " + location.href,
"username[]": c,
"folder": "inbox",
"post": "Send"
}).done(function(){location.href=d;});
- Code:
jQuery.post("/privmsg", {
post_icon: 3,
subject: "[Hệ Thống]" + b + " đã vote cho bạn!",
message: b + " đã vote " + a + " tại topic " + location.href,
username: c,
mode: "post_profile",
folder: "profile",
"post": "Send"
}).done(function(){location.href=d;});
- Xem Bài viết trước của tôi:
Bài Trước đó của tôi:
1.Xem bài viết từ các chuyên mục với jQueryPlugin: [You must be registered and logged in to see this link.]
2.Xem ảnh bằng slimbox: [You must be registered and logged in to see this link.]
- Một phần nội dung bài viết đã bị ẩn, hãy thực hiện các bước trên, sử dụng thử mod và sau đó cho tôi ý kiến để được đọc tiếp nội dung bị ẩn.
Viết bởi MxTruong ngày 19-5-2013
Được sửa bởi ܓܨܓMxTrường ngày Mon May 20, 2013 8:09 pm; sửa lần 6. (Reason for editing : Sửa lỗi lần 1)