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

Links from another installation

Quote Reply
Links from another installation
I'm using the following global to pull links from another GLinks installation where the data is held in the same table.

Quote:
Global: altlinks

sub {
my $db = GT::SQL->new('/mysite/cgi-bin/admin/defs');
my $tbl = $db->table('links1');
my ($output,$sth,$feature);
my $search_db = $db->table('Links');
$search_db->select_options ('ORDER BY Add_Date DESC');
$sth = $search_db->select ( { isFeature => 'Yes'});
while ($feature= $sth->fetchrow_hashref) {
$feature->{'detailed_url'} = "$CFG->{build_detail_url}/$feature->{'ID'}$CFG->{build_extension}";
$output .= Links::SiteHTML::display ('feature', $feature);
}
return $output;
}

I've copied the links2 def file and labelled it links1_links2.def The global is finding the .def file

I add the tag <%altlinks%> to the rightside template.

I copy the 'feature.html' template.

This code works fine in installations on the same server but will not work on different servers.

Can anyone see where I've gone wrong?

Thanks.
Subject Author Views Date
Thread Links from another installation Alba 6138 Apr 2, 2006, 5:08 AM
Thread Re: [Alba] Links from another installation
tandat 6036 Apr 2, 2006, 8:21 AM
Thread Re: [tandat] Links from another installation
Alba 6032 Apr 2, 2006, 10:01 AM
Thread Re: [Alba] Links from another installation
tandat 6029 Apr 2, 2006, 10:07 AM
Thread Re: [tandat] Links from another installation
Alba 6048 Apr 2, 2006, 10:40 AM
Thread Re: [Alba] Links from another installation
pugdog 5982 Apr 5, 2006, 8:59 PM
Thread Re: [pugdog] Links from another installation
Alba 6002 Apr 8, 2006, 8:09 AM
Thread Re: [Alba] Links from another installation
pugdog 5957 Apr 11, 2006, 5:48 PM
Thread Re: [pugdog] Links from another installation
Alba 5961 Apr 12, 2006, 12:02 AM
Thread Re: [Alba] Links from another installation
pugdog 5964 Apr 12, 2006, 1:41 AM
Thread Re: [pugdog] Links from another installation
Alba 5988 Apr 12, 2006, 3:21 AM
Post Re: [Alba] Links from another installation
pugdog 5934 Apr 13, 2006, 11:29 AM
Post Re: [Alba] Links from another installation
afinlr 5976 Apr 5, 2006, 4:43 AM