Template:User points: Difference between revisions

From [N8]
Jump to navigation Jump to search
mNo edit summary
updating contributor count for 1.35
Line 2: Line 2:
-->{{#vardefine:pageedits|{{#expr: {{formatnum:{{#show: User:{{BASEPAGENAME}} |?User edit count}}|R}} / 10}}}}<!--
-->{{#vardefine:pageedits|{{#expr: {{formatnum:{{#show: User:{{BASEPAGENAME}} |?User edit count}}|R}} / 10}}}}<!--
-->{{#vardefine:pagecontributors|{{#ask:[[Page creator::User:{{BASEPAGENAME}}]] [[Page author::!User:{{BASEPAGENAME}}]] |format=count}}}}<!--
-->{{#vardefine:pagecontributors|{{#ask:[[Page creator::User:{{BASEPAGENAME}}]] [[Page author::!User:{{BASEPAGENAME}}]] |format=count}}}}<!--
-->{{#vardefine:contributorcounts|{{#ask:[[Page creator::User:{{BASEPAGENAME}}]] [[Page author::!User:{{BASEPAGENAME}}]]  
// counting contributions from other users on your pages
// currently each unique contributor adds counts for how many pages of yours they have edited
-->{{#cadefine:$alleditors|{{#ask:[[Page creator::User:{{BASEPAGENAME}}]] [[Page author::!User:{{BASEPAGENAME}}]]
|?Page author= |format=array
|link=none
|mainlabel=-
|limit=999
}} }}<!--
-->{{#vardefine:contributorcounts|0}}<!--
-->{{#camap:$alleditors|@@@
    |{{#ifeq: @@@|User:{{BASEPAGENAME}}||{{#vardefine:contributorcounts| {{#expr:{{#var:contributorcounts}}+1}} }} }}
    ||}}<!--
   
// old counter (doesnt work in MW1.35)
{{#vardefine:contributorcounts|{{#ask:[[Page creator::User:{{BASEPAGENAME}}]] [[Page author::!User:{{BASEPAGENAME}}]]  
|?Page author |format=valuerank  
|?Page author |format=valuerank  
|link=none  
|link=none  
Line 13: Line 27:
|liststyle=none
|liststyle=none
|limit=999
|limit=999
}}}}<!--
}}}}
 
-->{{#vardefine:creationpoints |{{#expr: {{#var: pagecreations}} * 20}}}}<!--
-->{{#vardefine:creationpoints |{{#expr: {{#var: pagecreations}} * 20}}}}<!--
-->{{#vardefine:editpoints |{{#expr: trunc {{#var: pageedits}} * 5}}}}<!--
-->{{#vardefine:editpoints |{{#expr: trunc {{#var: pageedits}} * 5}}}}<!--
-->{{#vardefine:contributorpoints |{{#expr: ({{#var:finalcount}}-{{#var:pagecontributors}})*5}}}}<!--
-->{{#vardefine:contributorpoints |{{#expr: {{#var:contributorcounts}}*5}}}}<!--
--><div style="padding: 5px; background-color: #001E36; color: #fff; width: 15%; margin-right: 1%; margin-left: 84%";>'''{{BASEPAGENAME}}: User Level'''</div>
--><div style="padding: 5px; background-color: #001E36; color: #fff; width: 15%; margin-right: 1%; margin-left: 84%";>'''{{BASEPAGENAME}}: User Level'''</div>
{{#vardefine:finalpoints|{{#expr: {{#var: creationpoints}} + {{#var: editpoints}} + {{#var: contributorpoints}} }}}}
{{#vardefine:finalpoints|{{#expr: {{#var: creationpoints}} + {{#var: editpoints}} + {{#var: contributorpoints}} }}}}

Revision as of 10:10, 16 February 2021

Template documentation
This documentation is transcluded from Template:User points/doc. [edit] [purge]
This article is about User Point Template. For The Wiki Point System, see Wiki Point System.

The Userpoints Template adds a very detailed bar on the user's page with their current wiki point score. It also connects directly with the leaderboards.

{{User points
|User=(Defaults to {{BASEPAGENAME}} - should be used on user page_
|Hide footer=( optional: yes )
}}
User points: User Level
Expression error: Unexpected < operator. points

Expression error: Unexpected < operator. Property "User points" (as page type) with input value "Expression error: Unexpected < operator." contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.