Rating system

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Rating system

Benjamin Pelletier
I have a Semantic MediaWiki installation that has a large number of Canyon pages, where each of those pages describes a different hiking trip.  These pages have a number of properties on them, one of them being Quality (how "good" of a trip it is).  Currently, editors can edit the wikitext to change this property.  I would like make a feature that allows people to vote on what Quality they think a particular Canyon is, and then the overall Quality (based on the votes received) would be displayed on the page.  I can think of a few different ways this might be done, but I was hoping to get some advice from people who are really familiar with Semantic MediaWiki for which method is likely to produce the best results with the least effort.

== Single "Voting data" wiki page ==
I could make an extension that automatically edits a particular wiki page (perhaps "Voting data") in response to a click.  It would read the existing content, add the new vote, recalculate ratings, generate semantic properties with those ratings, and save the new page version.  I'm not sure if this is possible, but it seems like the best solution if it is.  Although, there might be a problem eventually if, say, 300 people each vote on 10 canyons, then my page size is going to be like 60k (which may cause performance issues?)

== Stand-alone widget ==
I could make an extension that injects custom PHP that talks to an entirely separate (non-MediaWiki) database to store and report the voting data.  This same approach would work on any website, even if it wasn't a MediaWiki install.  The down side of this approach is that I have no idea how I would (could?) integrate the voting results into a semantic search.  Can semantic data be stored stably in the SMW database without being defined in any wikitext?

== Per-page voting data ==
I could maybe make an extension that automatically edits the current page and injects an additional vote line so all the quality votes for a given page are stored on that page.  But, this seems like the most difficult option, and there would be a bunch of voting data junk in the wikitext content.

Any suggestions?

Thanks!
--Ben



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

Peter Brooks
I'd certainly find such a thing very valuable - I'd use it to allow
people to approve pages, the pages need three levels of approval, so
this would make it much easier for it to be done.

I wouldn't make it as specific as just a voting system - it'd be good
if there was room to make a short comment or to link a file, without
needing to edit the page itself.

Your last option sounds the best. I think, though, that you can do
this with a form at the moment - it's just not as clean and easy is it
could be - for example, my question here:

http://www.mediawiki.org/wiki/Extension_talk:Semantic_Forms#Alternative_icons_for_radiobuttons_-_for_a_checklist._Any_suggestions_of_how_to_achieve_this.3F

It's the same requirement, really, a way of enabling interaction
directly on the page, without a need for users to understand wiki
syntax or to move to another page, or to have a pop-up

On 16 May 2014 04:47, Benjamin Pelletier <[hidden email]> wrote:

> I have a Semantic MediaWiki installation that has a large number of Canyon
> pages, where each of those pages describes a different hiking trip.  These
> pages have a number of properties on them, one of them being Quality (how
> "good" of a trip it is).  Currently, editors can edit the wikitext to change
> this property.  I would like make a feature that allows people to vote on
> what Quality they think a particular Canyon is, and then the overall Quality
> (based on the votes received) would be displayed on the page.  I can think
> of a few different ways this might be done, but I was hoping to get some
> advice from people who are really familiar with Semantic MediaWiki for which
> method is likely to produce the best results with the least effort.
>
> == Single "Voting data" wiki page ==
> I could make an extension that automatically edits a particular wiki page
> (perhaps "Voting data") in response to a click.  It would read the existing
> content, add the new vote, recalculate ratings, generate semantic properties
> with those ratings, and save the new page version.  I'm not sure if this is
> possible, but it seems like the best solution if it is.  Although, there
> might be a problem eventually if, say, 300 people each vote on 10 canyons,
> then my page size is going to be like 60k (which may cause performance
> issues?)
>
> == Stand-alone widget ==
> I could make an extension that injects custom PHP that talks to an entirely
> separate (non-MediaWiki) database to store and report the voting data.  This
> same approach would work on any website, even if it wasn't a MediaWiki
> install.  The down side of this approach is that I have no idea how I would
> (could?) integrate the voting results into a semantic search.  Can semantic
> data be stored stably in the SMW database without being defined in any
> wikitext?
>
> == Per-page voting data ==
> I could maybe make an extension that automatically edits the current page
> and injects an additional vote line so all the quality votes for a given
> page are stored on that page.  But, this seems like the most difficult
> option, and there would be a bunch of voting data junk in the wikitext
> content.
>
> Any suggestions?
>
> Thanks!
> --Ben
>
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

