m (Rebranding: FANDOM → Fandom) |
m (Update.) |
||
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{LangSelect}}</noinclude><includeonly> |
+ | <noinclude>{{LangSelect}}</noinclude><includeonly> |
+ | {{Languages}} |
||
{{Infobox JavaScript |
{{Infobox JavaScript |
||
− | | Image file = Medal Script.png |
+ | | Image file = {{{image|Medal Script.png}}} |
⚫ | |||
⚫ | |||
+ | | Status = stable |
||
⚫ | |||
⚫ | |||
+ | | Using code by = [[User:Thundercraft5|Thundercraft5]] |
||
+ | | Other attribution = [[User:HumansCanWinElves|HumansCanWinElves]] |
||
| Scope = s |
| Scope = s |
||
⚫ | |||
| Updated = {{Updated|MediaWiki:Medals/code.js}} |
| Updated = {{Updated|MediaWiki:Medals/code.js}} |
||
| Code = [[MediaWiki:Medals/code.js|code.js]] |
| Code = [[MediaWiki:Medals/code.js|code.js]] |
||
| Languages = {{l|en}} |
| Languages = {{l|en}} |
||
+ | | Examples = [[w:c:doors-game:User:Aeywoo|DOORS Wiki]] |
||
⚫ | |||
}} |
}} |
||
⚫ | |||
+ | == {{I18n|getMsg|Documentation|installation}} == |
||
⚫ | |||
− | |||
{{Script Install |
{{Script Install |
||
| codepage = Medals/code.js |
| codepage = Medals/code.js |
||
Line 18: | Line 23: | ||
}} |
}} |
||
+ | == {{I18n|getMsg|Documentation|usage}} == |
||
− | == Usage == |
||
− | [[File: |
+ | [[File:Medal script settings.png|thumb|right|250px|{{{setting-interface|Settings interface window}}}]] |
− | All of the script's configs are contained outside of script file, on its own page — Project:Medals, allowing the user to make changes without the [[Help:JavaScript review process|review process]]. Make sure that you have protected this page to admin-only editing! Also, this script allows direct links for images ''only'' from Fandom image's servers like 'images' or 'vignette'. |
+ | {{{usage-intro|All of the script's configs are contained outside of script file, on its own page — Project:Medals, allowing the user to make changes without the [[w:Help:JavaScript review process|review process]]. Make sure that you have protected this page to admin-only editing! Also, this script allows direct links for images ''only'' from Fandom image's servers like 'images' or 'vignette'.}}} |
− | After adding this script into your MediaWiki:ImportJS, go to the Project:Medals page, which will ask you to create new config. Once done, you will be able to edit it via a special interface. |
+ | {{{usage-add|After adding this script into your MediaWiki:ImportJS, go to the Project:Medals page, which will ask you to create new config. Once done, you will be able to edit it via a special interface.}}} |
− | + | {{{usage-subpage|The interface has three sub-pages with own settings: Main, Users and Medals. Here are some explanations about how to fill up the most difficult pages — Main and Users:}}} |
|
− | *Main |
+ | * {{{main|Main}}} |
− | *#Module title — Title of your medal's module. |
+ | *# {{{module-title|Module title — Title of your medal's module.}}} |
− | *#Expand button — If amount of user's medals |
+ | *# {{{expand-button|Expand button — If the amount of user's medals becomes more than twelve, you will see a special button. After clicking on it, you will see a full list of the user's medals.}}} |
− | *#Medal count — Description that will be displayed when you hover the section with amount of medal. |
+ | *# {{{medal-count|Medal count — Description that will be displayed when you hover the section with amount of medal.}}} |
− | *#Medal info page — If you have special page, where you have all |
+ | *# {{{medal-info-page|Medal info page — If you have a special page, where you have all the information about your medals, you should fill this value up and the user will see a special button to check the info.}}} |
− | *#Medal info title — Same as for expand button. |
+ | *# {{{medal-info-title|Medal info title — Same as for expand button.}}} |
− | *#Border left — Image for top-left border picture. If you don't want to use it |
+ | *# {{{border-left|Border left — Image for top-left border picture. If you don't want to use it, leave it blank.}}} |
− | *#Border right — Image for top-right border picture. |
+ | *# {{{border-right|Border right — Image for top-right border picture.}}} |
− | *Users |
+ | * {{{users|Users}}} |
− | *#Add user form — Button, on click of which script will add a new form for user. |
+ | *# {{{add-user-form|Add user form — Button, on click of which script will add a new form for user.}}} |
− | *#Empty area — It's where you should put user's nickname. |
+ | *# {{{empty-area|Empty area — It's where you should put user's nickname.}}} |
− | *#Trash icon — Will remove this section. Simple. |
+ | *# {{{trash-icon|Trash icon — Will remove this section. Simple.}}} |
− | *#Medals — Button, on click of which you will show/hide section with all medals. Near with each medal's name you will see also area, where you can place amount of this medal. |
+ | *# {{{medals|Medals — Button, on click of which you will show/hide section with all medals. Near with each medal's name you will see also area, where you can place amount of this medal.}}} |
− | == Script's classes == |
+ | == {{{script-class-header|Script's classes}}} == |
− | To change some styles of module with medals user can use this classes: |
+ | {{{script-class-intro|To change some styles of module with medals user can use this classes:}}} |
− | + | ; <code>RewardModule</code> |
|
+ | : {{{RewardModule|Medal's module section.}}} |
||
⚫ | |||
+ | ; <code>RewardImage</code> |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | + | ; <code>RewardCount</code> |
|
⚫ | |||
⚫ | |||
+ | : {{{badgetooltip|Script's tooltip.}}} |
||
+ | ; <code>badgetooltiparrow</code> |
||
+ | : {{{badgetooltiparrow|Tooltip's top arrow.}}} |
||
− | == Known issues == |
+ | == {{{known-issues-header|Known issues}}} == |
− | Since this script has its data outside of the script page, there can be some problems with page's cache. Use <code>?action=purge</code> at the end of the URL or the 'Purge page' button on your interface to solve it. |
+ | {{{known-issues-intro|Since this script has its data outside of the script page, there can be some problems with page's cache. Use <code>?action=purge</code> at the end of the URL or the 'Purge page' button on your interface to solve it.}}} |
</includeonly> |
</includeonly> |
Latest revision as of 19:56, 15 November 2022
Medals is a site-wide use script, allowing admins to ignore the custom extension 'Achievements' and create their own achievements and grant them to users, which avoids abusive editing which happens with the default extension.
Installation
Usage
All of the script's configs are contained outside of script file, on its own page — Project:Medals, allowing the user to make changes without the review process. Make sure that you have protected this page to admin-only editing! Also, this script allows direct links for images only from Fandom image's servers like 'images' or 'vignette'.
After adding this script into your MediaWiki:ImportJS, go to the Project:Medals page, which will ask you to create new config. Once done, you will be able to edit it via a special interface.
The interface has three sub-pages with own settings: Main, Users and Medals. Here are some explanations about how to fill up the most difficult pages — Main and Users:
- Main
- Module title — Title of your medal's module.
- Expand button — If the amount of user's medals becomes more than twelve, you will see a special button. After clicking on it, you will see a full list of the user's medals.
- Medal count — Description that will be displayed when you hover the section with amount of medal.
- Medal info page — If you have a special page, where you have all the information about your medals, you should fill this value up and the user will see a special button to check the info.
- Medal info title — Same as for expand button.
- Border left — Image for top-left border picture. If you don't want to use it, leave it blank.
- Border right — Image for top-right border picture.
- Users
- Add user form — Button, on click of which script will add a new form for user.
- Empty area — It's where you should put user's nickname.
- Trash icon — Will remove this section. Simple.
- Medals — Button, on click of which you will show/hide section with all medals. Near with each medal's name you will see also area, where you can place amount of this medal.
Script's classes
To change some styles of module with medals user can use this classes:
RewardModule
- Medal's module section.
RewardImage
- Medal's image block.
RewardCount
- In-image-block section with amount of medal.
badgetooltip
- Script's tooltip.
badgetooltiparrow
- Tooltip's top arrow.
Known issues
Since this script has its data outside of the script page, there can be some problems with page's cache. Use ?action=purge
at the end of the URL or the 'Purge page' button on your interface to solve it.