Topic on Extension talk:Semantic Rating/Flow

Rating a wiki page using form

3
Mohnish kamble (talkcontribs)

Hey Cindy,

Thanks for the extension.

Can you please elaborate on this:

Displaying the Result of a Semantic Query as a Five Star Rating[edit]

Below are several more advanced examples that illustrate how this extension can be used.

Consider the case where users can review a wiki page. In this example, each review is itself a wiki page in category Reviews. Each review page has a property, Item, that is a link to the page being reviewed. Each review page also has a property, Rating, that has a value between 1 and 5 (with 0 being reserved for the case where no rating is assigned).

On the page being reviewed, the page's average rating can be displayed by the following query:

{{#rating:{{#ask:[[Category:Reviews]][[Item::{{FULLPAGENAME}}]]|?Rating|format=average}}}}

What is "review page has a property" here?

Is it the same as that of creating a property with a type, for templates?

How can I provide a link to page being reviewed to the property Item?

Also, what is {{FULLPAGENAME}}, is it any variable or the full name of the page that has to be reviewed?

Thanks for your time!

Cindy.cicalese (talkcontribs)

> What is "review page has a property" here?

For example, there may be a page named Review:100 that has the wikitext Item::Book:123 on it. That wikitext creates a property of type Page that links the review (Review:100) to the item being reviewed (Book:123). So, review page Review:100 has property Item on it.

> Is it the same as that of creating a property with a type, for templates?

I'm not sure about the "for templates" part of your question, but there may also be a page Property:Item that has the wikitext Has type::Page on it to declare the Item property to be of type Page. This is optional, since Page is the default type for properties.

> How can I provide a link to page being reviewed to the property Item?

That's the Item::Book:123 part described above.

> Also, what is Topic:Tfqw3t3r154d2gx8, is it any variable or the full name of the page that has to be reviewed?

It is the full name of the page being reviewed given by the magic word FULLPAGENAME. See https://www.mediawiki.org/wiki/Help:Magic_words#Page_names.

Mohnish kamble (talkcontribs)

Alright, that helped me.

Thanks a lot Cindy.

Reply to "Rating a wiki page using form"