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

global get_links_by_owner

Quote Reply
global get_links_by_owner
Hi,
I'm using this global, to show other link entries from a user in the detailed page.

Code:
sub {

my $user = $_[0];

my $sth = $DB->table('Links')->select( { LinkOwner => $user, isValidated => 'Yes' } ) || return $GT::SQL::error;

my $back;
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<p><a href="$CFG->{db_cgi_url}/jump.cgi?Detailed=$hit->{ID}">$hit->{Title}</a></p>|;
}

return $back;
}

How can I insert a control if there is a detailed page or not.
At the moment all links go to the detailed page, even if the link has no detailed page.
But when there is no detailed page I just get this error message
Sorry, Detailed information is turned off for this record.

Is it possible to integrate the "if detailed" tag in this global?

Thanks
Matthias

Matthias
gpaed.de
Subject Author Views Date
Thread global get_links_by_owner Matthias70 2514 Sep 1, 2007, 4:05 PM
Thread Re: [Matthias70] global get_links_by_owner
Andy 2405 Sep 1, 2007, 4:36 PM
Post Re: [Andy] global get_links_by_owner
Matthias70 2407 Sep 2, 2007, 2:09 AM