IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Thu 16 May 2019, 10:28

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 4 users online :: 0 Registered, 0 Hidden and 4 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Quick Reply without refreshing is not working on Forumactif Edge

View previous topic View next topic Go down

bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Mon 19 Sep 2016, 20:38

Good evening I have a problem in quick Reply code

I made sure it works on original phpbb3 version but it does not work in Forumactif Edge

Code:
// phpBB3 version;
        //By doannamthai-getover || forumotion-forumvi ;
        $(function () {
        $('#quick_reply input[name="post"]').click(function(a){
        a.preventDefault();
        var g = $("#text_editor_textarea").sceditor('instance').val();
        var href = $('a[href*="mode=reply"]').attr("href");
        var value = $("#text_editor_textarea").sceditor("instance").val().replace(/\s/g, '').length;
        if(10 <= value){
        $('<span class="lreply" style="color: red;font-weight: bold; text-transform: uppercase;"><br>Your message is being posted...</span>').appendTo("#quick_reply div:last");
        $.post(href, {
                    "message" : g,
                    "auth[]": $("#quick_reply input[name='auth[]']:last").val(),
                    "lt" : $("#quick_reply input[name='lt']").val(),
                    "tid" : $("#quick_reply input[name='tid']").val(),
                    "attach_sig" : "1" ,
                    "post": "Send"
        }, function(t) {
        if(t.indexOf("Flood") != -1){
        alert("Error!\nYou must wait 5 second before replying");
        $(".lreply").fadeOut(300);
        }
        if(t.indexOf("A new") != -1){
        alert("Error!\nSomeone had replied before you posted\nYou must refresh the page to continue.\nNotice : You should save or copy your message if you don't want it gone");
        $(".lreply").fadeOut(300);
        }
        if($(t).find('.panel a[href*="/viewtopic"]:first').attr('href').length >1) {
        var f = $(t).find('.panel a[href*="/viewtopic"]:first').attr('href');
        var postid = f.split('#')[1];
        $.get(f , function(z){
        $("#quick_reply input[name='auth[]']:last").val($(z).find("#quick_reply input[name='auth[]']:last").val());
        $("#quick_reply input[name='lt']").val($(z).find("#quick_reply input[name='lt']").val());
        $(z).find("#p"+postid).hide().insertAfter(".post:last").slideDown(400);
        location.href = f;
        });
        $("#text_editor_textarea").sceditor('instance').val("");
        $(".lreply").fadeOut(300);
        }
        });
        }
        else {
        alert("Sorry\nThe content is too short to send!\nYou must write at least 10 characters.");
        }
        });
        });

I tried hard to fix the problem but it did not work with me.

Rose Rose Rose
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 20 Sep 2016, 11:39

Hello @bodahassan,

Try using the updated script below.
Code:
// phpBB3 version;
//By doannamthai-getover || forumotion-forumvi ;
$(function () {
$('#quick_reply input[name="post"]').click(function(a){
a.preventDefault();
var g = $("#text_editor_textarea").sceditor('instance').val();
var href = $('a[href*="mode=reply"]').attr("href");
var value = $("#text_editor_textarea").sceditor("instance").val().replace(/\s/g, '').length;
if(10 <= value){
$('<span class="lreply" style="color: red;font-weight: bold; text-transform: uppercase;"><br>Your message is being posted...</span>').appendTo("#quick_reply div:last");
$.post(href, {
            "message" : g,
            "auth[]": $("#quick_reply input[name='auth[]']:last").val(),
            "lt" : $("#quick_reply input[name='lt']").val(),
            "tid" : $("#quick_reply input[name='tid']").val(),
            "attach_sig" : "1" ,
            "post": "Send"
}, function(t) {
if(t.indexOf("Flood") != -1){
alert("Error!\nYou must wait 5 second before replying");
$(".lreply").fadeOut(300);
}
if(t.indexOf("A new") != -1){
alert("Error!\nSomeone had replied before you posted\nYou must refresh the page to continue.\nNotice : You should save or copy your message if you don't want it gone");
$(".lreply").fadeOut(300);
}
if($(t).find('.content-block a[href*="/viewtopic"]:first').attr('href').length >1) {
var f = $(t).find('.content-block a[href*="/viewtopic"]:first').attr('href');
var postid = f.split('#')[1];
$.get(f , function(z){
$("#quick_reply input[name='auth[]']:last").val($(z).find("#quick_reply input[name='auth[]']:last").val());
$("#quick_reply input[name='lt']").val($(z).find("#quick_reply input[name='lt']").val());
$(z).find("#p"+postid).hide().insertAfter(".post:last").slideDown(400);
location.href = f;
});
$("#text_editor_textarea").sceditor('instance').val("");
$(".lreply").fadeOut(300);
}
});
}
else {
alert("Sorry\nThe content is too short to send!\nYou must write at least 10 characters.");
}
});
});

