Hi phoule,
I did successfully upgrade the template. I don't know what you're version looks like and mine is chalk full of mods, but this is what I did and it was quite simple.
In DB_Utils.pm commented out the following lines:
# $TEMPLATE->clear_vars;
# $TEMPLATE->load_template ($tpl, $string) or die ("Can't load template. Reason: $Links::Template::error");
# $TEMPLATE->load_vars ($vars) or die ("Can't load variables. Reason: $Links::Template::error");
# my $output = $TEMPLATE->parse ($tpl) or die ("Can't parse template. Reason: $Links::Template::error");
and added this line instead:
my $output = GT::Template->parse ( $tpl, $vars, $opts ) or die ("Can't parse template. Reason: $Links::Template::error");
Then copied the whole GT directory from the new version(I doubt it's all needed - Just needed to get it working)
That was it. It doesn't provide access to the globals.txt feature as in Links SQL 2.x, but it does provide access to the the if, else, elsif <%set x=something%> add to existing values and so one. Quite nifty and worth the time to do it.
I did successfully upgrade the template. I don't know what you're version looks like and mine is chalk full of mods, but this is what I did and it was quite simple.
In DB_Utils.pm commented out the following lines:
# $TEMPLATE->clear_vars;
# $TEMPLATE->load_template ($tpl, $string) or die ("Can't load template. Reason: $Links::Template::error");
# $TEMPLATE->load_vars ($vars) or die ("Can't load variables. Reason: $Links::Template::error");
# my $output = $TEMPLATE->parse ($tpl) or die ("Can't parse template. Reason: $Links::Template::error");
and added this line instead:
my $output = GT::Template->parse ( $tpl, $vars, $opts ) or die ("Can't parse template. Reason: $Links::Template::error");
Then copied the whole GT directory from the new version(I doubt it's all needed - Just needed to get it working)
That was it. It doesn't provide access to the globals.txt feature as in Links SQL 2.x, but it does provide access to the the if, else, elsif <%set x=something%> add to existing values and so one. Quite nifty and worth the time to do it.