<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
A user may vote on each wiki article. (i.e. the 5 star "Rate this article" feature at the bottom of each wiki page) <br>
According to the the php.api documentation, that voting data appears to be stored in a list called <b>wkvoteart</b>.<br>
<br><b>Goal</b>: <br>When browsing and/or querying semantic data at a wiki it would be powerful to be able to use <br>(i) the community's <i>average vote</i> for an article and/or <br>(ii) the current user's <i>personal vote</i> for an article<br><br>e.g. <br><br>{{#ask: [[Category:Skins]] [[Averagevote::>4.5]] |? = Page }} <br>- to list all skin articles that have an average rating of higher than 4.5<br><br>or<br> <br>{{#ask: [[Personalvote::>3]] |?Category:Skins |?Category:Boats }} <br>- to list all skin and boat articles that the current user has given a 4 or 5 star rating but not a 3 star rating ... and to identify which pages belong to the category Skins and which belong to the category Boats.<br><br><b>The ideal solution:</b><br>For an given article title I can see how to find both <br>(i) the community's average vote "<span style="color: blue;">votesavg</span>" and <br>(ii) the current user's personal vote "<span style="color: blue;">uservote</span>" using:<br><br><b>api.php?action=query&list=wkvoteart&wkuservote&titles=</b><page-name><br><br>So it would be nice if those two pieces of information could become accessible to semantic queries. <b><br>Can any SMW expert see a way to achieving this?</b><br><br><br><b>Hacker's solution</b>: <br>A crude way of achieving almost the same result <i>might</i> be to create a semantic property "has_user_vote" with two values <tt>[[has type:: String; Number]] </tt>and then invite users to add their (username, vote) to a list of values annotated with "has_user_vote"<br><br>The problems with this approach are <br>(1) paranoid users might not want to add their username to the semantic data for an article and <br>(2) the list of users could become unwieldy and <br>(3) a user adding/changing/deleting their personal vote could accidentally (or maliciously) edit another user's vote.<br><br>If I could leverage data in the <b>wkvoteart</b> list then user privacy is better protected and yet the current user could still select pages based on <i>how they have personally voted</i>.<br><br><b>Can anyone suggest a better way of doing this?</b><br><br>
<br><br><br><br /><hr />Bing™ finds low fares by predicting when to book. <a href='http://www.bing.com/travel/deals/airline-ticket-deals.do?form=MTRHPG&publ=WLHMTAG&crea=TXT_MTRHPG_Travel_Travel_TravelDeals_1x1' target='_new'>Try it now.</a></body>
</html>