UBB.Dev
Posted By: Magnum [6.0x] No Double Posts - 04/13/2001 3:49 PM
Here is a quick method of stopping those double posts, that always seem to happen.

Tested on v6.01 to v6.04
edited to use public_common.pl, thanks to freakscene for reminding me smile

################
# In public_common.pl
#
# find:

return null;
}

//-->


#####
# and add immediately below:




########################
# in
# public_edit_post.pl
# public_new_topic_form.pl
# public_new_reply_form.pl
#
# find:

METHOD="POST" ACTION="$vars_config{CGIURL}/ultimatebb.cgi"

#####
# add this into that section

onSubmit="submitonce(this)"

#####
# so it looks like this

METHOD="POST" onSubmit="submitonce(this)" ACTION="$vars_config{CGIURL}/ultimatebb.cgi"

#######################################

save and upload, flush the cache and no more double posts, replies & edits

Magnum wink
Posted By: freak.scene Re: [6.0x] No Double Posts - 04/13/2001 4:01 PM
Quote
quote:
Hey Magnum, thanks for updating this smile

You can put this javascript in the header section of public_common.pl and you will not have to touch the styles which could be a problem if you were to forget to add that when creating a new style.

Nice job
Posted By: Tosha Re: [6.0x] No Double Posts - 04/13/2001 4:29 PM
Sweet,I will check this out right away... but what do u mean by Flush the Cache?...sorry I'm a newbie...
Posted By: freak.scene Re: [6.0x] No Double Posts - 04/13/2001 5:39 PM
Quote
quote:
In your control panel, there is an option under Maintenance to Clear Cache. This is what he means. You may want to get a little more familure with the ubb before you begin hacking it, at least the basic functionality. It will save you headaches down the road...
Posted By: Magnum Re: [6.0x] No Double Posts - 04/13/2001 5:53 PM
Thanks for that freakscene, must be the holiday period, I totally forgot the common file smile

Magnum wink
Posted By: Tosha Re: [6.0x] No Double Posts - 04/13/2001 7:33 PM
well if he said Clear Cache I would understand it!(I'm not a complete Newbie) I CAN FIGURE out how to add a simple hack! mad
Posted By: freak.scene Re: [6.0x] No Double Posts - 04/13/2001 7:38 PM
Hey, don't get upset. I did not mean that in a bad way, just covering all bases (you would be suprised).

If you took it the wrong way I apoligize. wink It was meant to be helpful, not an insult.
Posted By: Tosha Re: [6.0x] No Double Posts - 04/13/2001 7:49 PM
Ok...I'm sorry too... smile I do need to catch up on my hacking terms! laugh
Posted By: Tosha Re: [6.0x] No Double Posts - 04/13/2001 8:26 PM
oh yeah one more thing...I dun know if you can add this but....listen...

So when a person clicks submit or whatever it gets like greyed out so they can not click again to double post...BUT...if they click BACK on their browser and click it again.. it will still double post...

Is there any way to fix that? confused

EDIT: Whoops...forgot the most important thing of all! GREAT HACK!
smile smile
Posted By: Magnum Re: [6.0x] No Double Posts - 04/13/2001 8:43 PM
Hi & thanks,
I don't think there is a way to cure bloody mindedness of ppl - if there is a way to cock it up they will find it LOL smile
but it would be extremely difficult to stop that, as using back - returns you to the initial state before clicking, unless you disable the back button first.

I'll remember to use clear cache next time as well smile smile

Magnum wink
Posted By: bafai Re: [6.0x] No Double Posts - 04/13/2001 9:04 PM
Demo?
Posted By: CopyCat Re: [6.0x] No Double Posts - 04/14/2001 10:10 AM
thanks
Posted By: Tosha Re: [6.0x] No Double Posts - 04/15/2001 5:40 AM
..As they say...for a simple hack..use simple terms... wink
Posted By: Tosha Re: [6.0x] No Double Posts - 04/18/2001 11:36 PM
wink Hey this hack doesn't work with the Preview Post hack..

can you please make this hack work with it?

You just have to definge "prev"

I would myself.. I just don't know how!
Posted By: DJSharp Re: [6.0x] No Double Posts - 11/01/2001 5:43 AM
can somebody update this for 6.1?

i just tryed installing it like it was & it worked, BUT if you have "Preview Post" installed, then everytime you press preview, it WONT preview, it just posts it.

Ima try to figure out why, but im not very good at things like this. frown
© UBB.Developers