I solved the problem of double clicking "Submit" in the forum! After I joined Dolphin (Registered: 02.03.12), it was finally solved after 13 years! Finally!
Double-clicking "Submit" will post 2 discussions, but the latest one will not be opened!
Open modules / boonex / forum / classes / DbForum.php then correct it to this:
function newTopic($f, $title, $text, $sticky, $user, $uri) { $ts = time(); $sticky = $sticky ? $ts : 0; // get when if (!($when = $this->getOne("SELECT `when` FROM " . TF_FORUM_TOPIC . " order by `topic_id` desc limit 1;"))) { return false; } if ($when == $ts) { return false; } // add topic title if (!$this->query("INSERT INTO" . TF_FORUM_TOPIC . " SET `topic_posts` = 1, `forum_id` = ?, `topic_title` = ?, `when` = ?, `first_post_user` = ?, `first_post_when` = ?, `last_post_user` = ?, `last_post_when` = ?, `topic_sticky` = ?, `topic_uri` = ?", [ $f, $title, $ts, $user, $ts, $user, $ts, $sticky, $uri ]) ) { return false; } // get topic_id if (!($topic_id = $this->getOne("SELECT LAST_INSERT_ID();"))) { return false; }
Take it, it's free! But I don't think it will help many websites.