John McClure
Voting is pretty key by my reading - consensus ratings are the property
values of the Canyon page.
Sounds most like a partial form, for adding/maintaining a user's vote
stored as a subobject.
Needs to read some ACL stored such as in HaloACL for user list.
Should not worry about 300 template calls -- convert the template into
PHP parser funciton if poor performance
These votes are surely metadata, so maybe use dublin core properties if
possible within subobjects
sounds like a fun project - good luck!/john

On 5/15/2014 10:32 PM, Peter Brooks wrote:

> I'd certainly find such a thing very valuable - I'd use it to allow
> people to approve pages, the pages need three levels of approval, so
> this would make it much easier for it to be done.
>
> I wouldn't make it as specific as just a voting system - it'd be good
> if there was room to make a short comment or to link a file, without
> needing to edit the page itself.
>
> Your last option sounds the best. I think, though, that you can do
> this with a form at the moment - it's just not as clean and easy is it
> could be - for example, my question here:
>
> http://www.mediawiki.org/wiki/Extension_talk:Semantic_Forms#Alternative_icons_for_radiobuttons_-_for_a_checklist._Any_suggestions_of_how_to_achieve_this.3F
>
> It's the same requirement, really, a way of enabling interaction
> directly on the page, without a need for users to understand wiki
> syntax or to move to another page, or to have a pop-up
>
> On 16 May 2014 04:47, Benjamin Pelletier <[hidden email]> wrote:
>> I have a Semantic MediaWiki installation that has a large number of Canyon
>> pages, where each of those pages describes a different hiking trip.  These
>> pages have a number of properties on them, one of them being Quality (how
>> "good" of a trip it is).  Currently, editors can edit the wikitext to change
>> this property.  I would like make a feature that allows people to vote on
>> what Quality they think a particular Canyon is, and then the overall Quality
>> (based on the votes received) would be displayed on the page.  I can think
>> of a few different ways this might be done, but I was hoping to get some
>> advice from people who are really familiar with Semantic MediaWiki for which
>> method is likely to produce the best results with the least effort.
>>
>> == Single "Voting data" wiki page ==
>> I could make an extension that automatically edits a particular wiki page
>> (perhaps "Voting data") in response to a click.  It would read the existing
>> content, add the new vote, recalculate ratings, generate semantic properties
>> with those ratings, and save the new page version.  I'm not sure if this is
>> possible, but it seems like the best solution if it is.  Although, there
>> might be a problem eventually if, say, 300 people each vote on 10 canyons,
>> then my page size is going to be like 60k (which may cause performance
>> issues?)
>>
>> == Stand-alone widget ==
>> I could make an extension that injects custom PHP that talks to an entirely
>> separate (non-MediaWiki) database to store and report the voting data.  This
>> same approach would work on any website, even if it wasn't a MediaWiki
>> install.  The down side of this approach is that I have no idea how I would
>> (could?) integrate the voting results into a semantic search.  Can semantic
>> data be stored stably in the SMW database without being defined in any
>> wikitext?
>>
>> == Per-page voting data ==
>> I could maybe make an extension that automatically edits the current page
>> and injects an additional vote line so all the quality votes for a given
>> page are stored on that page.  But, this seems like the most difficult
>> option, and there would be a bunch of voting data junk in the wikitext
>> content.
>>
>> Any suggestions?
>>
>> Thanks!
>> --Ben
>>
>>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Semediawiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

planetenxin
In reply to this post by Benjamin Pelletier
Hi Ben,

are you aware of this discussion:
https://semantic-mediawiki.org/wiki/User:Yury_Katkov/s13n_stands_for_semantification

/Alexander

Am 16.05.2014 04:47, schrieb Benjamin Pelletier:

> I have a Semantic MediaWiki installation <http://ropewiki.com/> that has
> a large number of Canyon pages
> <http://ropewiki.com/index.php/Category:Canyons>, where each of those
> pages describes a different hiking trip. These pages
> <http://ropewiki.com/index.php/Havasu_Canyon> have a number of
> properties on them, one of them being Quality (how "good" of a trip it
> is).  Currently, editors can edit the wikitext to change this property.
>   I would like make a feature that allows people to vote on what Quality
> they think a particular Canyon is, and then the overall Quality (based
> on the votes received) would be displayed on the page.  I can think of a
> few different ways this might be done, but I was hoping to get some
> advice from people who are really familiar with Semantic MediaWiki for
> which method is likely to produce the best results with the least effort.
>
> == Single "Voting data" wiki page ==
> I could make an extension that automatically edits a particular wiki
> page (perhaps "Voting data") in response to a click.  It would read the
> existing content, add the new vote, recalculate ratings, generate
> semantic properties with those ratings, and save the new page version.
>   I'm not sure if this is possible, but it seems like the best solution
> if it is.  Although, there might be a problem eventually if, say, 300
> people each vote on 10 canyons, then my page size is going to be like
> 60k (which may cause performance issues?)
>
> == Stand-alone widget ==
> I could make an extension that injects custom PHP that talks to an
> entirely separate (non-MediaWiki) database to store and report the
> voting data.  This same approach would work on any website, even if it
> wasn't a MediaWiki install.  The down side of this approach is that I
> have no idea how I would (could?) integrate the voting results into a
> semantic search.  Can semantic data be stored stably in the SMW database
> without being defined in any wikitext?
>
> == Per-page voting data ==
> I could maybe make an extension that automatically edits the current
> page and injects an additional vote line so all the quality votes for a
> given page are stored on that page.  But, this seems like the most
> difficult option, and there would be a bunch of voting data junk in the
> wikitext content.
>
> Any suggestions?
>
> Thanks!
> --Ben
>
>
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
>
>
>
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

Yaron Koren-2
In reply to this post by Benjamin Pelletier
Hi Ben,

It's not clear to me that this would require any development work. It seems to me that you could have an approach like the following:

- Have a separate page for each vote; it could be structured as a subpage of the user page, or a subpage of the canyon page, or something else - so it could be called "User:Joe User/Big Canyon rating", or "Big Canyon/Joe User rating", or "Rating of Joe User for Big Canyon" or some such.

- Each such page would hold a template with a single field, representing the rating number. The user and canyon wouldn't have to be stored on the page, because the template could extract those from the page title. The template would store all three values (canyon, user, rating) as semantic values.

