Template:Display page rating
Jump to navigation
Jump to search
This is the "Display rating" template. It displays a 5-star rating with editing links to submit a new rating if the user is logged in. It should be called in the following format:
{{Display rating|rating
[|Pagename=page]
[|HideCount=true]
[|User=user]}}
Edit the page to see the template text.
Notes for future development: The autoedit link syntax looks like this
{{#autoedit:form=Page rating|link type=|link text={{Display star{{!}}{{{1|}}}}}|target=Votes:{{{pagename|{{FULLPAGENAME}}}}}/{{{user|{{CURRENTLOGGEDUSER}}}}}|query string=Page rating[Page]={{{pagename|{{FULLPAGENAME}}}}}&Page rating[User]={{{user|{{CURRENTLOGGEDUSER}}}}}&Page rating[Rating]=1|tooltip=Rate this canyon 1 star|reload}}
The simplelink syntax looks like this
<simplelink href="{{SERVER}}/api.php?action=sfautoedit&form=Page%20rating&target={{{pagename|{{FULLPAGENAME}}}}}/{{urlencode:{{{user|{{CURRENTLOGGEDUSER}}}}}|PATH}}&Page%20rating[Rating]=4&Page%20rating[Page]={{urlencode:{{{pagename|{{FULLPAGENAME}}}}}|PATH}}&Page%20rating[User]={{urlencode:{{{user|{{CURRENTLOGGEDUSER}}}}}|PATH}}" anchortext="rate"/>
The formlink syntax looks like this
{{#formlink:form=Page rating|link type=|link text={{Display star{{!}}{{{1|}}}}}|target=Votes:{{{pagename|{{FULLPAGENAME}}}}}/{{{user|{{CURRENTLOGGEDUSER}}}}}|popup|reload|tooltip=Rate this canyon|query string=Page rating[Page]={{{pagename|{{FULLPAGENAME}}}}}&Page rating[User]={{{user|{{CURRENTLOGGEDUSER}}}}}&Page rating[Rating]=1}}