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

[New Plugin] Duplicate_Check

(Page 1 of 3)
> >
Quote Reply
[New Plugin] Duplicate_Check
Hi...just completed a new plugin. It basically will check if a link has already been entered in the database, and if it has, report an error to the user trying to add it. Should be bug free, but if you find any problems with it, please let me know in this thread.

EDIT: Based on the idea by Quango.

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!

Last edited by:

Andy: Aug 15, 2002, 12:29 PM
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
I would hope you got permission before copying Qango's code...

http://www.gossamer-threads.com/...licate%20url;#210424
Quote Reply
Re: [Paul] [New Plugin] Duplicate_Check In reply to
Its not exactly copying...there is no other way to check, except that way! I just modified it so that it works as a plugin...

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
>>
Its not exactly copying
<<

Im not sure how you define copying but using the exact same code with the exact same variable names is copying Laugh
Quote Reply
Re: [Paul] [New Plugin] Duplicate_Check In reply to
Would you prefer me change the names of the variables, and then call it my own? All I did was use his idea, and turn it into a plugin, that everyone can use! He made the code avaiable to anyone who wanted it, so I'm just making it avaiable to people who want it! Its not like I'm making a profit form it!

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
Andy you are missing the point, it's just manners to ask before you use something belonging to someone else. Qango may have posted in public and I'm sure he doesn't mind but it's courteous to at _least_ ask the person first.
Quote Reply
Re: [Paul] [New Plugin] Duplicate_Check In reply to
Paul...you really know how to get on someone's nerves! You are not exactly Mr Perfect yourself. All I do is try and give the GT community something back, and you throw it in my face. I could make an argument out of this...I'm certainly in the mood for an argument at the moment (for reasons I' not going to talk about)...but I'm not going to, as it would tarnish this forum, and GT!

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
Andy don't be such an idiot, I'm making a valid point. Trying to twist this back at me is just childish.

The fact is you should always ask permission irrespective of whether you are trying to help or not.
Quote Reply
Re: [Paul] [New Plugin] Duplicate_Check In reply to
Think what you want...I'm not in the mood for talking at the moment...I'm just gonna leave this thread here before an argument starts...unless someone has a valid point about the plugin.

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
You turned it into a confrontation by simply dismissing what I'm telling you and trying to deflect the blame back at me. I was trying to save you any grief but you seem unreceptive to advice, so good luck to you.
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Hi

Sounds good..

but after installing the plug in adding a libk returns a 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
Mmm..I seem to remember having problems on your server before with the Safe_Jump plugin. Is the news.cgi plugin CHMODed to 755, and is the directory it is held in CHMODED to 755?

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 installed this and got an error as well.
Quote Reply
Re: [rayhne] [New Plugin] Duplicate_Check In reply to
Mmmm....would it be possible for you to PM me your admin details for Links SQL (just set up a username for me)...I can't see any reason why it wouldn't work Unimpressed

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

The problem I had with the previous plug ins was permission..

But in this case the use can access the add.cgi and add his/her info then when they submit the form they get the error..

The permissions on the file are set correctly..
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
Eugh...good old Cobalt servers ;) I'm not quite sure why you are getting this error. Do you have access to error logs for CGI scripts?

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,



Is there some way for me to have your plug in only search for duplicate urls when the column "Image" in the links properties table contains the value "links"? I am sorry, but I am not capable of writing one line in Perl...



Thanks.
Quote Reply
Re: [nt6] [New Plugin] Duplicate_Check In reply to
Hi...I'm not quite sure how well this will work, but give this a go;

1) Download the plugin (dont install).

2) When the file is on your server, then click the 'edit' button. Then select the Duplicate_Check.pm file.

3) Add the following;

$cond->select_options ('WHERE Image = "links"');

after;

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

Then save it, and go back to install it.

This is untested...and I'm assuming this 'select_options' syntax will work Smile

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
That will certainly not work. There is no such thing as:

$cond->select_options ('WHERE Image = "links"');

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] [New Plugin] Duplicate_Check In reply to
So what is the WHERE syntax? I know we have GT::SQL::Condition... but I couldn't work out how to fit that in Unsure

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 GT Module documentation is your friend.

GT::SQL::Table
GT::SQL::Condition

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Andy] [New Plugin] Duplicate_Check In reply to
Smile Hi Andy,



Did you ever find this out?
Quote Reply
Re: [nt6] [New Plugin] Duplicate_Check In reply to
Getting a little bogged down here. Paid work has taken over...I'll get back onto it right after completing this big job ;)

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: [nt6] [New Plugin] Duplicate_Check In reply to
In Duplicate_Check.pm (uninstalled plugins -> edit -> Duplicate_Check.pm) replace

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

with

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

That should do the job.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] [New Plugin] Duplicate_Check In reply to
Quote:
$chk_dup = $db_con->count ( { URL => $IN->param('URL'), Image => 'links' } );

I think you will probably need:

Code:
$chk_dup = $db_con->count ( { URL => scalar $IN->param('URL'), Image => 'links' } );

Some bizarre things can happen if you don't specifically use scalar context.
> >