[Share] Nút Like Cho Mọi Version
Trang 1 trong tổng số 1 trang • Share
[Share] Nút Like Cho Mọi Version
Demo:
Khi chưa Like[You must be registered and logged in to see this image.]
Đã Like
[You must be registered and logged in to see this image.]
HD:
Vào ACP >> Modules >> Javascript codes management >> Create a new javascript
-Title: Tự các bạn đặt tên nhé-Placement: tick vào ô In the topics
-Javascript Code: Quăng đoạn code này vào
var avacweb_like_system = {
dom_ready : false,
vote_singular : 'Like',
vote_plural : 'Likes',
callback : function(vote, new_button) {
$('.corners-bottom', vote.parentNode.parentNode).before(new_button);
}
};
$(function() { avacweb_like_system.dom_ready = true; });
$.getScript('http://www.avacweb.net/likesystem');
Chú ý: tùy từng phiên bản mà các bạn thay đổi ở dòng này:
$('.corners-bottom', vote.parentNode.parentNode).before(new_button);
- Với Invision thì sửa thành:
- Code:
$(vote.parentNode.parentNode.parentNode.nextSibling.lastChild).prepend('<li>' + new_button+ '</li>');
- Với PunBB thì sửa thành:
- Code:
$('.postfoot', vote.parentNode.parentNode.parentNode.parentNode).before( new_button );
- Code:
$('span.gensmall', vote.parentNode).before(new_button);
Các bạn cũng có thể sửa "Like" thành "Thanks" or "Vote" gì đó tùy các bạn thích
Bước cuối cùng là vào ACP > Display > Colors > CSS Stylesheet
Quăng đoạn này 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;
}
Xong rồi đó chúc các bạn thành công!!
Code written by LGforum
HelpsFMvi- Ban Quản Trị FMvi
- Số bài : 104
HelpsPoints : 15318
Likes : 33
Ngày tham gia : 10/03/2016
Trạng thái :Online Offline
Tuổi : 26
Location : Ninh Thuận
[Click để xem tài sản HelpsFMvi]
Similar topics
» [Thông báo và Cập nhật] Social sharing on the mobile version
» [FAQ] Share và Action trong mỗi topic để làm gì ?
» [Thông báo và Cập nhật] Social sharing on the mobile version - Chia sẽ mạng xã hội cho phiên bản di động
» [FAQ] Share và Action trong mỗi topic để làm gì ?
» [Thông báo và Cập nhật] Social sharing on the mobile version - Chia sẽ mạng xã hội cho phiên bản di động
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|