[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New navigation options (next5.pl)



I believe this is to the particular attention of Alan Glover who made the 
"extra navigation" options available, and anyone who may be using them.  I am 
writing specifically about next5.pl which I had the occasion to examine today 
while considering the nav forms that were Sage's final contribution to Webring.
I have discovered a discrepancy in it's operation.  You will notice that the 
Ringlink list page always begins with the site that you call the list 
from--Webring never did get that right.  Well, when you are dealing with 
smaller list pages, like five, this becomes very important--Webring did get 
that right.  next5.pl, which is based on list.pl, somehow doesn't, so this is 
to report a bug--and hopefully the fix.
The problem is probably line #92 of next5.pl
You will notice that $prevoffset and $nextoffset are assigned values in lines 
90 and 91.  It is essential that $data{'offset'} has the correct value prior to 
determining those values, and it does.  Yet, in line 92, the value of 
$data{'offset'} is modified, giving it an incorrect value just prior to drawing 
up the list.  This line #92 has no equivalent in list.pl, so I don't know where 
it came from.
90:
    $prevoffset = $data{'offset'} - $howmanysites
    + ($howmanysites > $data{'offset'} ? scalar @activesites : 0);
91:
    $nextoffset = $data{'offset'} + $howmanysites
    - ($data{'offset'} + $howmanysites > scalar @activesites - 1 ? scalar 
@activesites : 0);
92:
    $data{'offset'} = $data{'offset'} + 1 - ($data{'offset'} + 1 > scalar 
@activesites - 1 ? scalar @activesites : 0);
Perhaps this line performed some function during Alan's development, or perhaps 
it became added by accident later.  However, the solution is to delete or 
comment out this line.
92, commented out:
#    $data{'offset'} = $data{'offset'} + 1 - ($data{'offset'} + 1 > scalar 
@activesites - 1 ? scalar @activesites : 0);
I don't wish to encourage the use of next5, for the reason of simplicity, and 
that Ringlink's list.pl obviates it.  I struggled with posting this.  The fact 
that some of you use it persuaded me.  If you're going to use it, then it ought 
to work right.
I am truly grateful for Alan's contribution, and for all the work Gunner's team 
puts into this.  I know that the entire Ring community is particularly proud of 
Gunner and his team of collaborators right now.
Yours,
Dave
----- Original Message ----- 
From: "Gunnar Hjalmarsson" <mailbox@gunnar.cc>
To: <ringlinklist@gunnar.cc>
Sent: Sunday, October 01, 2000 08:34
Subject: [ringlinklist] New navigation options
At 18 September Alan Glover wrote:
> 
> I was in discussion with Gunnar before his vacation about this, and
> got his approval to create prev5 and next5 based upon list.pl. I've
> also done skipnext and skipprev, based on next.pl and prev.pl.
next5.pl and prev5.pl are included in Ringlink 1.04. Thanks, Alan!
As some of you might remember, I have been reluctant as regards these
options since I think they are redundant considering the design of the
list page. But I have been convinced that it's appropriate to provide
them as options, especially for them who don't make use of list.pl.
However, I dislike the skipnext and skipprev options. In my opinion they
are for "ring experts" only, and their purpose isn't obvious for the
average visitor. Consequently I have not included them in the Ringlink
distribution.
Instead I have asked Rachelle to make them available at
http://www.rachelle.net/ringlink/additions/, so those of you who want to
confuse your visitors can do so. :)
> If you want to use skipnext/skipprev, you'll also need a slightly
> modified lib/gentools.pm, but I'm hoping Gunnar will include that
> in the release anyway.
I made the necessary modification in the 1.04 version of gentools.pm.
/ Gunnar
P.S. Thanks, Alan, for the skip files as well. I know that some
     ringmasters will appreciate them. :)

Follow-Ups from:
"James S. Huggins (Ringlink)" <Ringlink@ZName.com>
Alan Glover <alan@chorazin.org.uk>

References to:
Gunnar Hjalmarsson <mailbox@gunnar.cc>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]