The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Daemon's reply code edit

View previous topic View next topic Go down

Solved Daemon's reply code edit

Post by Tonight on 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
Forumember

Male Posts : 240
Reputation : 63
Language : Estonian, English, Russian
Location : Estonia

Back to top Go down

Solved Re: Daemon's reply code edit

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


Tonight
Forumember

Male Posts : 240
Reputation : 63
Language : Estonian, English, Russian
Location : Estonia

Back to top Go down

Solved Re: Daemon's reply code edit

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Daemon's reply code edit

Post by APE on 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





APE
Manager
Manager

Male Posts : 8339
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

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

Back to top Go down

View previous topic View next topic Back to top


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