View Full Version : Duplicate Ad Security Feature

April 3, 2010, 02:53 PM
Hi, I would like to see a duplicate posting security feature in Flynax to prevent users repeating the same ad multiple times and spamming the categories. I have seen this in some of the better classifieds software. It's a good idea.

February 5, 2011, 11:33 AM
"Prevent duplicate listings posting" options is good idea, we will realize it as new plugin, please keep an eye on our blog, we will post news there, also I will reply you in this thread.


Vincent Kelly
February 1, 2013, 03:03 PM
Was there anything ever done on this issue

February 4, 2013, 07:56 AM
We unfortunately did not implement anything related to this. For now we can start with simple customization, i have something easy in mind regarding how to prevent duplicated listings.

Let me know if you interested we can start with this simple customization ( i will post instructions) , and later if necessary improve it and implement as plugin.

Vincent Kelly
February 11, 2013, 03:14 PM
Yes I would definitely like to have this what is the procedure to impliment this as soon as possible

February 13, 2013, 11:31 AM
ok, try please following

open includes/controllers/add_listing.inc.php ~ 700 line
find code and make changes

/*add this*/
if( $rlDb -> getRow("SELECT `ID` FROM `".RL_DBPREFIX."listings` WHERE `title` ='".$data['title']."'" AND `description` = '".$data['description']."'") )
$errors[] = $lang['duplicated_ad_error'];
$error_fields .= "f[title],f[description],";

if ( !$errors )
$reefless -> loadClass( 'Actions' );
$reefless -> loadClass( 'Listings' );
$reefless -> loadClass( 'Resize' );

also you have to add phrase key with key 'duplicated_ad_error' and text you want to be Error message through the language manager.

Not sure actually will it be useful or not, it's just start point - it's checking for same title in the database and if found gives error.
make sure that you title and description are the right field keys - they can be different for your site.

Wei Hong
August 20, 2013, 07:55 AM
Would you kindly explain to me how this code work?
Also looking forward to the plugin. This could be consider a essential plugin

P/S: Does this code work for 1 account only because some people may sell similar thing

August 21, 2013, 12:06 PM
The code checking database for the listing with same description and title, if at least one listing found with same data it will show error.

For the plugin, its not very clear what the plugin will do, do you have other thoughts of this in addition to the code we have .. ? )