Warning: The author of this contribution does not provide support for it anymore.

phpBB mChat

Double Posting - HELP!!! - phpBB mChat

Double Posting - HELP!!!

by eaglesfannation » Tue May 10, 2011 10:22 pm

Something needs to be done with this double posting, I have looked everywhere and see no fix solution. This is a great chat but will never be what it could be with a huge bug out there like this. I was using handymans ajax chat (which is all code based) and really want to go to this (something that is configurable from ACP) but I cant have double posts happening to my members...

Also is there a way to allow another row (beside the chat rows) to display members just like handymans chat setup rather then having a slider down below. Just not a good layout is all...
eaglesfannation
Registered User
Posts: 105
Joined: Sat May 08, 2010 10:29 pm
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Wed May 11, 2011 12:59 am

I have never experienced the double posting and if you don't like the mod, then don't use the mod. It's that simple.

And BTW, if you can code a better mod, please do and share it with the rest of the community but I find comments such as this

Just not a good layout is all...


a bit belligerent and thankless.

PS the usual reason for double postings is an inadequate server as has been proven by users of the mod on forums that have had at least 30-35 users in the chat at once.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by Siropu » Sun Aug 07, 2011 12:02 am

I've noticed that if you press enter 2 or 3 times for the same message, it get posted that many times. No one have to press it more then once to submit the message, but some do...

Is there a way to fix this? Thank you, nice mod btw. :)
Check out my MODs.
User avatar
Siropu
Registered User
Posts: 155
Joined: Mon Nov 16, 2009 6:15 pm
Location: Romania
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Sun Aug 07, 2011 12:15 pm

That isn't possible as the script won't allow it.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by Siropu » Sun Aug 07, 2011 7:18 pm

This occurs when you press enter quickly more than once to submit the message. Is this only on my board?
Check out my MODs.
User avatar
Siropu
Registered User
Posts: 155
Joined: Mon Nov 16, 2009 6:15 pm
Location: Romania
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Mon Aug 08, 2011 1:38 am

What version of the mod are you using?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by Siropu » Mon Aug 08, 2011 6:42 am

The latest.
Check out my MODs.
User avatar
Siropu
Registered User
Posts: 155
Joined: Mon Nov 16, 2009 6:15 pm
Location: Romania
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Mon Aug 08, 2011 9:39 am

"The latest" is not a version and if you are using 1.3.5 it is quite impossible for users to submit the message more than once.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by Siropu » Mon Aug 08, 2011 10:24 am

Sorry, by latest I meant 1.3.5 and I've experienced this myself.
Check out my MODs.
User avatar
Siropu
Registered User
Posts: 155
Joined: Mon Nov 16, 2009 6:15 pm
Location: Romania
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Mon Aug 08, 2011 10:31 am

Not sure what to tell you but the js will not allow a user to submit the same message twice. Try it on my forum if you like.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by codfather » Mon Aug 08, 2011 12:08 pm

Just did a test on my forum, and as Admin it did the same, but as a member it didn't.

I can live with that.
User avatar
codfather
Registered User
Posts: 268
Joined: Tue Aug 11, 2009 7:25 pm
Location: Scotland UK
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Mon Aug 08, 2011 12:23 pm

Admin has ignore flood permissions and members don't?

Even as Admin and with ignore flood on I can not send a message twice for two reasons from mchat_ajax_mini.js (uncompressed)

Code: Select all

      // Prevent double submit
      //http://greatwebguy.com/programming/dom/prevent-double-submit-with-jquery/
      $jQ.fn.preventDoubleSubmit=function(){
         var alreadySubmitted = false;
         return $jQ(this).submit(function(){
            if (alreadySubmitted)
            {
               return false;
            }
            else
            {
               alreadySubmitted = true;
            }
         });
      };


prevents submitting more than once and

Code: Select all

   // Send function
   add:function()
   {
      // If message input empty stop Send function
      if($jQ('#mChatMessage').val()=='')
      {
         return false;
      }


if the input box is empty during the submit action nothing happens. When it is populated and the ajax function completes then the value in the message area is emptied.

Code: Select all

         complete:function()
         {         
            if($jQ('#mChatData').children('#mChatNoMessage :last'))
            {
               $jQ('#mChatNoMessage').remove();
            }         
            $jQ('#submit_button').attr('disabled','');
            interval=setInterval(function(){mChat.refresh()},mChatRefresh);
            if (mChatUserTimeout)
            {
               session_time = mChatUserTimeout ? mChatUserTimeout / 1000 : false;
               counter = setInterval(function(){mChat.countDown()},1000);
               activeinterval = setInterval(function(){mChat.active()}, mChatUserTimeout);
            }
            // Empty message input
            $jQ('#mChatMessage').val('').focus();
         }


The last line

Basically, I can't reproduce this and don't see why it could happen per the code.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by Siropu » Mon Aug 08, 2011 2:11 pm

I've tried it on your forum and the problem did not occur there. It seems that this is only on my board. I've replaced the .js files, clear the browser cache and is the same.

And it's not just me, users cand double post too... Flood time is set to 0.
Check out my MODs.
User avatar
Siropu
Registered User
Posts: 155
Joined: Mon Nov 16, 2009 6:15 pm
Location: Romania
Contact:

Re: Double Posting - HELP!!!

by RMcGirr83 » Mon Aug 08, 2011 6:42 pm

Sorry, no idea. Try setting the flood time to 5 seconds and see what happens.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double Posting - HELP!!!

by NintendoMii » Mon Aug 08, 2011 9:04 pm

Same here. If I set the flood time to 5 seconds, I get a message (on double enter) "You can not post that soon after a message" or something, but it still double-posts.

Nintendo-City.com
NintendoMii
Registered User
Posts: 547
Joined: Thu Aug 04, 2011 9:08 pm
Contact: