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

[NEW PLUGIN] Error_Jump_Articles v1

Quote Reply
[NEW PLUGIN] Error_Jump_Articles v1
Hi,

We are pleased to announce the release of Error_Jump_Articles. This plugin is aimed more at those who want to give reports to their users, based on a selection of URL's entered in the article.

The idea of this plugin is to 'catch' bad links. It verifies the link exists before sending the user to that page. If it finds there is an error, it will show them an error message on your site, thus not giving them a direct bad link. It will also email you the Link ID and error code if you turn this option on.

The new powerful features let you use things like;

Code:
<%if Description contains 'http://'%>
<%Plugins::Error_Jump_Articles::GetURLsFromArticle($Description)%>
<%loop URL_Loop%>
<%SubURL%> - Status: <%Plugins::Error_Jump_Articles::GetURLStatus($ID,$SubURL)%><br/>
<%endloop%>
<%endif%>

This would then print out a list of extracted URL's from the "Description" field (this can be set to whatever field you want). This is ideal for giving feedback on the last known status of a link, before sending the user there. For example;

http://www.ultranerds.com/forum - Status: 200
http://www.domain.com - Status: 200
http://www.a-dead-site.org.com - Status: 404
http://www.google.com/some_sub_page - Status: 200

If you have any questions, please don't hesitate to ask.

More details can be found here: http://ultranerds.com/...bin/details/158.html

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] Error_Jump_Articles v1 In reply to
Hi,

I have tested this plug-in with Andy and the original Error_Jump plug-in, already being a cool plug-in, this new version is really one great piece of software.

For people who have quality sites and believe in accompanying users during their visit this is a "must" addition. In effect the plug-in allows you to test links prior to sending people to them. This allows you to not only make sure you don't send people to a blank page but also that you can indicate to them the reason the site isn't available.

Instead of them seeing a blank IE etc. page or just 404 error you can have for example :

The page you are trying to reach is no longer at that address, the owner /author of this link/article will be alerted by email so this can be checked...

or something similar.

As you can tell I was really pleased with Andy's original plug-in and this modified version is just what I wanted ! Wink

I think that most people will understand the bad feedback from people being sent to erroneous pages needs to be dealt with in a better way.
I feel that this type of server side testing prior to sending people to external sites is the future for sites that when not dealt with just loose and can really irritate a lot of users. Many users don't understand what is going on and will often think it is the originating site that is in question.

John
Significant Media
Quote Reply
Re: [Andy] [NEW PLUGIN] Error_Jump_Articles v1 In reply to
Not to be offtopic, I'll put this question here.

Is it possible to change email text and error text when user clicks on link that have some error code?

Regards.

UnReal Network
Quote Reply
Re: [deadroot] [NEW PLUGIN] Error_Jump_Articles v1 In reply to
Hi,

I may actually make this template based for the email - but won't have time for that today.

In the mean time, this would work:

In safe_jump.cgi, find:

Code:
my $msg = "An error has been found on your site for $id. The error message was: $code_returned ($STATUS_BAD{$code_returned}).";

..and change to:

Code:
my $msg;

if ($code_returned == 404)
$msg = "The URL on Link ID $id gave a 404 Page Not Found error. [ $code_returned ($STATUS_BAD{$code_returned}).]";
elsif ($code_returned == 400) {
$msg = "The URL on Link ID $id gave a 400 Bad Request Error. [ $code_returned ($STATUS_BAD{$code_returned}).]";
} else {
# backup
$msg = "An error has been found on your site for $id. The error message was: $code_returned ($STATUS_BAD{$code_returned}).";
}

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] [NEW PLUGIN] Error_Jump_Articles v1 In reply to
Another thing. You use new column added "Link status". Why don't you use already added column "Status" so this way status will be directly changed in View Link Status.

Maybe because at that time "Status" didn't exist Wink

UnReal Network
Quote Reply
Re: [deadroot] [NEW PLUGIN] Error_Jump_Articles v1 In reply to
Hi,

It doesn't quite work like that :)

What its aimed for, is extracting the URL's from a list of text (normally an "Article" or "Description"), and then displaying them - along with their status code.

i.e with:

Code:
<%if Description contains 'http://'%>
<%Plugins::Error_Jump_Articles::GetURLsFromArticle($Description)%>
<%loop URL_Loop%>
<%SubURL%> - Status: <%Plugins::Error_Jump_Articles::GetURLStatus($ID,$SubURL)%><br/>
<%endloop%>
<%endif%>

The bit in bold gets the URL's, and then the "loop" goes through the URLs found, and shows the status.

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!