Gossamer Forum
Home : Products : Links 2.0 : Customization :

Single page New links and span pages for category

Quote Reply
Single page New links and span pages for category
Hi All,

Searched the resources and forums without succes.:(

I am looking for a "mod" that will allow me to list the New Links page as one page, but will allow me to keep the "sites per page" limit within the categories.

Any help appreciated

Dave

Quote Reply
Re: Single page New links and span pages for category In reply to
Hi Dave,
normaly I think the "New" links are listed on one page.

If you want to delete the overview like:

1 new Link(s):
Monday, 11. June 2001 (1).


you could use a simple script I've written, the "Dynamic New Mod" (http://www.simball.de/links_mods/).

Set the following:
Code:
# links per page
$span = 15;
to something like this:
Code:
# links per page
$span = 1000;
Hope that help's.

DelPierro
http://www.simball.de/links_mods/
Quote Reply
Re: Single page New links and span pages for category In reply to
Hi DelPierro,

Thanks, I like that Mod.:) Not exactly what I was looking for, but it may do the trick.

Your mod, lists the new sites with the "oldest" new site first? Can it be changed so that the "newest" new site is listed first?

Dave






Quote Reply
Re: Single page New links and span pages for category In reply to
Hi,
I try the following to sort, but I won't work.
The datafile is the same as the links.db file, but only with the new added links in it.

Code:
$count=0;
open (DATA, "$datafile") or die "<p>Problem opening data file.\n";
# flock (DATA, 2);
while () {
chomp ($line = <DATA>);
!$line and last;
($id, $title, $url, $rec{date}) = split /\|/, $line;
$data{$name} = { %rec };
$count++;
}
# flock (DATA, 8);
close (DATA);

# Sort data
$i=0;
foreach $rec (sort {$data{$b}{date} <=> $data{$a}{date}} keys (%data)) {
(($i < $count) or (!$rec)) or last;
push @popular, $rec;
$i++;
}
map { $popular .= &ranking_output ($data{$_}) } @popular;
And the following sub.

Code:
sub ranking_output {
$ref = $data{$_};
$output .= qq|$ref->{date}
\n|;
return ($output);
}
But the $output is only the date of the newest record.
Has anyone a solution?

DelPierro
http://www.simball.de/links_mods/
Quote Reply
Re: Single page New links and span pages for category In reply to
Thanks DelPierro,

Sorry for the late reply..:((

Couldnt get it to work either.:(

Dave