Gossamer Forum
Home : Products : Links 2.0 : Customization :

using &site_html_link

Quote Reply
using &site_html_link
I use the lastlink mod that puts the five most recent additions on the main page. I want to override the mod so that the first link shown is not actually the most recent, but one of my choosing. Here's the code that adds to the $lastlink variable and sends it &site_html_link:

@tmp = &split_decode ($lines[$i]);
%tmp = &array_to_hash (0, @tmp);
$lastlink .= &site_html_link (%tmp);

Before those three lines, what I want to do is something like:

$lastlink .= &site_html_link (173);

Where 173 is the ID number of the link I want to have included in $lastlink. That obviously doesn't work, because &site_html_link requires a hash.

Instead of passing 173, the link ID, as the parameter, what do I pass in order to have link ID 173 become part of the variable?

Thanks!

Quote Reply
Re: using &site_html_link In reply to
try adding this before the loop...
$lastlink .= &site_html_link(&get_record('123'));

--Drew
Free, hot camel soup for Links hackers...
http://www.camelsoup.com
Quote Reply
Re: using &site_html_link In reply to
 
my (%rec) = &get_record("173");
$lastlink = &site_html_link(%rec);

That is all you need to show link 173.

Installs:http://www.wiredon.net/gt/
MODS:http://wiredon.net/gt/download.shtml

Quote Reply
Re: using &site_html_link In reply to
THANKS GUYS!