- On each canyon page, the template would display the average rating for that canyon, using a semantic query (with the "average" format), and might also show the number of votes (using "count"). It would then have a link to a popup form, to let the current user either submit a new rating (if they haven't voted already) or change their rating. You could do that using #formlink, plus the {{CURRENTUSER}} variable from the MyVariables extension.

- The ratings input within the popup form, and the average rating display, could both be done using the familiar "stars" interface, using the Semantic Rating extension (https://www.mediawiki.org/wiki/Extension:Semantic_Rating)

This whole thing is somewhat of a hack (a new page for every rating), but maybe not that bad. Of course, it means that users can change each others' ratings, which is not ideal, but then again malicious users can cause all sorts of mischief within a wiki, if they want to - there are already ways of dealing with that.

-Yaron


On Thu, May 15, 2014 at 10:47 PM, Benjamin Pelletier <[hidden email]> wrote:
I have a Semantic MediaWiki installation that has a large number of Canyon pages, where each of those pages describes a different hiking trip.  These pages have a number of properties on them, one of them being Quality (how "good" of a trip it is).  Currently, editors can edit the wikitext to change this property.  I would like make a feature that allows people to vote on what Quality they think a particular Canyon is, and then the overall Quality (based on the votes received) would be displayed on the page.  I can think of a few different ways this might be done, but I was hoping to get some advice from people who are really familiar with Semantic MediaWiki for which method is likely to produce the best results with the least effort.

== Single "Voting data" wiki page ==
I could make an extension that automatically edits a particular wiki page (perhaps "Voting data") in response to a click.  It would read the existing content, add the new vote, recalculate ratings, generate semantic properties with those ratings, and save the new page version.  I'm not sure if this is possible, but it seems like the best solution if it is.  Although, there might be a problem eventually if, say, 300 people each vote on 10 canyons, then my page size is going to be like 60k (which may cause performance issues?)

== Stand-alone widget ==
I could make an extension that injects custom PHP that talks to an entirely separate (non-MediaWiki) database to store and report the voting data.  This same approach would work on any website, even if it wasn't a MediaWiki install.  The down side of this approach is that I have no idea how I would (could?) integrate the voting results into a semantic search.  Can semantic data be stored stably in the SMW database without being defined in any wikitext?

== Per-page voting data ==
I could maybe make an extension that automatically edits the current page and injects an additional vote line so all the quality votes for a given page are stored on that page.  But, this seems like the most difficult option, and there would be a bunch of voting data junk in the wikitext content.

Any suggestions?

Thanks!
--Ben



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




--
WikiWorks · MediaWiki Consulting · http://wikiworks.com

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

Argbert
In reply to this post by Benjamin Pelletier

Hi,

 

I might be wrong, but I think http://www.mediawiki.org/wiki/Extension:SemanticComments stores comments and ratings on separate pages in another namespace – this could help you out. Works on my SMW 1.8, but I am not sure whether I had to do little adjustments for the version.

 

Kind regards

 

 

Argi

 

Von: Benjamin Pelletier [mailto:[hidden email]]
Gesendet: Freitag, 16. Mai 2014 04:48
An: Semantic MediaWiki developers
Betreff: [SMW-devel] Rating system

 

I have a Semantic MediaWiki installation that has a large number of Canyon pages, where each of those pages describes a different hiking trip.  These pages have a number of properties on them, one of them being Quality (how "good" of a trip it is).  Currently, editors can edit the wikitext to change this property.  I would like make a feature that allows people to vote on what Quality they think a particular Canyon is, and then the overall Quality (based on the votes received) would be displayed on the page.  I can think of a few different ways this might be done, but I was hoping to get some advice from people who are really familiar with Semantic MediaWiki for which method is likely to produce the best results with the least effort.

 

== Single "Voting data" wiki page ==

I could make an extension that automatically edits a particular wiki page (perhaps "Voting data") in response to a click.  It would read the existing content, add the new vote, recalculate ratings, generate semantic properties with those ratings, and save the new page version.  I'm not sure if this is possible, but it seems like the best solution if it is.  Although, there might be a problem eventually if, say, 300 people each vote on 10 canyons, then my page size is going to be like 60k (which may cause performance issues?)

 

== Stand-alone widget ==

I could make an extension that injects custom PHP that talks to an entirely separate (non-MediaWiki) database to store and report the voting data.  This same approach would work on any website, even if it wasn't a MediaWiki install.  The down side of this approach is that I have no idea how I would (could?) integrate the voting results into a semantic search.  Can semantic data be stored stably in the SMW database without being defined in any wikitext?

 

== Per-page voting data ==

I could maybe make an extension that automatically edits the current page and injects an additional vote line so all the quality votes for a given page are stored on that page.  But, this seems like the most difficult option, and there would be a bunch of voting data junk in the wikitext content.

 

Any suggestions?

 

Thanks!

--Ben

 

 


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

rafaelpapa
This post has NOT been accepted by the mailing list yet.
In reply to this post by Benjamin Pelletier
The manual walks you hand-in-hand to writing such extension
http://www.mediawiki.org/wiki/Manual:Tag_extensions/Example

These too can be a good simple base to buid on
http://www.mediawiki.org/wiki/Extension:Poll
http://www.mediawiki.org/wiki/Extension:AJAXPoll
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

cicalese.mitre
This post has NOT been accepted by the mailing list yet.
In reply to this post by Yaron Koren-2
The approach that Yaron suggests is almost exactly what we do in similar situations. However, we place the reviews in a separate namespace as subpages of a dummy page for each item. For example, Joe's review of Big Canyon would be on page Review:Big Canyon/Joe.

I wrote the Semantic Rating extension (https://www.mediawiki.org/wiki/Extension:Semantic_Rating) for exactly this purpose. The Semantic Rating extension is used both for the reviewer to enter the rating value on the review page as well as to display the average rating on the page for the item being reviewed. In addition to the rating, we allow the user to enter on the form some review text that is stored with the rating on the subpage.

We use the EditOwn extension (https://www.mediawiki.org/wiki/Extension:EditOwn) to protect the review namespace. That way, only the user who authored the review can edit it in the future. If they change their mind about a review or something changes about the item they review (a canyon's hiking trails are washed out in a storm or previously damaged trails are rejuvinated), they can go back and update their review, but nobody else can modify it. EditOwn allows you to specify a list of namespaces to exclude from EditOwn protection, but I recently wrote a bit of code to exclude all except for those in a list of namespaces to include. That makes it easier to apply EditOwn protection only to the Review namespace. Of course, this requires that the users providing the review have accounts and are logged in.

The last missing piece of this for us, which is not strictly necessary, is that we use the filtered result format to display the items. We want to have one of the filtering criteria be the average rating of the item (think of showing only the 5 star or 1 star reviews of an item on amazon.com). This requires that the item have its average rating (numerically rounded as appropriate or as HTML text that renders as stars) stored as a property on the item page so it can be accessed in the query. The tricky part about this is that when a new review is added or a review is modified, the properties on the item page need to be recalculated. I recently came across a bit of code that looks like it could work to add a link in the template table from the item page to each review, essentially tricking the item into thinking that each review is a template that the item depends upon. This could be packaged as a parser function or tag function that would be placed on each review page providing a reference to the item page. This is definitely a hack, and I haven't tried it out yet, but it seems that it might solve this problem. However, this is only a problem if you want to be able to filter query results by average rating.
Reply | Threaded
Open this post in threaded view
|

Re: Rating system

Benjamin Pelletier
In reply to this post by Yaron Koren-2
Thanks Yaron, that sounds great to me; not sure why I didn't think of simply adding a namespace for voting pages.  That merges the best aspects of my first and third options.  The things I didn't know before were how to use a popup form (I'll look up #formlink), and I probably would have run into the {{CURRENTUSER}} thing.

Argbert, it sounds like I'll end up making something similar to SemanticComments, but just through existing SMW capabilities rather than writing a new extension.  Thanks for the reference :)

Thanks again!
--Ben


On Fri, May 16, 2014 at 8:41 AM, Yaron Koren <[hidden email]> wrote:
Hi Ben,

It's not clear to me that this would require any development work. It seems to me that you could have an approach like the following:

- Have a separate page for each vote; it could be structured as a subpage of the user page, or a subpage of the canyon page, or something else - so it could be called "User:Joe User/Big Canyon rating", or "Big Canyon/Joe User rating", or "Rating of Joe User for Big Canyon" or some such.

- Each such page would hold a template with a single field, representing the rating number. The user and canyon wouldn't have to be stored on the page, because the template could extract those from the page title. The template would store all three values (canyon, user, rating) as semantic values.

- On each canyon page, the template would display the average rating for that canyon, using a semantic query (with the "average" format), and might also show the number of votes (using "count"). It would then have a link to a popup form, to let the current user either submit a new rating (if they haven't voted already) or change their rating. You could do that using #formlink, plus the {{CURRENTUSER}} variable from the MyVariables extension.

- The ratings input within the popup form, and the average rating display, could both be done using the familiar "stars" interface, using the Semantic Rating extension (https://www.mediawiki.org/wiki/Extension:Semantic_Rating)

This whole thing is somewhat of a hack (a new page for every rating), but maybe not that bad. Of course, it means that users can change each others' ratings, which is not ideal, but then again malicious users can cause all sorts of mischief within a wiki, if they want to - there are already ways of dealing with that.

-Yaron


On Thu, May 15, 2014 at 10:47 PM, Benjamin Pelletier <[hidden email]> wrote:
I have a Semantic MediaWiki installation that has a large number of Canyon pages, where each of those pages describes a different hiking trip.  These pages have a number of properties on them, one of them being Quality (how "good" of a trip it is).  Currently, editors can edit the wikitext to change this property.  I would like make a feature that allows people to vote on what Quality they think a particular Canyon is, and then the overall Quality (based on the votes received) would be displayed on the page.  I can think of a few different ways this might be done, but I was hoping to get some advice from people who are really familiar with Semantic MediaWiki for which method is likely to produce the best results with the least effort.

== Single "Voting data" wiki page ==
I could make an extension that automatically edits a particular wiki page (perhaps "Voting data") in response to a click.  It would read the existing content, add the new vote, recalculate ratings, generate semantic properties with those ratings, and save the new page version.  I'm not sure if this is possible, but it seems like the best solution if it is.  Although, there might be a problem eventually if, say, 300 people each vote on 10 canyons, then my page size is going to be like 60k (which may cause performance issues?)

== Stand-alone widget ==
I could make an extension that injects custom PHP that talks to an entirely separate (non-MediaWiki) database to store and report the voting data.  This same approach would work on any website, even if it wasn't a MediaWiki install.  The down side of this approach is that I have no idea how I would (could?) integrate the voting results into a semantic search.  Can semantic data be stored stably in the SMW database without being defined in any wikitext?

== Per-page voting data ==
I could maybe make an extension that automatically edits the current page and injects an additional vote line so all the quality votes for a given page are stored on that page.  But, this seems like the most difficult option, and there would be a bunch of voting data junk in the wikitext content.

Any suggestions?

Thanks!
--Ben



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




--
WikiWorks · MediaWiki Consulting · http://wikiworks.com


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel