Gossamer Forum
Home : Products : Gossamer Links : Discussions :

A new system of rating links

Quote Reply
A new system of rating links
Hi,

I would to create a system of rating the links, different from the one existing.
When inserting a link the administrator should give values to various criteria. For instance
criteria1= 5, criteria2 = 10 , criteria3=2 . If the average of the criteria is above 10 the link should be visible on the directory.

Is there any plugin that could do that? Is anybody has done something like that?

My first idea would that when the administrator insert the data and click on "Add links", to insert in a field called "average" the average of the values of criteria1, criteria2, criteria2, criteria3.
How I could do this?

Then to display only links who have a value of average superior to a certain value, as it happens when only links which has been validated.
How I could do this?

Thanks in advance for your answers.

Vercyb
Quote Reply
Re: [vercyb] A new system of rating links In reply to
So your pretty much asking the administrator to grade the link by pre-defined characteristics three differerent times, and if the average of these grades is higher than 10, then validate the link?

I do not see a reason for an Administrator to rate a link to decide rather or not it should be visible in the database. Since the Admin already has to view the link manually, it would be quicker and easier (to me) for the Admin to just validate the link or don't.

Maybe I am misunderstanding...?

- Jonathan
Quote Reply
Re: [jdgamble] A new system of rating links In reply to
In Reply To:
So your pretty much asking the administrator to grade the link by pre-defined characteristics three differerent times, and if the average of these grades is higher than 10, then validate the link?

I do not see a reason for an Administrator to rate a link to decide rather or not it should be visible in the database. Since the Admin already has to view the link manually, it would be quicker and easier (to me) for the Admin to just validate the link or don't.

Maybe I am misunderstanding...?


In reality it should be more complicated; there will be much more that 3 criteria. The idea is that a link will be visible only if it satisfies certain conditions about the criteria (thresholds and average). The description I have given may seem stupid because it is very simplified and I need to do t technically.
Quote Reply
Re: [vercyb] A new system of rating links In reply to
Well, because links already displays links by isValidated set to Yes or No, I suggest you make a way to change that. Add all your fields to the link. Maybe write an external script that gets each field for every link:
Code:

foreach $ID etc...

my ($table, $sth, $fields);

$table = $DB->table('Links');
$sth = $table->select ( { LinkID => $ID }, ['criteria_field1', 'criterial_field2', 'etc'] );

while ($fields = $sth->fetchrow_hashref) {

my $sum = $fields->{criteria1} + $fields{criteria2} + $fields{criteria3};

my $quotient = $sum / 3;

}

if ($quotient > 9) {

$table->update( { isValidated => Yes }, { LinkID => $ID } );

}


Something like that....

Don't know exactly what your talking about, but here is a start...

- Jonathan

Last edited by:

jdgamble: Jan 25, 2005, 2:15 PM