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.

Daemon's reply code edit

3 posters

Go down

Solved Daemon's reply code edit

Post by Tonight August 6th 2015, 3:25 am

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, 5:32 pm; edited 1 time in total
Tonight
Tonight
Forumember

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

Back to top Go down

Solved Re: Daemon's reply code edit

Post by Tonight August 8th 2015, 12:19 am

Tonight
Tonight
Forumember

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

Back to top Go down

Solved Re: Daemon's reply code edit

Post by Ange Tuteur August 8th 2015, 1:51 pm

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 ?
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Daemon's reply code edit

Post by Ape August 12th 2015, 1:55 pm

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
Ape
Ape
Administrator
Administrator

Male Posts : 19109
Reputation : 1991
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum