Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Bug in top rates :no or one link with rating=10?

Quote Reply
Bug in top rates :no or one link with rating=10?
Hello

i've posted a similar question in customized forum, but i think that the better place is here. Sorry 4 the trouble...

I've seen that on my rates pages in rating section,
only one link with 10 (rating) is allowed.
the others links with 10 (rating + more than 10 votes) are invisible.
(no problem with top rates in votes number section).

--------------Like this------------------------------

Top 10 Resources (by Rating) -- with at least 10 votes

Rating # Votes Resource
10 101 popo
7 10 demo

Top 10 Resources (by Votes) -- with at least 10 votes
Rating # Votes Resource
10 101 popo
10 15 ilaooo
10 11 testie
10 11 lapin
7 10 demo

You can see that 3 others links with rating = 10 (ilaooo, testie and lapin) are invisibles in top ressource by rating ...
if there are more links with rating=10, it seems that
the space between links with ratin=10 and the links with ratings=9.5 or 7 or 5... (rating) become more important...

But if I rated or changed the rating of the 3 others links (ilaooo, testie or lapin) with rating=10, their ratings change and they appear in Top rates by rating :


-------------Like this-------------------------------------


Top 10 Resources (by Rating) -- with at least 10 votes

Rating # Votes Resource
10 101 popo
9.87 15 ilaooo
9.82 11 testie
9.82 11 lapin
7 10 demo

Top 10 Resources (by Votes) -- with at least 10 votes

Rating # Votes Resource
10 101 popo
9.87 15 ilaooo
9.82 11 testie
9.82 11 lapin
7 10 demo


So i supposed that Top rates allows only one links with 10 (rating). But perhaps i have made a mistake...

1) Is my links.db corrupted?
(I've added some links, but when i added some new fields in links.def, i've erased the older links.db and linksid.txt (and other files in data directory), and put new blank links.db and linksid.txt (and the other files in data directory) of links2.zip,
and next, i've added the following links in the links.db (via administration screen) :

3|ilaooo|http://www.ilaoo.com|28-Jul-2000|puloo|dede|de|dede@mail.com|12|Yes|Yes|9.87|15|No|dede|de|de|de|No|Allemand|de|de|de|d|ed|ed|de
4|testie|http://www.biloo.com|28-Jul-2000|puloo|dede|de|dede@mail.com|1|Yes|No|9.82|11|No|dede|de|de|de|No|Espagnol|de|de|de|de|de|de|de
5|lapin|http://www.liloo.com|28-Jul-2000|puloo|de|de|dede@mail.com|10|Yes|No|9.82|11|No|de|de|de|de|No|Allemand|de|de|de|de|de|de|de
6|popo|http://www.pourkoi.com|28-Jul-2000|puloo|de|de|dede@mail.com|10|Yes|No|9.99|101|No|de|de|dede|de|No|Allemand|de|de|de|de|d|e|de
7|demo|http://www.com.com|28-Jul-2000|puloo|de|de|e@mail.com|12|Yes|Yes|7|10|No|de|de|de|de|Yes|Allemand|de|de|de|de|de|de|de

Is my links.db corrupted?


* There is perhaps another problem,
when i've transfered some files with installation of links,
CuteFTP said :
warning ! 414 bare linefields receivec in ASCII mode, File may have not transfer correctly (with template.pl et site_html_template.pl)
Does it matter?

* Or perhaps all is allright,
and top rates allows only one link with rating = 10 ???

Sorry for all my questions and long thread... and
Thanks for your help :o)

Ciao

Jud


PS: Now, I try to add links with rating=10,
but there is no link with rating=10 which appear in top rates by rating. They appear only in the second section with classement by nombers of votes... strange...
Quote Reply
Re: Bug in top rates :no or one link with rating=10? In reply to
You could see the trouble here:
http://percu.com/links/pages/Ratings/index.html

I've reinstalled links2 here.

(when I add a new category and use build all,
i've got a permission 0511, but i don't think it does it matter!)
Building Category: testeuuuh
Subcategories: 0
Links: 0
Making Directory (511): '/home/c02416/links/pages/testeuuuh' ...Made. CHMOD (511) ...Done.
Directory: /home/c02416/links/pages/testeuuuh
Filename : /home/c02416/links/pages/testeuuuh/index.html


Ciao

See U soon

Thanks :o)

Quote Reply
Re: Bug in top rates :no or one link with rating=10? In reply to
511 is just how the Perl gods print 0777.
Code:
#!usr/local/bin/perl
print "content-type: text/html\n\n";
print 0777;
You'll get: 511

--Drew
Quote Reply
Re: Bug in top rates :no or one link with rating=10? In reply to
Hello

Thanks Junko :o)
So 511 chmod is not problem?

Could U tell me if my links.db is corrupted,
i think not, but i'm not sure.
Because I don't know if a | is needed a the end of all the lines.

3|ilaooo|http://www.ilaoo.com|28-Jul-2000|puloo|dede|de|dede@mail.com|12|Yes|Yes|9.87|15|No|dede|de|de|de|No|Allemand|de|de|de|d|ed|ed|de
4|testie|http://www.biloo.com|28-Jul-2000|puloo|dede|de|dede@mail.com|1|Yes|No|9.82|11|No|dede|de|de|de|No|Espagnol|de|de|de|de|de|de|de
5|lapin|http://www.liloo.com|28-Jul-2000|puloo|de|de|dede@mail.com|10|Yes|No|9.82|11|No|de|de|de|de|No|Allemand|de|de|de|de|de|de|de
6|popo|http://www.pourkoi.com|28-Jul-2000|puloo|de|de|dede@mail.com|10|Yes|No|9.99|101|No|de|de|dede|de|No|Allemand|de|de|de|de|d|e|de
7|demo|http://www.com.com|28-Jul-2000|puloo|de|de|e@mail.com|12|Yes|Yes|7|10|No|de|de|de|de|Yes|Allemand|de|de|de|de|de|de|de

Thanks.

Quote Reply
Re: Bug in top rates :no or one link with rating=10? In reply to
There doesn't appear to be any problem with your database. I think you're just getting funky results due the way the top10 codes were written.

--Drew
Quote Reply
Re: Bug in top rates :no or one link with rating=10? In reply to
Hello

Thanks for your help Drew
I understand more how works links.db now.
I've still got a lot questions, for...
later ;o)

Ciao

Jude

Quote Reply
Re: [jude] Bug in top rates :no or one link with rating=10? In reply to
Here's what I have done to make the rating system more fair. To eliminate a site receiving only 10 votes at 10 and becoming the top rated site while a site with 200 votes at 9.65 drops, I have change the defaults.

Go to the links.def in the cgi-bin\links\admin directory.

on lines 70 and 71 modify to:

Rating => 7.5,
Votes => 1,

This will give all new sites one vote at 7.5, from here they can climb or fall depending on their votes. They can never achieve a perfect 10 score eliminating better sites with extremely high ratings.