Gossamer Forum
Home : Products : Links 2.0 : Customization :

Modification Of Lastlink Mod

Quote Reply
Modification Of Lastlink Mod
Hi Guys
I think that the last link mod is just great

However i was wondering if anyone could make this modification to it

i want to have two types of last links
one stlye with 10 and another style with 5 and so that i will be able to call them link
<%lastlink%>
<%lastlink2%>

Please Help!

Ellipt has tried and i truly thank him for his effort...but was not succesful

can anyone offer any ideas?

Gian
Quote Reply
Re: Modification Of Lastlink Mod In reply to
Gian,

After playing with the codes I bit, I thought of the following codes:

Code:
# Last Link - Dual Set
my $LASTX = 10;
my $LASTX2 = 5;
open (DB, "<$db_file_name") or &cgierr("unable to open database:$db_file_name.\nReason"; my @lines = <DB>;
close DB;
for ($i=$#lines; $i>=$#lines - $LASTX; $i--) {
chomp $lines[$i];
@tmp = &split_decode ($lines[$i]);
%tmp = &array_to_hash (0, @tmp);
$lastlink .= &site_html_last_link (%tmp);
}
for ($i=$#lines; $i>=$#lines - $LASTX2; $i--) {
chomp $lines[$i];
@tmp2 = &split_decode ($lines[$i]);
%tmp2 = &array_to_hash (0, @tmp2);
$lastlink2 .= &site_html_last_link2 (%tmp2);
}

I don't know if these will work. But you can try it. At least this is less intensive in terms of CPU usage, because it only opens the database file once.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------