Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Anyway to give submits a default rating?

Quote Reply
Anyway to give submits a default rating?
Actually I wanted to do it by user so that some submits would automatically get a higher rating.
I'm a very boring lady, very, very boring.
Quote Reply
Re: [Cleo_] Anyway to give submits a default rating? In reply to
Yeah, there are a bunch of ways, all require a bit of coding though.

For what you want to do, you need to add a column to the Users table, User_Default_Rating.

Now, do you want to give 1 vote with that rating, or nn votes with that rating? Links usually need a default number of votes before they go into the ratings system.

Also, do you want the User_Default_Rating to be a calculated value, based on, perhaps, the users average rating?

I can see this as a modification to my My_Ratings plugin.

How this would work, briefly, is you'd create a user "My_Ratings" and that user would cast a vote when a link was added, based on the value in the User_Default_Rating field for that user, _or_ would cast a "User_Average_Rating" vote.

Because the My_Ratings program tracks votes by each user, it can do something like this with a bit of modification -- eg: a hook into user_add_link_post and a new subroutine. I think the default/average values are already calculated for the user.

Options would be:
1) User_Default_Rating only (if a user has a default rating, upgrade the link)
2) User_Default_Rating_Average (if a user has a default rating, use it, otherwise use average rating)
2a) User_Default_Rating_Average_Higher (use higher of Default rating or average rating)
3) User_Average_Rating (use the average rating reguardless of User_Default_Rating).
4) Give_NN_Votes (how many votes to enable with that rating -- default is 1 vote -- more than 1 vote, and the "Old Rating" dual system kicks in.).

This plugin is in evolution, but you can see it work on http://postcards.com (I think). If you cast a vote for an image, the "new ratings" system kicks in, and starts tallying votes. It coexists with the "old ratings" by moving them to a new column, and then averaging everything together to get a total ranking.

The display is not really elegant, but it gets the job done, and it's template/global based so you can muck with it if you want to..

I've added this to the mile-long todo list. If you want/need this now, contact me via PM, and I can give you a cost to get it modified now. Otherwise, it could be 6 months to a year before it gets done. (Or it could be next week, if I suddenly see a need for it on our sites...)

I don't even remember if the My_Ratings was a free or charged plugin.... I think I released some of the code to the forum over the past few years, but I think it became part of the Ultra package. That's Andy's area.

PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Anyway to give submits a default rating? In reply to
I'm using the user rating to control how high up on the category pages.

On my build page I have
Rating DESC,RandomID DESC

I give affiliate listings a rating of 10, my promotional sites a 8, link trades 5 and so on.

I like to have friends submits to automatically be giving a rating of 4 so that they would appear right after my link trades.

I do not have voting or rating of links enabled for my surfers. I also do not have the What's Cool or Top Rated pages enabled.

I'm only using the Rating to control placement on the page, nothing else.
I'm a very boring lady, very, very boring.