More balanced Group Listing according to Ratings [DONE]

old granted and denied feature requests

Moderator: AniDB

bloodhound
Posts: 1
Joined: Mon Nov 22, 2004 1:48 am

More balanced Group Listing according to Ratings [DONE]

Post by bloodhound »

Need to consider the number of people who rated that site as well.

for example. there are currently 15+ groups rated at 10.00 but voted by only one person. While groups like ZX and KAA have 300+ votes, and have rating of 8.50+. but they still appear way down on the list if sorted by rating. is there a way to fix this?
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Re: More balanced Group Listing according to Ratings

Post by pelican »

bloodhound wrote:Need to consider the number of people who rated that site as well.

for example. there are currently 15+ groups rated at 10.00 but voted by only one person. While groups like ZX and KAA have 300+ votes, and have rating of 8.50+. but they still appear way down on the list if sorted by rating. is there a way to fix this?
I can't speak for zx, but KAA doesn't even deserve the position it currently has, as it was mainly obtained by inviting people from their own forum to join anidb specifically to vote for their group. (I would hope that you would be able to see why this might skew ratings.)

Group ratings are, I believe, not shown if less than a certain number of people (10?) have voted for the group, though, and this could be taken further, with a statistical measure weighting ratings for the purpose of sorting.
nwa
AniDB Staff
Posts: 585
Joined: Sat Jun 07, 2003 10:51 am

Post by nwa »

these votes should become void sometimes in the future anyway... for more accurate ratings, it's best to vote for groups per anime... which I've been doing for a while now.
If there are enough such group per anime votes.. the current group rating system will be taken down.. or so EXP says :P
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Re: More balanced Group Listing according to Ratings

Post by exp »

pelican wrote:Group ratings are, I believe, not shown if less than a certain number of people (10?) have voted for the group, though, and this could be taken further, with a statistical measure weighting ratings for the purpose of sorting.
as was already written elsewhere the current group ratings will be replaced with the average of the anime<->group votes for the group at some point.

BYe!
EXP
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Re: More balanced Group Listing according to Ratings

Post by pelican »

exp wrote:as was already written elsewhere the current group ratings will be replaced with the average of the anime<->group votes for the group at some point.
In that case, can I renew my request to remove this feature's dependency on client side scripting? :)

(<noscript> will work if nothing else. Please?)
Elberet
Posts: 778
Joined: Sat Jul 19, 2003 8:14 pm

Post by Elberet »

Current:

Code: Select all

	<tr>
	<td></td>
	<td> <a href="animedb.pl?show=group&gid=1363">Solar Fansubs & Anime-Faith</a> </td>
	<td align="right"> 5 </td>
	<td align="center"> ongoing </td>

	<td> <b>23.11.2004</b> </td>
	<td align="center">  - (6) </td>
	<td align="right"> <a href="#" onclick="popup('animedb.pl?show=pop&pop=agcmts&id=8735',400,500,0,0,'agcmts'); return(0);">[0]</a> </td>
	<td align="center">
	     <a href="#" onclick="popup('animedb.pl?show=pop&pop=agvote&id=8735',380,160,0,0,'agvote'); return(0);"> [rate it]</a> 
	    </td>

	</tr>
Revised:

Code: Select all

	<tr>
	<td></td>
	<td> <a href="animedb.pl?show=group&gid=1363">Solar Fansubs & Anime-Faith</a> </td>
	<td align="right"> 5 </td>
	<td align="center"> ongoing </td>

	<td> <b>23.11.2004</b> </td>
	<td align="center">  - (6) </td>
	<td align="right"> <a href="animedb.pl?show=pop&pop=agcmts&id=8735" onclick="popup('animedb.pl?show=pop&pop=agcmts&id=8735',400,500,0,0,'agcmts'); return(0);">[0]</a> </td>
	<td align="center">
	     <a href="animedb.pl?show=pop&pop=agvote&id=8735" onclick="popup('animedb.pl?show=pop&pop=agvote&id=8735',380,160,0,0,'agvote'); return(0);"> [rate it]</a> 
	    </td>

	</tr>
That's a very minor change. For clients without support for client-side scripting, the regular link will take the user to the appropriate vote page. For clients with scripting, the return(0) statement will prevent the link from firing and moving the user to a different page when, instead of that, the voting page loads in a popup window.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

IIRC that doesn't work in opera, elberet.

pelican, I guess that could be done, feel free to post the changed code.

BYe!
EXP
Elberet
Posts: 778
Joined: Sat Jul 19, 2003 8:14 pm

Post by Elberet »

Opera is evil, and if it doesn't halt a link-click-event when an associated onclick js-event returns false, that's IMO a bug in Opera's JS implementation that we shouldn't have to care about. :?
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

