Mike Posted August 8, 2006 Share Posted August 8, 2006 Earlier today I added some Javascript to every page which disabled the "Add Reply" button once it was clicked in an attempt to stamp out double posting around these parts. Unfortunately, I neglected to check the code for cross-browser compatibility, and it seems that in some browsers it just disabled the element and did nothing further. I've removed the code for now, I may come up with something else later. Apologies to all those affected. Quote Link to comment Share on other sites More sharing options...
montpellier Posted August 8, 2006 Share Posted August 8, 2006 Thank you for letting me know. cheers, Montpellier Quote Link to comment Share on other sites More sharing options...
David Posted August 8, 2006 Share Posted August 8, 2006 It would be quite easy to make a lock in php which disables requests to post for a limited period of time. Eg. Poster clicks button Check lock file If lock file is still valid, do nothing If lock file is not existant or no longer valid, create (new) lock file (either in memory or on disc) with date and time of post and allow the new post to be created You may know a more efficient way of doing this... Quote Link to comment Share on other sites More sharing options...
Mike Posted August 9, 2006 Author Share Posted August 9, 2006 Sounds a bit complicated, especially since it would have to be integrated with the board's codebase. Much simpler to do something like this with Javascript from the client side. Anyway, I've redone the code. This time it should work in all popular browsers at the very least (tested in Firefox, IE and Opera). For the changes on the full Add Reply page to take effect, users may need to restart their browser, or failing that, empty their cache. If anyone experiences problems, please let me know. Quote Link to comment Share on other sites More sharing options...
David Posted August 9, 2006 Share Posted August 9, 2006 Let's test it. :thumbsup: Edit: seems to work! Quote Link to comment Share on other sites More sharing options...
David Posted August 9, 2006 Share Posted August 9, 2006 Let's now test accidental multiple posting. Edit: Yep, seems to work. I pressed the button about ten times before the topic page loaded with the new reply. Edit2: I'm using Firefox 1.5.0.3 on Linux, if that info is useful to know... Quote Link to comment Share on other sites More sharing options...
bob stole my cookie Posted August 9, 2006 Share Posted August 9, 2006 :huh: Quote Link to comment Share on other sites More sharing options...
bob stole my cookie Posted August 9, 2006 Share Posted August 9, 2006 :huh: :ermm: EDIT: Oh cool, it now says "sending" once you click... on both fast reply and normal... dude... :huh: :D Quote Link to comment Share on other sites More sharing options...
Mike Posted August 10, 2006 Author Share Posted August 10, 2006 Edit2: I'm using Firefox 1.5.0.3 on Linux, if that info is useful to know... You should probably update Firefox in that case. 1.5.0.6 is the latest version. :innocent: Quote Link to comment Share on other sites More sharing options...
David Posted August 10, 2006 Share Posted August 10, 2006 Perhaps I'll compile it tomorrow. It's only a minor revision, so it's probably not that urgent an upgrade. I don't really subscribe to the 'latest is best' ethos. I'm still on a 2.6.16 kernel on this machine! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.