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

Help with this Short Description Global?

Quote Reply
Help with this Short Description Global?
I've modified a few globals from the forum to display a short description which can link your rewrite details pages.

The problem is I can't seem to make it return the Title or ($Title) from the global below. Can anyone tell me what's wrong with it? For some reason the code displays $Title as the link ID# on my link.html pages.

Thanks for any help with this!

Code:
sub {
my $id = $_[0];
my $desc = $_[1];
my $chars = $_[2] || '700';
my $build_url = $CFG->{build_root_url};
my $Title = shift;
if (!$desc) { return "No description yet for this site"; }
length $desc < $chars and return $desc;
my $short = substr ($desc, 0, $chars);
$short =~ s/\s\S+?$//;
my $cats = $DB->table('Links')->get_categories($id);
my ($cat_id,$cat_full_name) = each %$cats;
my $cat_url = $DB->table('Category')->as_url($cat_full_name);
$Title =~ y/ \t\r\n?"'#/__/d;
my $detailed_url = "http://www.mysite.com/...itle-$id/$Title.html";
$short .= qq|<b>... <a href="$detailed_url">More</a></b>|;
}
Subject Author Views Date
Thread Help with this Short Description Global? Jonze 2614 Feb 23, 2007, 4:11 PM
Thread Re: [Jonze] Help with this Short Description Global?
tandat 2502 Feb 24, 2007, 6:20 PM
Post Re: [tandat] Help with this Short Description Global?
Andy 2464 Mar 9, 2007, 2:41 AM