Elberet wrote:Opera is evil, and if it doesn't halt a link-click-event when an associated onclick js-event returns false, that's IMO a bug in Opera's JS implementation that we shouldn't have to care about. :?
I don't care about M$ IE, but it everything we do should at least work in firefox and opera.

BYe!
EXP
DonGato
Posts: 1296
Joined: Sun Nov 17, 2002 9:08 pm
Location: The Pampas, The land of the Gaucho!
Contact:

Post by DonGato »

You will have to do a lot to fix all Opera stupid behaviors. :?
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Post by pelican »

If it'll get you to actually make the change, here's the same sample as above, but with added <noscript>, although the only thing worth modifying is the code that generates this: (I haven't got any notifies at the moment, so I can't post the equivalent code for that feature, which also relies on scripting, although that is alleviated by the history view, which doesn't and is more useful, anyway.)

Code: Select all

	<tr>

	<td></td>
	<td> <a href="animedb.pl?show=group&gid=1363">Solar Fansubs & Anime-Faith</a> </td>
	<td align="right"> 5 </td>
	<td align="center"> ongoing </td>

	<td> <b>23.11.2004</b> </td>
	<td align="center">  - (6) </td>
	<script type="text/javascript">
	<!--
		document.write("<td align='right'> <a href='#' onclick=\"popup('animedb.pl?show=pop&pop=agcmts&id=8735',400,500,0,0,'agcmts'); return 0;\">[0]</a> </td>"
			+ "<td align='center'> <a href='#' onclick=\"popup('animedb.pl?show=pop&pop=agvote&id=8735',380,160,0,0,'agvote'); return 0;\">[rate it]</a> </td>");
	//-->
	</script>
	<noscript>
		<td align='right'> <a target='_blank' href='animedb.pl?show=pop&pop=agcmts&id=8735'>[0]</a> </td>
		<td align='center'> <a target='_blank' href='animedb.pl?show=pop&pop=agvote&id=8735'>[rate it]</a> </td>
	</noscript>

	</tr>
(I haven't got a browser with scripting support around to test this, but it's probably fine or only has a small typographical error or such.)

In case phpBB tries to be intelligent (ha!) and translates the ampersand character entities in the URLs (and one in the text) (no bare ampersands, please! This mistake is to blame for at least one outstanding (afaik at the time of writing) bug in anidb!), I will inform you here: all ampersands in the href attributes have been replaced by the `amp' character entity.
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Post by pelican »

Actually, I'm pretty sure that that isn't quite 100% valid HTML, but it'll render anywhere regardless, I think, and anidb does far worse. (I could make it valid HTML easily enough if I was writing the generating script, but doing it by hand is just painful.)
Elberet
Posts: 778
Joined: Sat Jul 19, 2003 8:14 pm

Post by Elberet »

<noscript> may only appear within a <script> block. Browsers that do know how to handle client-side scripts will ignore any and all text in the <noscript>-block, while browsers that don't know will print all text in the <script> and <noscript> blocks as is - hence the script itself should be commented out as this:

Code: Select all

<script language="...">
<!--
  script...
// -->
  <noscript>
    error, no scripting support!
  </noscript>
</script>
If you want to make use of the <noscript> block, you'd have to replace the whole content of the relevant table cell with a <script>. The script in there uses document.write to generate the regular link with the onclick handler, while the <noscript> block contains the same thing as a direct link instead of using javascript.
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Post by pelican »

Elberet wrote:<noscript> may only appear within a <script> block.
I hate to tell you this (this is a lie - I love correcting people), but a noscript element absolutely _cannot_ appear in a script element (no other elements can). And you don't even need to review the dtd to find the correct usage - the w3c example of the noscript feature is of the form <script></script><noscript></noscript>

Elberet wrote:Browsers that do know how to handle client-side scripts will ignore ... should be commented ...
Yes, yes, yes, I am aware of that (and would think that exp is) and did practice the latter. The former is, of course, the basis of the method.

For your information, the problem with my HTML is that a script element cannot appear directly inside a tr element (only td and th are allowed there). However, most browsers will allow scripts anywhere for simplicity.
Elberet wrote:If you want to make use of the <noscript> block, you'd have to replace the whole content of the relevant table cell with a <script>.
Which is what I did; this is truly just like precognition, except for the `pre' part.
Elberet
Posts: 778
Joined: Sat Jul 19, 2003 8:14 pm

Post by Elberet »

Duh, now I see. -_-" How the heck the whole <script> part slipped past my attention is a mystery, really... I'm sure it doesn't have anything to do with me multitasking between IRC, watching the latest Gankutsuou episode and posting in the forum, for sure! :oops: :mrgreen:

Image
Locked