Thêm nút Like, Google+1 và Share vào bài viết diễn đàn

Thêm nút Like, Google+1 và Share vào bài viết diễn đàn. Công việc này có thể giúp các thành viên trong diễn đàn của bạn tương tác với các mạng xã hội tốt hơn.

Đầu tiên các bạn phải lấy nút like, google+1 và share đã chứ nhỉ.

Đây là code nút like, google+1 và share mặc định

<!-- Place this tag where you want the +1 button to render. -->
 <div class="g-plusone" data-annotation="inline" data-width="300"></div>
<!-- Place this tag after the last +1 button tag. -->
 <script type="text/javascript">
 window.___gcfg = {lang: 'vi'};
(function() {
 var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
 po.src = 'https://apis.google.com/js/plusone.js';
 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
 })();
 </script>
<div id="fb-root"></div>
 <script>(function(d, s, id) {
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return;
 js = d.createElement(s); js.id = id;
 js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1&appId=546658882011343";
 fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'facebook-jssdk'));</script>
 <div class="fb-like" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>

Nếu muốn tự tay cấu hình các nút này. Bạn có thể thao khảo ở đây:

Sau đó các bạn đăng nhập vào AdminCP -> Styles & Templates -> Styles manager -> Chọn style bạn đang dùng. Tiếp tục click vào Style Variable Editor chọn Edit Templates. Hiện ra cửa sổ mới bạn tìm postbit templates, click vào và tiếp tục chọn postbit_legacy.

them-nut-like-google-1-share-vao-dien-dan-vbb

Tìm đoạn code sau:

{vb:raw ad_location.thread_first_post_content}

Và thêm code nút like, google+1 và share bạn lấy ở trên vào bên dưới nó.

 Bạn quay lại diễn đàn vào bài viết bất kỳ để kiểm tra xem đã xuất hiện nút like facebook, google+1 và share chưa. Nếu chưa các bạn tiếp tục làm theo bước sau:

Chọn phần postbit trong postbit templates vừa tìm được ở trên.Tìm đoạn code sau:

{vb:raw ad_location.thread_first_post_content}

 Và thêm code nút like, google+1 và share bạn lấy ở trên vào bên dưới nó.

Chúc các bạn thành công!

About Le

Chỉ hướng dẫn những thủ thuật mình tự làm được...
Đăng ký
Nhận thông báo khi
guest
0 Comments