hi, is there a way to show all the links ID number on the users side of the script?
Jan 28, 2002, 11:41 PM
Veteran / Moderator (18441 posts)
Jan 28, 2002, 11:41 PM
Post #2 of 7
Views: 1993
You mean show it next to a link? If so, just have <%ID%> in link.html where ever you want it to show up
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!
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!
Jan 29, 2002, 12:02 AM
Veteran / Moderator (1936 posts)
Jan 29, 2002, 12:02 AM
Post #3 of 7
Views: 1974
or literally display all ID's used?
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
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
Jan 29, 2002, 3:49 AM
Veteran (19537 posts)
Jan 29, 2002, 3:49 AM
Post #4 of 7
Views: 1961
Hehe...
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 :)
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 :)