Forum:Article rating

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Article rating
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 18 January 2013 by Thebrains222.

A few time ago, people on this wiki seemed to want to add page rating on each article like at the end of [[w:c:gamecloud:Pirates|this page]]. I have coded this on [[w:c:gamecloud:|this wiki]] and this is how to add this:

  1. Duplicate [[w:c:gamecloud:MediaWiki:WikiaRating.js|MediaWiki:WikiaRating.js]]
  2. Add this code to MediaWiki:Common.css:
#p-rating div { text-align: center }
#ratingStars a { color: #e3e3e3; font-size: 16px; font-weight: normal; cursor: pointer }
#ratingStars a:hover { color: gold; text-decoration: none }
#ratingStars li {
   background-repeat: no-repeat;
   background-color: transparent;
   list-style: none;
   width: 17px;
   height: 17px;
   float: left;
   text-indent: -9000px;
   padding: 0 1px;
   cursor: pointer;
#ratingStars { height: 20px }
.ratingUser { background-position: 0 -34px }
.ratingAvg { background-position: 0 -17px }
  1. Add this code to [[MediaWiki:Common.js]]:
importedScripts = {}; // object keeping track of included scripts, so a script ain't included twice
 function importScript( page ) {
     if( importedScripts[page] ) {
     importedScripts[page] = true;
     var url = wgScriptPath
             + '/index.php?title='
             + encodeURIComponent( page.replace( / /g, '_' ) )
             + '&action=raw&ctype=text/javascript';
     var scriptElem = document.createElement( 'script' );
     scriptElem.setAttribute( 'src' , url );
     scriptElem.setAttribute( 'type' , 'text/javascript' );
     document.getElementsByTagName( 'head' )[0].appendChild( scriptElem );


If you want, you can put all the javascript code in [[MediaWiki:Common.js]]instead of importing it. You can change the stars by replacing this image by another one:

You can ask me questions [[w:c:gamecloud:User talk:Ftiercel|here]]. Ftiercel ([[w:c:gamecloud:User:Ftiercel|Game Cloud]]) 06:16, November 1, 2012 (UTC)


Comment - Why do we need this, what purpose does it serve. How is the state saved? It's likely to not have access to the backend, which means that it's not global, but specific to each user/ip. What do we get from rated articles? Slayer helmet (c).pngImmo Voted Worst Wikian 2013 Slayer cape (t).png 06:19, November 1, 2012 (UTC)

Each vote is user specific and the average shown is the average of all the rates. Everybody see the same rate. It is persisted in the wiki database and lasts forever. It shows which pages are popular. It can be studied by request like this or shown by markup like <highestrated size="20"/>. It is used by other wikis like uncyclopedia and désencyclopédie for cleanup. It's up to you :) Ftiercel ([[w:c:gamecloud:User:Ftiercel|Game Cloud]]) 06:53, November 1, 2012 (UTC)
We can already find out if a page is popular or not. We can just use wkpoppages to find out how many times a page has been visited. And besides, even if a page has been receiving less traffic, let's say for example Blue cog, we wouldn't delete it anyway per RS:G. HaidroH rune.pngEagle feather 3.pngCandle (blood red).png 1XqyDNM.png Crystal triskelion fragment 3.pngHazelmere's signet ring.png 08:42, November 1, 2012 (UTC)
That tells us if it gets traffic. This tells us if it's good. ʞooɔ 11:12, November 1, 2012 (UTC)

Support - In all honesty, I was looking at wikipedia recently and wondering whether we could make use of something like this to work on Featured articles. As it stands, there has been one successful FA this year and there has been no activity on the nominations page since July. It's currently November....

I'd love to use the rating system for something like that. I see other wikis working hard on making their articles featured/good, but not so much here and it's something I think should change. Whether this is the answer, who knows? As for using wkpoppages (which, until now, I'd never heard of) this rating system seems far easier to get data from. cqm 10:30, 1 Nov 2012 (UTC) (UTC)

Switched to oppose per below comments. cqm 09:40, 4 Dec 2012 (UTC) (UTC)

Support idea - But the specifics could be improved. I like the idea of an article feedback tool because it gives us an idea of which pages need help, and which ones deserve further recognition and prominence. It could also hypothetically be useful for getting more people enwrapped in our loving community.

It would be nice if we could improve the script though.

  • Could we have a central location where all the article ratings for different pages could be viewed?
  • Could we remove specific ratings, and do we care about bad ones and trolls?
  • Could we expand it to rate for more than one attribute like Wikipedia does for Trustworthiness/Objectivity/Completeness/Well-written?
  • Could we make it tell people that they can edit the page and/or talk about what they don't like about it on the talk page? Or let them leave specific comments/suggestions directly through the tool?

The name of the game is really to emulate what the Wikimedia Foundation has done, although there's obviously limits to that because we don't have outside assistance, an extension or a special page because Wikia is lazy and/or doesn't have good priorities. This could probably be a good idea if implemented correctly, although you never know with the RuneScape community. ʞooɔ 11:12, November 1, 2012 (UTC)

mw:Extension:ArticleFeedbackv5 (which is a comments part) isn't available as we don't have MediaWiki 1.20 available to us, and are unlikely to be getting it any time soon judging by how many versions Wikia skipped to get to 1.19. mw:Extension:ArticleFeedback on the other hand should be available to us as it is apparently working with MediaWiki 1.18+. Is it worth asking staff whether they are willing to install such an extension? cqm 11:33, 1 Nov 2012 (UTC) (UTC)
I could definitely see the usefulness with the script being implemented but couldn't the comment part be done with javascript already (a textbox and a submit, submitting to a different location other than wgPageName)? I bet someone could tamper with the script a little to make it work better/to what we want. Hair 12:08, November 1, 2012 (UTC)
Whilst I don't like article comments, they just make the page look cluttered, the advantage they have is the ease of access - they're right there on the page. As a question of feedback there could easily be trolls, spammers, etc. so it's not the best idea to keep it on the page itself.
So to take Hair's idea, maybe submit the comments to a subpage /comments which can attach some sort of date sortkey to the individual comment allowing us to transclude the comment pages onto a central page in order of date, article or both? We can rig up DPL for the central page and then use javascript to submit the comments. cqm 18:08, 1 Nov 2012 (UTC) (UTC)
Wikia said no to the ArticleFeedback extension due to skin compatibility problems (no real surprise there). Apparently they are looking into doing something similar on their "early 2013 roadmap" due to a high level of requests for a way of rating articles. Looks like this script is the best option in the meantime. cqm 13:46, 2 Nov 2012 (UTC) (UTC)

Support - I love the idea. I love if we could find out what the people feel is in need of work. "Could we have a central location where all the article ratings for different pages could be viewed?" I agree with Cook here. I don't feel like this would be useful if we can't see a list of all the pages with ratings, see which ones have the lowest ratings, and work from there. Blaze_fire.png12.png 16:40, November 1, 2012 (UTC)

The ratings can be studied using the markup <highestrated size="10"/>. To view the lowest ratings, it is more complicated but you can use request like this. The lowest ratings are at the bottom of the list. Javascript can process these data. You can also reverse the value in order to easily see the lowest ratings :) Ftiercel ([[w:c:gamecloud:User:Ftiercel|Game Cloud]]) 19:55, November 1, 2012 (UTC)
Okay yeah well that solves that. I totally support this. Let's just make sure that we actually do add an official page for lowest ratings. Blaze_fire.png12.png 05:38, November 8, 2012 (UTC)

Support ratings and sections - I think it'd be better to have sections like what Cook said - Trustworthiness/Objectivity/Completeness/Well-written etc. If we do that, there won't be a need for rating comments, right? That just sounds gross, like article comments. Plethora of easy-to-post spam that no one who cares about the ratings will have time to read. We could expand on this a lot, but I support the basic idea. sssSp7p.pngIjLCqFF.png 19:50, November 1, 2012 (UTC)

Rating comments can be useful in determining what's good with the article, and what needs improvement. There are several major problems with just having rating sections, though.

(1) The biggest one is that it is unrepresentative of the article's readers. The thing with these types of surveys is only the people who think the article or topic is good or crap are going to comment; the people who are neutral or think the article or topic is somewhat good or somewhat bad will rarely rate the article because they won't be as interested in giving their opinions of it. Obviously, these unrepresentative samples lead to distorted results, just consider the Literary Digest survey carried out in 1936 where around two million readers completely failed to predict the outcome of the United States Presidency.

There are many other problems. (2) Topics that people favour over another will get higher ratings even if the articles are of the same quality. (3) Articles the have one very useful attribute may get higher or similar ratings in all the sections, even though another article is overall more "trustworthy" since it's fully referenced etc. For example, if articles on authors have a list of books they have wrote, and people find this very useful, it may get higher ratings than another article that is better overall, but has a bibliography on a separate page. (4) People who rate the articles may have not read the full article and have a complete sense of the article's quality. Shorter articles may have better ratings because it is more likely viewers will read the whole thing.

Obviously, the rating sections system isn't accurate, so it wouldn't be the best system to go by. Smithing (talk | contribs) 16:59, November 2, 2012 (UTC)
1. So would normal article ratings without comments/sections.
2. So would normal article ratings without comments/sections.
3. So would nor- to sum up my comment here, why are you replying to my comment when clearly you don't support the proposal at all? Every point you bring up can be argued against the original proposal of just normal ratings do I don't understand why you're telling me this. <.< sssSp7p.pngIjLCqFF.png 18:07, November 2, 2012 (UTC)
The point I was trying to convey is rating sections are not better than article comments, and there is a use for rating comments, and I did this by comparing the two systems. The original proposal does not concern this, whereas your comment does. As for the original proposal, I'd have to do a bit more research on polling before making my final decision, but I'm satisfied from my research that "rating comments" are better than "rating sections". Smithing (talk | contribs) 18:55, November 2, 2012 (UTC)
You could apply all of your arguments to the original proposal though. Especially the ones about it not being factually accurate due to topics/different people/etc. sssSp7p.pngIjLCqFF.png 18:58, November 2, 2012 (UTC)
Yes, of course. Smithing (talk | contribs) 19:55, November 2, 2012 (UTC)

Comment - The ratings would persist in Wikia's database, and there would be some ways to call up article ratings and the highest-rated articles. The rating is persisted via the API call wkvoteart, which is short for WiKia VOTE ARTicle.

 a proofreader ▸ 

19:55, November 1, 2012 (UTC)

Comment - It's indubitably been brought up before, but how will we deal with trolls giving low ratings "just because"? Will ratings need filtering by a user (which would be an enormous amount of work to do) or will people need to submit a short summary as well (which would discourage so many people) when voting? User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 15:16, November 14, 2012 (UTC)

Well, filtered by a user would be biased. I mean, some people would filter through them and only accept the high ratings. I say go with a short summary. Blaze_fire.png12.png 17:17, November 14, 2012 (UTC)

This request for closure was denied A user has requested closure for Article rating. Request denied. The reason given was: No discussion for two weeks.

Blaze_fire.png12.png 17:12, November 29, 2012 (UTC) Notice of intent - I would close this, but some issues need to be addressed first. There is consensus for having an article rating and commenting system, but an implementation that does this is either not currently available (ArticleFeedback), or not compatible with MediaWiki 1.19 (ArticleFeedbackv5), or may not support comments (wkvoteart). These implementation issues need to be sorted out before a proper closure.

 a proofreader ▸ 

04:58, December 3, 2012 (UTC)

So, it's a choise between ArticleFeedback and wkvoteart then? If that's the case, then I'd be supportive of wkvoteart. I feel as if we could benefit more from ratings than comments. Maybe we could add a little notification to the voting system where it says "Do you have a specific problem with the article? Feel free to edit or discuss it on the talk page!" or something like that. Are ratings able to be deleted? If we find troll ratings, that's what we could do. Delete them, if possible. Blaze_fire.png12.png 05:17, December 3, 2012 (UTC)
As ArticleFeedback is a wikimedia extension, and thus designed for vector and monobook, it is incompatible with Oasis - see above, although I still have the email somewhere if you're interested. The author of wkvoteart has all but vanished from here. I get the feeling that while consensus is there the system we desire will continue to be unavailable to us until an editor here manages to make one.
On the other hand we can wait for Wikia to produce their own version, although that may be some months before they manage to produce a non-buggy version, assuming it's executed well enough for us to want to use it. cqm 10:16, 3 Dec 2012 (UTC) (UTC)
Is there anyone here who could code it? Blaze_fire.png12.png 12:01, December 3, 2012 (UTC)
Certainly. In a vague order of activity, Joeytje50, Matthew2602, Ryan PM, Tyilo and Stewbasic. Failing that maybe one of the regulars of [[w:c:dev|developers wiki]]. cqm 16:39, 3 Dec 2012 (UTC) (UTC)
Hm. We should ask them to do it then. Blaze_fire.png12.png 17:56, December 3, 2012 (UTC)

Strong oppose wkvoteart - I support the general concept of article ratings, I do, but I cannot support using wkvoteart, which is what this proposal is proposing. It achieves what we want just fine, but there are some massive security concerns that need to be addressed. Here's a typical URL used for rating a page with wkvoteart, using a page on my personal wiki as an example.

Do you see any authentication tokens there? Do you see any attempt to make sure the rating is legitimate? I know I don't.

What this means is that you can rate the article just by going to that plain URL; you don't have to worry about anything else, it will work every time. Try clicking that link above and it will work. You don't have to be logged in, you don't even have to have gone to the wiki before. Heck, you don't have to have ever been to Wikia before. That URL scheme is all you need. I deleted my cookies and it worked with no problems. I even tried it on my iPod Touch, with wikis I was 100% certain I had never been to on it. No problems. All you need is that URL, and you're set.

What this means is that wkvoteart is incredibly easy to maliciously manipulate. Like, you have no idea how easy it is. I was messing around with it on my personal wiki, and it took me no more than 23 characters of JavaScript, in conjunction with the proposed script, to massively compromise the ratings for the page, and it only took me 10 seconds to write. For people familiar with JavaScript, imagine a one-line function or ajax call inside a while loop that never stops. Yes, it's that simple.

It would be so easy for even the most novice of JavaScript developers to just come a long and mess up the ratings for an article. Even if they don't understand how wkvoteart works or anything of the sort, it would be so incredibly simple for somebody remotely familiar with the developer tools in their browser to come a long and reverse engineer it.

wkvoteart is tremendously susceptible to botting and other malicious attacks, and as a result, I really don't think we want to use it. What we need is ArticleFeedback, and if Wikia won't let us (I'm sure it wouldn't be that difficult to make it compatible), then we're going to need to hold out for Wikia's in-house solution, whenever that comes. That is, unless somebody can think of/find on Google another extension that does what we need. The idea of doing it ourselves and storing the data in pages works in theory, but it would be susceptible to the same problem of being un-able to determine if the rating is legitimate or not, I'm afraid.

Until someone addresses the concerns I have raised above, I cannot support this proposal. Matt (t)09:05, December 4, 2012 (UTC)

Viability wise, no that extension is not really feasible. We have looked at it before and it would require some major rewriting to fit well into the Wikia skin. Plus there's some database schema changes that would require that we're not entirely comfortable with.
Timothy Quievryn
In other words, they've messed to much with MediaWiki for it to be useable on Wikia. Quite why Wikia can't make do with monobook or vector is beyond me.
I'm also switching to oppose in light of Matthew's concerns. cqm 09:40, 4 Dec 2012 (UTC) (UTC)

New method - I have just been made aware of a rating widget that can be used. An example of it can be seen [[w:c:merlin:The Witch's Quickening|hereand]]the code is below:

/* Ratings/Stars widget code
      You can add more Rating-Widgets in your site,
      just pick some new rating-widget-unique-id (must be positive integer).
      For example (rating-widget-unique-id = 38):
      <div class="rw-ui-container rw-urid-38"></div>
    IMPORTANT: The number must be unique across the entire wiki. [One number = one page]
jQuery(function($) {
        "use strict";
        // Disable on pages without a ratings widget, since it just crashes.
        if (!$('.rw-ui-container').length) return;
        // Async Rating-Widget initialization.
        window.RW_Async_Init = function(){
                advanced: {
                    star: {
                        stars: 10
                    font: {
                        color: "#000"
                    layout: {
                        align: {
                            hor: "center",
                            ver: "top"
                        dir: "ltr"
                size: "medium",
                color: "yellow",
                type: "star"
        // Append Rating-Widget JavaScript library.
        if (typeof(window.RW) === "undefined"){
            // <div class="rw-js-container"> (Part of the interface contract)
            var rw = document.createElement('div');
            rw.className = 'rw-js-container';
            var rw2 = document.createElement("script");
            rw2.type = "text/javascript";
            rw2.src = "";

Drawbacks with this, there doesn't seem to be an easy way to view the ratings across the whole wiki, but I'll have a closer look when I get back from work this evening to go through it in a bit more detail. cqm 10:06, 11 Dec 2012 (UTC) (UTC)

You do know that the if (typeof(window.RW) === "undefined"){ can also be done with $('body').append('<div class="rw-js-container"><script type="text/javascript" src=""></script></code></div>'); right? You've got JQuery, so make use of it :3 JOEYTJE50TALKpull my finger 13:27, December 16, 2012 (UTC)

Comment - Can't we just make a very basic JS forum on the bottom of all page, then it sends it to someplace like: [[Talk:wgPagename/Feedback]]? Because don't we just want feedback on our articles easily from anon's? I don't understand why we're going to the trouble still to include "stars" when it won't make much difference. Just have a text form (and include some stars if that's what we absolutely want). Then it fills it into a template and posts it on that page. Don't see why we need to make this so hard on ourselves. Hair 03:39, December 12, 2012 (UTC)

Personally I think we'd get more participation if we had a quick rating method, rather than only allowing someone to comment on the parts of the article. If it's anything like talk pages most of them will go unanswered and unresolved. cqm 13:24, 12 Dec 2012 (UTC) (UTC)
Do we really need a new comments page? We already have a sufficient talk/discuss space for every page, which is definitely going to gather dust if we add this. The above widget interferes with the page, so I don't know if that'd be helpful. I know this is all negative, but it's something I'd like to point out. Alchez 15:46, December 12, 2012 (UTC)
Ugh no comments please, read above. sssSp7p.pngIjLCqFF.png 16:10, December 12, 2012 (UTC)
@Matthew2602: Where do you see a security hole? I tried what you suggested above and was unable to raise the votescount of my test page above 1. I even tried to vote via PHP to make 100% certain that no cookies were sent. To no avail. I managed to change my vote, but not to add a new one.
I'm sorry to say that, but I believe you're thoroughly mistaken! -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 10:12, December 18, 2012 (UTC)
Ignore my previous post, please! It may not be possible to manipulate wkvoteart directly, but another user just showed me a way to manipulate it indirectly. Matthew2602's assessment was corrrect. -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 14:36, December 18, 2012 (UTC)

Caek. Caek indeed. JOEYTJE50TALKpull my finger 17:47, December 23, 2012 (UTC)

{{Closure|Discussion dead for two weeks}} Blaze_fire.png12.png 07:04, January 6, 2013 (UTC)

Closed - There is consensus to allow Article ratings/comments. However, none of the options presented are suitable due to various flaws and lack of existence. The exact method of implementing Article ratings/comments can be revisited in a future thread when viable options are found. 222 talk 12:03, January 18, 2013 (UTC)