Gossamer Forum
Home : Products : Links 2.0 : Customization :

is there a way to show the LINKS ID number?

Quote Reply
is there a way to show the LINKS ID number?
hi, is there a way to show all the links ID number on the users side of the script?
Quote Reply
Re: [NeedHelpNow] is there a way to show the LINKS ID number? In reply to
You mean show it next to a link? If so, just have <%ID%> in link.html where ever you want it to show up Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] is there a way to show the LINKS ID number? In reply to
or literally display all ID's used?
Code:
#!/usr/local/bin/perl
my @ids = ();
open (DB, "admin/data/links.db") or die $!;
while (<DB>) {
my $id = $1 if m,^(\d+)\|,;
push @ids, $id;
}
close DB;
print "Content-type: text/plain\n\n";
print "$_\n", foreach (sort {$a <=> $b} @ids);

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] is there a way to show the LINKS ID number? In reply to
Hehe...

Code:
#!/usr/local/bin/perl
my @ids = ();
open (DB, "admin/data/links.db") or die $!;
while (<DB>) { m,^(\d+), and push @ids, $1 }
close DB;
print "Content-type: text/plain\n\n";
print join("\n", sort @ids);

$a <=> $b isn't needed :)

Last edited by:

RedRum: Jan 29, 2002, 3:52 AM
Quote Reply
Re: [RedRum] is there a way to show the LINKS ID number? In reply to
for clarity's sake I prefer to use it anyway.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] is there a way to show the LINKS ID number? In reply to
Bah. More confusing Cool

Last edited by:

RedRum: Jan 29, 2002, 5:31 AM
Quote Reply
Re: [AndyNewby] is there a way to show the LINKS ID number? In reply to
Thankx AndyNewby,

I just wanted to display it next to a link...so that's exactly what I needed....

Thankx again.... Smile