Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[New Plugin] Duplicate_Check

(Page 3 of 3)
> >
Quote Reply
Re: [rayhne] [New Plugin] Duplicate_Check In reply to
Yeah..I could do that...or possibly add a few more lines, and get it to work on page.cgi....I'll see how it goes Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
I was not trying to use your hack of the plug in on the php side of things.

That's a good explanation for it not working in the page.cgi side... Blush
Quote Reply
Re: [nt6] [New Plugin] Duplicate_Check In reply to
That was all that wasn't working on it though, wasn't it? Just the link?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
It does seem to being up the list of what cats have no links. Now, if the full hierarchy was listed right there, it would be a big help...:)
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Andy

With the new version

Add.cgi is working but if the URl is dublicate the users is getting 500 error..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] [New Plugin] Duplicate_Check In reply to
Would it be possible to gain access to someone's Links SQL install hosted on a Cobalt? That way I can test it correctly,a dn won't have to get these errors all the time Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
If no one else has offered, email me and I'll send you my testing Admin info. :)
Quote Reply
Re: [rayhne] [New Plugin] Duplicate_Check In reply to
Solution for the problem have been found yet?

Cuz, this plugin is actually a wonderful one and would love to use it too.

Thanks for the help.

Vishal
-------------------------------------------------------
Quote Reply
Re: [TRPN] [New Plugin] Duplicate_Check In reply to
Did you try the updated one?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
The plugin works great. However, one missing feautre, to match (e.g. cnn.com with www.cnn.com)

and also the ability to consider cnn.com/index.htm a duplicate also. Can anybody implement this?
Quote Reply
Re: [Essam] [New Plugin] Duplicate_Check In reply to
up
Quote Reply
Re: [Essam] [New Plugin] Duplicate_Check In reply to
Try changing the rountine sub check in admin/Plugins/Duplicate_Check.pm, with the following;

Code:
sub check {
# -------------------------------------------------------------------
# This subroutine will get called whenever the hook 'add_link'
# is run. You should call GT::Plugins->action ( STOP ) if you don't
# want the regular code to run, otherwise the code will continue as
# normal.
#
my (@args) = @_;
my $args = shift;
my ($error_show, $chk_dup, $db_con,$chk_dup2,$mod_url);

# fix so we can get the www in front of a URL to check too. If someone submits something
# like http://www.google.com, it then gets the www. taken out of it, so we end up with http://google.com
# Also should work in reverse...so if they enter http://google.com, it will look for http://www.google.com
if ($IN->param('URL') =~ /www\./) { $mod_url = $IN->param('URL'); $mod_url =~ s/www\./i; }
else { $mod_url = $IN->param('URL'); $mod_url =~ s#http://#http://www\.#i; }

# Check that the URL isn't already in the Links database
$db_con = $DB->table("Links");
$chk_dup = $db_con->count ( { URL => $IN->param('URL') } );
$chk_dup2 = $db_con->count ( { URL => $mod_url } );
if ($chk_dup || $chk_dup2) {
$error_show = "The URL you entered already seems to be in our database, either live, or awaiting validation!";
print Links::SiteHTML::display('error', { error => $error_show });
exit;
}
}

That should do it...but its not tested, so there may be typos etc in it.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Thank you Andy... but I got an Error after adding any link.
Quote Reply
Re: [Essam] [New Plugin] Duplicate_Check In reply to
Change:

s/www\./i

to

s/www\.//i

I'd change a few other things but I think that is the main cause of your error.
Quote Reply
Re: [Paul] [New Plugin] Duplicate_Check In reply to
Thank you very much Paul. It's working PERFECTLY now.
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Hi Andy,

I have just encountered the problem described here (GL 3.2.0) :
http://www.gossamer-threads.com/...?post=293315#p293315

But, the problem is only with the sector of administration.
The user does not encounter this problem.

You made an update to correct this problem ?

Thanks for your answer.

Mick

Last edited by:

MJ_: Feb 11, 2009, 12:02 AM
Quote Reply
Re: [MJ_] [New Plugin] Duplicate_Check In reply to
Does this work ok?

http://www.ultranerds.com/...Duplicate_Check_L28/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Thanks Andy,

I again installed the recommendée version, but that did not work.

But, I also tested the proposal of JeffB and that seems to work correctly.

Code:
Add the line "print $IN->header;" above "print Links::SiteHTML::display('error', { error => $error_show })"

You think that it is correct ?

Thank you for your answer.

Mick
Quote Reply
Re: [MJ_] [New Plugin] Duplicate_Check In reply to
Hi,

Yeah, thats definatly the fix - but I'm sure I fixed up that issue about 5 or so years ago - but maybe it got lost somewhere.

I'll update it later today if I get some time Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Hi Andy,

Would It be possible to authorize the use of the http:// value?
This value would not be regarded as a value already recorded in the database.

Thanks for your suggestion.

Mick

Quote Reply
Re: [MJ_] [New Plugin] Duplicate_Check In reply to
Untested, but in DuplicateCheck.pm find:

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

..and add this below it:

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

That should do the trick :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Hi Andy,

That seems to work correctly. :)

Thanks!

Mick

> >