Back to vBulletin 3.5 Add-ons

Duplicate Post checker for Inferno RSS Forum Feeds Technology v1.6
Mod Version: 1.00, by flup

This modification is in the archives.
vB Version: 3.5.0 Rating: (0 vote - 0 average) Installs: 0
Released: 12 Nov 2007 Last Update: Never Downloads: 2
Not Supported Code Changes Re-usable Code  

Credits go to Zero Tolerance for making this hack available for vB 3.5.0 a while back I just added 2 lines of code which must be enough to keep the doubles away

Inferno RSS Forum Feed Technology v1.6:
[v1.6] Inferno RSS Forum Feeds Technology

------------------------------------------------------------------------------------------

I noticed a lot of users where complaining about the doublepost being made by the RSS feed reader. As there are still alot of users who have installed this hack, underwhich myself, I have made a slight modification for this hack which checks the new posts for titles in the database.

It's a fairly easy modification and it might not be the perfect solution to this problem, but at least it keeps the double posts away.

What does it do?
This mod checks for posts with the same title in the forum where the feed is directed to (so a a feed which is posted in the forum with ID 3 will only check for duplicate titles in the forum with ID 3).

What to do?
Open the /includes/class_ffrss.php file and find the function: post_thread() and replace it with this new post_thread function:

Code:
	function post_thread($title, $message, $feed)
	{
		global $vbulletin;
		$getThread = $vbulletin->db->query("SELECT threadid FROM " . TABLE_PREFIX ."thread WHERE title = '" . mysql_real_escape_string($title) . "' AND forumid = '" . mysql_real_escape_string($feed['feed_forum']) . "'");
		$ThreadNums = $vbulletin->db->num_rows($getThread);
		if($ThreadNums < 1) {
			$this->ItemsAdded++;
			$newpost['title']   = $title;
			$newpost['message'] = $message;
			$smilie             = true;
			$foruminfo          = fetch_foruminfo($feed['feed_forum']);
			$ThreadDM =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
			$ThreadDM->set_info('forum', $foruminfo);
			$ThreadDM->set_info('thread', $newpost);
			$ThreadDM->setr('allowsmilie', $smilie);
			$ThreadDM->setr('userid', $feed['feed_user']);
			$ThreadDM->setr('title', $newpost['title']);
			$ThreadDM->setr('pagetext', $newpost['message']);
			$ThreadDM->setr('forumid', $feed['feed_forum']);
			$ThreadDM->setr('dateline', $this->get_dateline());
			$ThreadDM->set('visible', 1);
			$ThreadDM->registry->options['floodchecktime'] = 0; // Disable flood check in memory...
			$ThreadDM->pre_save();
			if (sizeof($ThreadDM->errors) > 0)
			{
				$ThreadDM->errors = array();
			}
			$ThreadDM->save();
		}
	}
Hopefully it works for everyone

Download

No files for download.

Supporters / CoAuthors

  • Zero Tolerance

Similar Mods

[v1.6] Inferno RSS Forum Feeds Technology vBulletin 3.5 Add-ons
Inferno RSS View Feeds vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024