I only replaced the class
Code:
.panel
with the equivalent class in Forumactif Edge ;
Code:
.content-block
. Let me know if it works for you. Salute

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Tue 20 Sep 2016, 12:46

Thank you @Ange Tuteur

Yes I have tried previously to change this class
But the code also not working with me

For you
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 20 Sep 2016, 13:19

You're welcome, everything is working okay with it now ? ^^

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Tue 20 Sep 2016, 13:35

No, unfortunately still not working
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 21 Sep 2016, 12:09

Hmm.. see if this works :
Code:
// phpBB3 version;
//By doannamthai-getover || forumotion-forumvi ;
$(function () {
$('#quick_reply input[name="post"]').click(function(a){
a.preventDefault();
var g = $("#text_editor_textarea").sceditor('instance').val();
var href = $('a[href*="mode=reply"]').attr("href");
var value = $("#text_editor_textarea").sceditor("instance").val().replace(/\s/g, '').length;
if(10 <= value){
$('<span class="lreply" style="color: red;font-weight: bold; text-transform: uppercase;"><br>Your message is being posted...</span>').appendTo("#quick_reply div:last");
$.post(href, {
            "message" : g,
            "auth[]": $("#quick_reply input[name='auth[]']:last").val(),
            "lt" : $("#quick_reply input[name='lt']").val(),
            "tid" : $("#quick_reply input[name='tid']").val(),
            "attach_sig" : "1" ,
            "post": "Send"
}, function(t) {
if(t.indexOf("Flood") != -1){
alert("Error!\nYou must wait 5 second before replying");
$(".lreply").fadeOut(300);
}
if(t.indexOf("A new") != -1){
alert("Error!\nSomeone had replied before you posted\nYou must refresh the page to continue.\nNotice : You should save or copy your message if you don't want it gone");
$(".lreply").fadeOut(300);
}
if($(t).find('.content-block a[href*="/viewtopic"]:first').attr('href').length >1) {
var f = $(t).find('.content-block a[href*="/viewtopic"]:first').attr('href');
var postid = f.split('#')[1];
$.get(f , function(z){
$("#quick_reply input[name='auth[]']:last").val($(z).find("#quick_reply input[name='auth[]']:last").val());
$("#quick_reply input[name='lt']").val($(z).find("#quick_reply input[name='lt']").val());
$(z).find("#p"+postid).hide().insertAfter(".post:last").slideDown(400);
location.hash = "#p"+postid;
});
$("#text_editor_textarea").sceditor('instance').val("");
$(".lreply").fadeOut(300);
}
});
}
else {
alert("Sorry\nThe content is too short to send!\nYou must write at least 10 characters.");
}
});
});

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Wed 21 Sep 2016, 12:51

sorry but still not working
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 21 Sep 2016, 13:02

It worked for me.. Shocked

What's the URL of your forum ?

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Wed 21 Sep 2016, 13:09

@Ange Tuteur Weird !!
I've sent you earlier account test

http://sd.koutstore.com
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 21 Sep 2016, 13:43

Ah thanks, I almost forgot about that. When I test it there was an error, try this script to see if it resolves the error :
Code:
// phpBB3 version;
//By doannamthai-getover || forumotion-forumvi ;
$(function () {
$('#quick_reply input[name="post"]').click(function(a){
a.preventDefault();
var g = $("#text_editor_textarea").sceditor('instance').val();
var href = $('a[href*="mode=reply"]').attr("href");
var value = $("#text_editor_textarea").sceditor("instance").val().replace(/\s/g, '').length;
if(10 <= value){
$('<span class="lreply" style="color: red;font-weight: bold; text-transform: uppercase;"><br>Your message is being posted...</span>').appendTo("#quick_reply div:last");
$.post(href, {
            "message" : g,
            "auth[]": $("#quick_reply input[name='auth[]']:last").val(),
            "lt" : $("#quick_reply input[name='lt']").val(),
            "tid" : $("#quick_reply input[name='tid']").val(),
            "attach_sig" : "1" ,
            "post": "Send"
}, function(t) {
if(t.indexOf("Flood") != -1){
alert("Error!\nYou must wait 5 second before replying");
$(".lreply").fadeOut(300);
}
if(t.indexOf("A new") != -1){
alert("Error!\nSomeone had replied before you posted\nYou must refresh the page to continue.\nNotice : You should save or copy your message if you don't want it gone");
$(".lreply").fadeOut(300);
}
if($('.content-block a[href^="/viewtopic?t="]:first', t).length) {
var f = $('.content-block a[href^="/viewtopic?t="]:first', t).attr('href');
var postid = f.split('#')[1];
$.get(f , function(z){
$("#quick_reply input[name='auth[]']:last").val($(z).find("#quick_reply input[name='auth[]']:last").val());
$("#quick_reply input[name='lt']").val($(z).find("#quick_reply input[name='lt']").val());
$(z).find("#p"+postid).hide().insertAfter(".post:last").slideDown(400);
location.hash = "#"+postid;
});
$("#text_editor_textarea").sceditor('instance').val("");
$(".lreply").fadeOut(300);
}
});
}
else {
alert("Sorry\nThe content is too short to send!\nYou must write at least 10 characters.");
}
});
});

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Wed 21 Sep 2016, 14:12

