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

How do I edit the message for error

Quote Reply
How do I edit the message for error
When a link is deleted this is the error message you get

Oops, we had the following problem:
Unable to find link with id: '26'.

how do I edit the message, I tries the sitehtml.pm but did not see it
Quote Reply
Re: [Abusaki] How do I edit the message for error In reply to
It's the language variable JUMP_INVALIDID

Adrian
Quote Reply
Re: [brewt] How do I edit the message for error In reply to
Where do I find this language variable JUMP_INVALIDID
Quote Reply
Re: [Abusaki] How do I edit the message for error In reply to
Build > User Language > JUMP , and it should be on that page :)

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] How do I edit the message for error In reply to
Thanks Andy,
I saw it, how do I add the title tag,

I tried this, but the title did not work.
Sorry the link <%Tiltle%> with id: '%s' has expired.
Quote Reply
Re: [Abusaki] How do I edit the message for error In reply to
I don't think you can :/

%s is a special "replacement" string for GT::Template. AFAIK, there isn't anything else passed into this string.

However, you may want to try a global;

Code:
sub {

my $error = $_[0];

my $ID;
$error =~ m/(\d+)?/ and $ID = $1;

if ($error =~ /invalid/i) {
return "Invalid link: $ID";
} elsif ($error =~ /has expired/i) {
my $link = $DB->table('Links')->select({ID=> $ID})->fetchrow_hashref;
return qq|Sorry, $link->{Title} is currently invalid.|;
}
}

Call with;

<%new_global_name($error)%>

Note, the above global is untested.. but should work 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!