MyBB Community Forums

Full Version: Stopping Duplicate Threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1)
ALTER TABLE `mybb_threads` ADD `posthash` TEXT NOT NULL;
^^ Replace mybb_ with your table prefix and then execute the query


2) In newthread.php around line 532, find:
 $newthread = array(
			"fid" => $fid,

and add before:

$query = $db->query("SELECT COUNT(*) FROM ".TABLE_PREFIX."threads WHERE posthash='".addslashes($mybb->input['posthash'])."'");
$queryres = mysql_fetch_row($query);
if($queryres[0] > 0)
{	
      error("Sorry, but you already submitted this thread.");
}


3) Around line 543, find:
"visible" => $visible,

and replace with:
"visible" => $visible,
"posthash" => addslashes($mybb->input['posthash'])


That should atleast stop the duplicate threads Smile
Bouncing this to see if it can be used to prevent automated duplicate posts via RSSTOPOST ?

And also if it'll still work in 1.4 ?

Here's hoping.
This has already been implemented in 1.4 for normal users (double post within 5 minutes or something)
Dead end for this problem then, thanks for the prompt reply Dennis.