thank u @Ange Tuteur I'm afraid to tell you that the code still does not work Whisper

I deleted cookies
i have disabled all other JavaScript codes and still don't know the cause of the problem

The code works but does not post a reply and also shows no replay after i click send


Quick Reply without refreshing is not working on Forumactif Edge Captur10


Sorry if i waste your time.

Rose
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 22 Sep 2016, 10:16

@bodahassan no problem, I think I've found the cause. Go to admin panel > general > security and set the following option to "no" :
- Unauthorize unofficial forms to post messages and private messages on the forum

Let me know if that fixes the problem. Salute

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Thu 22 Sep 2016, 11:15

@Ange Tuteur Yes I made sure that this option is no
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 22 Sep 2016, 11:31

Any changes, or is it still not working ?

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Thu 22 Sep 2016, 11:42

not working
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 22 Sep 2016, 11:57

Alright, could you try removing the script on your forum ? I'm going to log into the test account you gave me and debug it via console. Wink

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Thu 22 Sep 2016, 12:02

Well I've deleted the script
Rose
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 22 Sep 2016, 12:11

Thanks Rose

Give this a try and let me know if it works :
Code:
// phpBB3 version;
//By doannamthai-getover || forumotion-forumvi ;
$(function () {
$('#quick_reply input[name="post"]').click(function(a){
a.preventDefault();
var g = $("#text_editor_textarea").sceditor('instance').val();
var href = $('a[href*="mode=reply"]').attr("href");
var value = $("#text_editor_textarea").sceditor("instance").val().replace(/\s/g, '').length;
if(10 <= value){
$('<span class="lreply" style="color: red;font-weight: bold; text-transform: uppercase;"><br>Your message is being posted...</span>').appendTo("#quick_reply div:last");
$("#text_editor_textarea").val($("#text_editor_textarea").sceditor('instance').val());
$.post('/post', $('#quick_reply').serialize() + '&post=Send', function(t) {

if(t.indexOf("Flood") != -1){
alert("Error!\nYou must wait 5 second before replying");
$(".lreply").fadeOut(300);
}
if(t.indexOf("A new") != -1){
alert("Error!\nSomeone had replied before you posted\nYou must refresh the page to continue.\nNotice : You should save or copy your message if you don't want it gone");
$(".lreply").fadeOut(300);
}
if($(t).find('.content-block a[href*="/viewtopic"]:first').attr('href').length >1) {
var f = $(t).find('.content-block a[href*="/viewtopic"]:first').attr('href');
var postid = f.split('#')[1];
$.get(f , function(z){
$("#quick_reply input[name='auth[]']:last").val($(z).find("#quick_reply input[name='auth[]']:last").val());
$("#quick_reply input[name='lt']").val($(z).find("#quick_reply input[name='lt']").val());
$(z).find("#p"+postid).hide().insertAfter(".post:last").slideDown(400);
location.href = f;
});
$("#text_editor_textarea").sceditor('instance').val("");
$(".lreply").fadeOut(300);
}
});
}
else {
alert("Sorry\nThe content is too short to send!\nYou must write at least 10 characters.");
}
});
});

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
bodahassan
bodahassan

Gender : Male
Posts : 28
Points : 1095
Reputation : 0
Location : Egypt
Language : arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
View user profile

Postbodahassan on Thu 22 Sep 2016, 12:39

Yes thank you very much @Ange Tuteur script works now Quick Reply without refreshing is not working on Forumactif Edge 1f604

Thank you again and I apologize for any inconvenience I may have caused you.

For you
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Age : 23
Posts : 4738
Points : 10226
Reputation : 2372
Location : Macungie, PA
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 22 Sep 2016, 12:48

You're welcome, it was no problem ! ^^

Have a good day. Smile

--------

Ange Tuteur
Tips and TricksContact Me
Quick Reply without refreshing is not working on Forumactif Edge Latin11
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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