Gossamer Forum
Home : Products : Links 2.0 : Customization :

Last Link in cgi?

(Page 2 of 2)
> >
Quote Reply
Re: Last Link in cgi? In reply to
%tmp = Temporary hash, like when you build records into a temporary hash (like how categories are put into a temporary hash to be built into category pages).

%rec = Record hash, takes values from records and prints values from the records.

Regards,


------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Last Link in cgi? In reply to
Okay well can you give me some guide lines of where to go from here?

Thanks

Gian
Quote Reply
Re: Last Link in cgi? In reply to
Get a Perl book and use it. Go to perl.com and look for codes that may help you.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Last Link in cgi? In reply to
Okay....
well thanks for that eliot.

Regards

Gian
Quote Reply
Re: Last Link in cgi? In reply to
WhoooHoo!!! I get to help!!!

FWIW this is what I am using to do this at my page:

the cgi file (mostly stolen from here earlier):

#!/usr/bin/perl
$num_links = 0;
print "Content-type: text/plain\n\n";

my $LASTX = $num_links;
open (DB, "<admin/data/links.db");
my @lines = <DB>;
close DB;

#setup table
print qq|
<table>
|;
for ($i=$#lines; $i>=$#lines - $LASTX; $i--) {
chomp $lines[$i];
@fields = split(/\|/,$lines[$i]);
#----UNFORMATTED----
#foreach $field (@fields) {print "$field\n"};
#----FORMATTED----
print '<TR><TD><A HREF=';
print @fields[2].'>';
print @fields[1].'</A>';
print '</TD></TR>';
print "\n";
}
#close table
print qq|
</table>
|;


the shtml file is:

<HTML>
<p><font color="#000000" face="Arial Black" size="5"><b>These are my last few
links:</b></font></p>
<p> </p>
<p> </p>
<!--#exec cgi="cgi-bin/links/lastlink.cgi"-->

</HTML>


As you can see the script just drops the entries from links.db into plain links in a table. I would then format the table using css.

Hope this helps someone cause you all are always bailing me out.


joe
Quote Reply
Re: Last Link in cgi? In reply to
WOW MAN!!!
a few tweaks to suit my site
and it WORKS LIKE A DREAM!!!!
THANKS A MILLION MAN!!

regards

Gian
> >