Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

allow certain duplicate URLs

Home: Plugins Support - FREE: Duplicate_Check:

 

 


scottish
User

Karma: -0 / +0

Jun 20, 2006, 4:38 AM

Post #1 of 2 (14669 views)
Shortcut

Send scottish a wink
allow certain duplicate URLs Can't Post

Can the plugin be modified to allow through URLs that are simply http:// as in the GLinks default where no web address is inserted?


Andy
Enthusiast

Karma: -1 / +7


Jul 8, 2006, 1:55 PM

Post #2 of 2 (14661 views)
Shortcut

Send Andy a wink
Re: [scottish] allow certain duplicate URLs [In reply to] Can't Post

Hi,

I don't see why not :)

Try opening up /admin/Plugins/Dumplicate_Check.pm, and just after;


Code
    my ($error_show, $chk_dup, $db_con);


..add;


Code
    if (!$IN->param('URL') || $IN->param('URL') eq "http://") { return @args; }


Also, an optional update;

Change:


Code
 	$chk_dup = $db_con->count ( { URL => $IN->param('URL') } );


..to;


Code
        my $cond = new GT::SQL::Condition; 
$cond->add('URL','=',$IN->param('URL'));
$cond->add('URL','=',$IN->param('URL')."%"); # matches anything extra after it - optional, but a recommended add in :)
$cond->bool('OR');
$chk_dup = $db_con->count ( $cond );


Untested, but should work fine :)

Cheers
Andy
Programmer/Designer/LinksSQL Freak Cool

http://www.ultranerds.com
http://www.imagesql.com


 
 
 


Search for (options) Powered by Gossamer Forum v.1.2.4