Code's Name: K-QuickEditWrite by: Kirigaya Kazuto
All ver
Demo: [Only admins are allowed to see this image]
Ưu điểm: Edit topic nhanh
Nhược điểm: Không hỗ trợ BBCode
B1: APC >> Modules >> HTML & JAVASCRIPT >> Javascript codes management:
Tạo 1 JS mới:
Title: K-QuickEdit
Placement: In the topics
Javascript Code:
- Code:
$(function(){
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#kk-contentedit').length){
$('#kk-contentedit').fadeOut().remove();
}
else{
$('#kk-contentedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="kk-contentedit">
<p><div id="kk-normantedit">FullEditor</div></p>
<p><div id="kk-rapidedit">QuickEdit</div></p>
</div>
');
$('#kk-rapidedit').bind('click', function(){
if($(this).parents('.post').find('#kk-quickedit').length){
$('#kk-quickedit').remove()}else{$('#kk-quickedit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 1.79%;" id="kk-quickedit"><img src="http://i57.servimg.com/u/f57/16/18/15/10/loadin10.gif"></div>');
$('#kk-quickedit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var wtf1 = $('.frm-form .frm-input', locg).html();
var wtf2 = $('.frm-form .frm-textarea', locg).html();
var wtf3 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + wtf1 + wtf2 + wtf3 + '</form>';
$('#kk-quickedit').html(htmlfinal);});
jQuery('html,body').animate({scrollTop: jQuery('#kk-quickedit').offset().top}, 1000);
$('#kk-contentedit').remove();}});
$('#kk-normantedit').bind('click', function(){window.open(mylinkpathname, '_self')});
$('#kk-contentedit').hide().fadeIn();}
return false;});});
B2: APC >> Display >> Pictures and Colors >> Colors >> CSS Stylesheet
- Code:
/*K-QuickEdit*/
#kk-quickedit [name="subject"], #kk-quickedit [name="topic_color"]{display:none}
#kk-quickedit textarea{width:100%!important;height:250px!important;}
#kk-quickedit input:hover{background:rgba(200,200,200,0.2)}
#kk-quickedit input{margin:1% 0;padding:5px 15px;border:1px solid black;cursor:pointer;background:#ff;}
#kk-contentedit{box-shadow:0 0 10px #333;border:1px solid #333;margin-left:7%;padding:3px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 981px;margin-top: -0px;}
#kk-normantedit{font-weight:bold;color:#228D00;border-bottom:1px solid #00492D;margin-bottom:1%;padding:5px 15px;background:#fff;cursor:pointer;}
#kk-rapidedit{font-weight:bold;color:#228D00;padding:5px 15px;background:#fff;cursor:pointer;}
Còn chờ gì nữa? Like đê!
Nguồn: [Only admins are allowed to see this link]