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

(Andy) Duplicate URL Check Plugin

Quote Reply
(Andy) Duplicate URL Check Plugin
I have this plugin installed and it works great. What would I need to do to get it to check the URL when modifying a link.
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Hi,

The easiest way, is to directly modify plugins.cfg (/admin/Plugins/).

However, please be sure to backup first =)

Just look for the Duplicate_Check section, and then find the "add_link" hook. After that, you need to add another hook... for "modify_link" (possibly modify_link_do).

Hope that helps.

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] (Andy) Duplicate URL Check Plugin In reply to
Hi Andy,

This is what I have:

'Duplicate_Check' => {
'hooks' => [
[
'add_link',
'PRE',
'Plugins::Duplicate_Check::check',
'1'
]
],

[
'modify_link',
'PRE',
'Plugins::Duplicate_Check::check',
'1'
]
],

Is this correct?
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Hi,

Yup, that should work :)

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] (Andy) Duplicate URL Check Plugin In reply to
Andy,

Did not work:

A fatal error has occured:GT::Config (26268): Unable to load '/hsphere/local/home/xxx/xxx.com/cgi-bin/links/admin/Plugins/plugin.cfg': Bad name after Duplicate_Check' at /hsphere/local/home/xxx/xxx.com/cgi-bin/links/admin/Plugins/plugin.cfg line 121.
. at /hsphere/local/home/xxx/xxx.com/cgi-bin/links/admin/GT/Plugins.pm line 222.
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Sorry,was rushing =)

It should read;

Code:
'Duplicate_Check' => {
'hooks' => [
[
'add_link',
'PRE',
'Plugins::Duplicate_Check::check',
'1'
],
[
'modify_link',
'PRE',
'Plugins::Duplicate_Check::check',
'1'
]
],

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] (Andy) Duplicate URL Check Plugin In reply to
Andy,

No more error, but it's not checking when modifying a link.
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Mmm.. it might need a bit more work =)

One thing to try: change it to modify_link_do, and see if that wors? (the modification process is different, because it has to know *what* link its modifying, and thus there being an extra step :)).

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] (Andy) Duplicate URL Check Plugin In reply to
Getting better:

Your link could not be modified because it is not accessible: Could not connect.

Just the wrong error displayed!
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Cool :)

What kind of modification system do you have? Where they enter their URL, or where they are logged in.. and select the link to modify, from a list?

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] (Andy) Duplicate URL Check Plugin In reply to
They have to be logged in.
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Can you PM me an example, so I can see which tags are being passed in? Obviously when first adding a link, its the URL field that gets checked. However, when modifying... I don't think thats passed in specifically (could be totally wrong though =)).

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] (Andy) Duplicate URL Check Plugin In reply to
Andy,

Could I just change the error message, something like this:

Your link could not be modified because it is not accessible: Could not connect, possible duplicate URL!
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Hi,

That would kinda defeat the object of dup checking <G>

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] (Andy) Duplicate URL Check Plugin In reply to
Andy,

Thank you, I have to get back to this, I have to leave for work.
Quote Reply
Re: [rascal] (Andy) Duplicate URL Check Plugin In reply to
Just getting back to Andys Duplicate URL Plugin, attempting to get this plugin to also work when modifying links.

At this point the user modifying the link is stopped if they submit a Duplicate URL, but they do not receive the Error Message set in the plugin, instead they receive the Error could not connect.


My Set up:

1. User has to be logged in
2. They select modify links.
3. They are shown there list of links
4. They click on edit link
5. There taken to modify form

Any one know how to get this to work properly?