[Thùng rác] KQuickEdit

  Bài viết hay nhất1
Code's Name: K-QuickEdit
Write 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]
  Bài viết hay nhất2
Méo sẽ lấy cái này đi chế lại :3
Trước khi có bài này méo đã từng có rip của vif và thất bại :v
  Bài viết hay nhất3
Đây là bản không chuyển trang , cái code dưới mình viết từ lâu rồi nhưng vì đa số chỉ áp dụng được lên Punbb mặc định nên để trong kho :v
Code:
$(function () {
    $('a[href*="mode=editpost"]').click(function () {
        var t = $(this).attr('href');
        var g = $(this);
        if ($(this).parents('.post').find().length) {
            $('#quickedit').remove()
        } else {
            $('#quickedit').remove();
            $(this).parents('.post').find('.post-entry').after('<div  style="padding-left: 3.5%;" id="quickedit"><img src="http://i43.servimg.com/u/f43/16/03/04/56/black-10.gif"></div>');
            $.get(t, function (a) {
                var text1 = $(a).find('.frm-form .frm-input').html();
                var text2 = $(a).find('form .frm-textarea').html();
                var text3 = $(a).find('form .frm-buttons').html();
                var edit = '<form action="/post"  onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" enctype="multipart/form-data">' + text1 + text2 + text3 + '</form>';
                $('#quickedit').html(edit);
                $('#quickedit input:last').click(function (a) {
                    $("#quickedit").before('<div style="padding-left: 3.5%;" class="ajaxload"><img src="http://i43.servimg.com/u/f43/16/03/04/56/black-10.gif"/></div>');
                    a.preventDefault();
                    var msg = $('#quickedit #text_editor_textarea').val();
                    $.post(t, {
                        subject: $(g).parents(".post").find(".posthead a").text(),
                        message: msg,
                        post: "Send"
                    }, function (data) {
                        if ($(data).find('a[href*="/t"]:first').length) {
                            var f = $(data).find('a[href*="/t"]:first').attr('href');
                            $.get(f, function (v) {
                                $(v).find('.post a[href*="/t"]').each(function () {
                                    var z = $(this).attr("href");
                                    if (f == z) {
                                        $(g).parents(".post").find(".post-entry").html($(this).parents(".post").find(".post-entry"));
                                        $(".ajaxload").remove();
                                    }
                                });
                            });
                        } else {
                            alert("Đã gặp lỗi trong việc gửi bài . Vui lòng thử lại sau");
                            $(".ajaxload").remove();
                        }
                    });
                });
            });
        }
        return false;
    });
});
  Bài viết hay nhất4
Không chuyển trang ' '~ Hỗ trợ BBcode luôn á hã huynh?!
  Bài viết hay nhất5
Không có hỗ trợ đâu . Nếu muốn hỗ trợ thì thêm mấy cái bbcode vào thôi giống editor đó
  Bài viết hay nhất6
Cái của Get_Over send không được X_X
  Bài viết hay nhất7
[Only admins are allowed to see this link]
SRom wrote:Cái của Get_Over send không được X_X
ACP --> QLTT --> Forum --> Security
Unauthorize unofficial forms to post messages and private messages on the forum : Không

Bước này chưa anh
  Bài viết hay nhất8
[Only admins are allowed to see this link]
Get_Over wrote:[Only admins are allowed to see this link]
SRom wrote:Cái của Get_Over send không được X_X
ACP --> QLTT --> Forum --> Security
Unauthorize unofficial forms to post messages and private messages on the forum : Không

Bước này chưa anh

OKay! Thanks em :D
  Bài viết hay nhất9
You cannot reply to topics in this forum