Daemon's reply code edit Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Daemon's reply code edit

    Tonight
    Tonight
    Forumember


    Male Posts : 312
    Reputation : 80
    Language : Estonian, English, Russian
    Location : Estonia

    Solved Daemon's reply code edit

    Post by Tonight August 5th 2015, 9:25 pm

    Hello, I have a question about this @Daemon script:
    Code:
        jQuery(window).load(function() {
            var daemon = $('a[href^="/post?t="]').first().attr('href');
            $('#quick_reply input[name="post"]').on('click', function(post) {
                post.preventDefault();
                var valor = $('#text_editor_textarea').sceditor('instance').val().replace(/\s/g, '').length;
                if (valor == 0) {
                    alert("Seu post está vazio")
                } else if (20 > valor) {
                    alert("Você precisa digitar pelo menos mais " + (20 - valor) + " caracteres, por favor, não faça flood")
                } else if (15000 < valor) {
                    alert("Seu post passou de 15000 caracteres, diminua-o")
                } else if (20 <= valor && valor <= 15000) {
                    $(this).before('<span id="qr_posting_msg">' + '  <img src="http://i.imgur.com/hujM7Fc.gif" alt="Enviando Resposta Rápida - Aguarde" title="Enviando Resposta Rápida - Aguarde">' + '  <strong>Enviando Resposta Rápida - Aguarde</strong>' + '</span>');
                    $.post(daemon, {'message': $('#text_editor_textarea').sceditor('instance').val(),'post': 'Enviar','attach_sig': '1'}, function(e) {
                        var href = $(e).find('p.message a:first').attr('href');
                        $.get(href, function(daemon) {
                            $(daemon).find('.post:last').hide().insertAfter('.post:last').slideDown('fast', function() {
                                $('html, body').animate({scrollTop: $('.post:last').offset().top}, 500)
                            })
                        });
                        $('#text_editor_textarea').sceditor('instance').val('');
                        $('#qr_posting_msg').remove()
                    })
                }
            })
        });
    How should I change it so that it would work in phpBB3 forum?


    Last edited by Tonight on August 8th 2015, 11:32 am; edited 1 time in total
    Tonight
    Tonight
    Forumember


    Male Posts : 312
    Reputation : 80
    Language : Estonian, English, Russian
    Location : Estonia

    Solved Re: Daemon's reply code edit

    Post by Tonight August 7th 2015, 6:19 pm

    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Daemon's reply code edit

    Post by Ange Tuteur August 8th 2015, 7:51 am

    I don't notice anything that's version specific, aside from quick_reply. However, I do notice that it does not contain the necessary auth[] data for submitting a message. Have you disabled "disallow unofficial forms to post on the forum" via General > Security ?
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Daemon's reply code edit

    Post by Ape August 12th 2015, 7:55 am

    As this is marked at solved i will remove the post if you want it reopen please pm me with the url of this post



    Daemon's reply code edit Left1212Daemon's reply code edit Center11Daemon's reply code edit Right112
    Daemon's reply code edit Ape_b110
    Daemon's reply code edit Ape1010