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

Globals dont work after upgrading to 2.2

Quote Reply
Globals dont work after upgrading to 2.2
Strange thing, after upgrading to 2.2 a lot of glabals dont work?
sub {
my $tags = shift;
my $abs = '<span class=abs><br>&nbsp;<br></span>';
my $cat_db = $DB->table ('Links','CatLinks','Category');
$cat_db->select_options ("ORDER BY Links.Jahr DESC, Links.Monat DESC, Links.Tag DESC", "LIMIT 1");
my $sth = $cat_db->select ( GT::SQL::Condition->new ( 'CategoryID', '=', '1',
), ['Links.ID','Links.Aufmacher',
'Links.Text','Links.Bild1'] );
my $output = '<table border=0 width=388 align=center cellpadding=5 cellspacing=0><tr><td width=6>&nbsp;</td>';
while (my ($id, $aufm, $title, $desc, $text, $bild1) = $sth->fetchrow_array) {

$output .="<td class=cc valign=center bgcolor=#f4f4f4><span class=hd>$title</span>$abs$desc</td>";

my $links_db = $DB->table('Links');
my $fh = $links_db->file_info( 'Bild1', $id );
my $location = $fh->File_RelativePath;
if ($fh->File_Name =~ /\.(jpg|gif)$/) {
$output .="<td valign=top bgcolor=#f4f4f4><table bgcolor=black border=0 cellpadding=1 cellspacing=0><tr><td><img src='/imgmdb$location'></td></tr></table></td>";
$output .= "</tr></table>lala";
return $output;
Are there any changes in syntax to write a global ?
Quote Reply
Re: [Robert] Globals dont work after upgrading to 2.2 In reply to
Hi Robert,

Where are you using the global? There were a few behind-the-scenes changes to how templates are parsed, but they shouldn't have affected template globals.

Jason Rhinelander
Gossamer Threads