• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

vB Comment v2.1

Admin

Well-Known Member
Staff member
Administrator
Name: vB Comment
Version: 2.1
Feature: add & display comments for each post
How to install:
- Download & unzip file
- Upload
'clientscript', 'images' folder and the file 'comment.php' to your host
- Import product file.
v1.1 Info:
- Added: Send pm when a new comment posted
- Added:
Comment to comment.
v1.2 Info:
- Fixed: error link in pm
- Added: 2 new settings (order comments & allow smilies)
- Template changed: dt_vb_comment_js
- Plugins changed: init_startup, postbit_display_complete
- Files changed: comment.php, vb_comment.js
v2.0 Info:
- Fixed: tối ưu hóa query để tăng tốc độ load và giảm bộ nhớ (thanks to revskill in this topic), xóa chức năng comment to comment, chỉnh sửa giao diện giống Facebook, thêm notify tới
những người comment trong cùng 1 post, thay js cũ = jquery, sửa đổi 1 vài chỗ, tối ưu lại code
v2.1 Info:
- Fixed:
Không hiển thị nút xóa đối với các nhóm được thiết lập
Không hiển thị smilies
Tối ưu code
- Added:
Các phrase báo lỗi, tiêu đề, tin nhắn
notify
Giới hạn smilies trong comment
Flood check
- Changed Files: comment.php vbcomment/hooks/init_startup.phpvbcomment/hooks/postbit_display_complete.php
vbcomment/clientscript/vb_comment.js
- Added Files:
vbcomment/hooks/bbcode_parse_
start.php
Vbb < 4.1.8 thì tạo file vb_comment.js post code sau vào
$.fn.commentInputReset=function(){$(this).attr({value:'',placeHolder:'Write a comment...',rows:1}).css('height','22px');};if(typeof AJAXBASEURL=='undefined'){var AJAXBASEURL=BBURL+'/';};$(document).ready(function(){$('.commentInput').commentInputReset();$('.inputComment').parent().css('opacity',0.5);$('.commentInput').bind('keypress keyup',function(e){var parent=this;if(e.keyCode==27){$(this).commentInputReset();$(this).blur();return false;};if(e.keyCode==13){var val=$(this).val();var pid=parseInt($(this).parent().find('input[name="pc"]').val());if(val.length<1||val.replace(/s+/g,'').length<1){$(this).commentInputReset();return false;};$.ajax({url:AJAXBASEURL+'comment.php',type:'POST',data:'ajax=1&do=comment&p='+pid+'&comment='+encodeURIComponent(val)+'&securitytoken='+SECURITYTOKEN,dataType:'xml',success:function(xml){var error=$(xml).find('error').text();if(error.length>0){alert(error);}else{$(parent).parent().parent().before($(xml).find('info').text());}}});$(this).commentInputReset();return false;};$(this).css('height','auto');$(this).height((this.scrollHeight+1));});$('.commentInput').bind('focus',function(e){$(this).parent().parent().css('opacity',0.9);}).bind('blur',function(e){$(this).parent().parent().css('opacity',0.5);});$('.infoComment').bind('mouseover',function(){$(this).parent().find('.cmdel').css('opacity',0.5);}).bind('mouseout',function(){$(this).parent().find('.cmdel').css('opacity',0);});$('.cmdel').bind('mouseover',function(){$(this).css('opacity',1);}).bind('mouseout',function(){$(this).css('opacity',0);});$('.viewallcm').bind('click',function(){var pid=parseInt($(this).attr('id').split('_')[1]);$.ajax({url:AJAXBASEURL+'comment.php',type:'POST',data:'ajax=1&do=listcm&p='+pid+'&securitytoken='+SECURITYTOKEN,dataType:'xml',beforeSend:function(){$('#vbcmloading'+pid).show();},success:function(xml){var error=$(xml).find('error').text();if(error.length>0){$('#vbcmloading'+pid).hide();alert(error);}else{$('#viewallvbcm'+pid).hide();var inputComment=$('#vb_list_comment_'+pid).find('.comment_row:last');inputComment.siblings().remove();inputComment.before($(xml).find("info").text());$('#vb_list_comment_'+pid).hide().fadeIn(500);}}});return false;});});
Tải xuống tuoitreit.vn_vB_Comment_v2.1.zip (14.2kb)
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top