Adiutor/Adapt to the local wiki
< Adiutor
(Redirected from Adiutor/Adapt to local wiki)Step-by-Step guide to adapt Adiutor to your local wiki
editThis guide will help you adapt the "Adiutor" tool to your local MediaWiki-based wiki.
Only users with user interface administrator rights can perform the following adaptation process on their local wiki. Make sure you have the necessary user rights before proceeding.
Step 1: Download Adiutor
editDownload the Adiutor repository from here
Step 2: Clone JavaScript Files
editClone all JavaScript files from the main directory of the Adiutor repository to your wiki with the MediaWiki: prefix.
Step 3: Clone Localization Files and Make Necessary Changes
editClone all JavaScript files from the "localization" folder of the Adiutor repository to your wiki.
After cloning these localization files, you'll need to customize them for your local wiki. This customization includes adjusting notice board links, speedy deletion reasons, block reasons, report reasons, predefined responses for mentors, user warning messages, local wiki-specific content, and translations, among other things.
Here's how to proceed:
- Open each cloned localization file in a text editor or code editor.
- Update the content of each file with the relevant information for your local wiki. This may include:
- Translations: Replace existing translations with translations in your preferred language or customize them to match your wiki's terminology.
- Local wiki-specific data: Add any wiki-specific data or variables required for the tool to work correctly within your wiki's environment.
- Save the changes to each localization file.
- Ensure that the updated localization files are stored in a location accessible to the Adiutor tool on your wiki.
By making these necessary changes to the cloned localization files, you will tailor the Adiutor tool to match the requirements and content of your local wiki.
Step 4: Create ADT-WT Template
editCreate an "ADT-WT" template on your wiki. You can do this by creating a new page with the title "Template:ADT-WT"
- Inside the "Template:ADT-WT" page, add the necessary content.
<div class="ADT-WT-H ADT-H-L{{{1}}}"><strong>{{{2}}}</strong></div>
<div class="ADT-WT-B ADT-B-L{{{1}}}">{{{3}}}</div>
<div class="ADT-WT-F ADT-F-L{{{1}}}"><includeonly>{{{4}}}</includeonly></div>
Step 5: Update Common.css
editAdd the content of the "style.css" file from the "ADT-WT" template to your wiki's "MediaWiki:Common.css" page
/* Add these codes to MediaWiki:Common.css page. */
/* The following lines are used by Adiutor */
/* General styles */
.ADT-WT-H {
padding-top: 15px;
padding-bottom: 15px;
background: white;
padding-left: 20px;
background-repeat: no-repeat;
background-position: 98% 50%;
background-size: 32px;
}
.ADT-WT-B {
padding: 18px;
}
.ADT-WT-F {
padding: 18px;
border-top: none;
padding-top: 20px;
margin-top: -10px;
padding-bottom: 10px;
}
/* Header styles */
.ADT-H-L1 {
border-top: 5px solid #3067cd;
border-left: 1px solid #3067cd;
border-right: 1px solid #3067cd;
background-image: url(https://upload.wikimedia.org/wikipedia/commons/3/37/Eo_circle_blue_info.svg);
}
.ADT-H-L2 {
border-top: 5px solid #ff5d01;
border-left: 1px solid #ff5d01;
border-right: 1px solid #ff5d01;
background-image: url(https://upload.wikimedia.org/wikipedia/commons/4/4c/OOjs_UI_icon_notice-warning.svg);
}
.ADT-H-L3 {
border-top: 5px solid #dd312f;
border-left: 1px solid #dd312f;
border-right: 1px solid #dd312f;
background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/bf/OOjs_UI_icon_notice-destructive.svg);
}
/* Header content styles */
.ADT-B-L1 {
border: 1px solid #3067cd;
border-bottom: none;
}
.ADT-B-L2 {
border: 1px solid #ff5d01;
border-bottom: none;
}
.ADT-B-L3 {
border: 1px solid #dd312f;
border-bottom: none;
}
/* Footer styles */
.ADT-WT-F {
padding: 18px;
padding-top: 10px;
padding-bottom: 10px;
text-align: right;
}
/* Footer content styles */
.ADT-F-L1 {
border: 1px solid #3067cd;
}
.ADT-F-L2 {
border: 1px solid #ff5d01;
}
.ADT-F-L3 {
border: 1px solid #dd312f;
}
/* The above lines are used by Adiutor */
Step 6: Update Language Translations
editUpdate the content of "Gadget-Adiutor-i18.json" with translations in your preferred language. You can find language translations in the "i18n" folder of the Adiutor repository
Step 7: Update Adiutor Options
editUpdate the default Adiutor options in the "Gadget-Adiutor.js" file
var adiutorUserOptionsDefault = {
"myWorks": [],
"myCustomSummaries": [],
"speedyDeletion": {
"csdSendMessageToCreator": true,
"csdLogNominatedPages": true,
"csdLogPageName": "CSD log",
},
"articlesForDeletion": {
"afdSendMessageToCreator": true,
"afdLogNominatedPages": true,
"afdLogPageName": "AFD log",
"afdNominateOpinionsLog": true,
"afdOpinionLogPageName": "AFD opinion log"
},
"proposedDeletion": {
"prdSendMessageToCreator": true,
"prdLogNominatedPages": true,
"prdLogPageName": "PROD log"
},
"status": {
"showMyStatus": true,
"myStatus": "active"
},
"stats": {
"csdRequests": 0,
"afdRequests": 0,
"prodRequests": 0,
"blockRequests": 0,
"userWarnings": 0,
"pageTags": 0,
},
"inlinePageInfo": true,
"showEditSummaries": true,
"adiutorVersion": "v1.2.6"
};
Step 8: Update noticeBoards Variable
editUpdate the "noticeBoards" variable in the "Gadget-Adiutor-AIL.js" file.
var noticeBoards = {
csdCategory: "Candidates for speedy deletion",
userBlockRequestNoticeBoard: "Administrator_intervention_against_vandalism",
afdNoticeBoard: "Articles_for_deletion"
};
Step 9: Create Gadget-Adiutor Page
editCreate a page named "MediaWiki:Gadget-Adiutor" with the content "Adiutor: a tool that assists users in various operations."
Step 10: Edit Gadgets-definition Page
editGo to the "MediaWiki:Gadgets-definition" page in your local wiki and add the following code to show the gadget in the desired category
* Adiutor[ResourceLoader|package|requiresES6|skins=vector,vector-2022,monobook,modern,timeless,minerva|dependencies=mediawiki.api,mediawiki.user,oojs-ui-core,oojs-ui-windows,oojs-ui-widgets,oojs-ui.styles.icons-interactions,oojs-ui.styles.icons-movement,oojs-ui.styles.icons-content,oojs-ui.styles.icons-moderation,oojs-ui-toolbars,oojs-ui.styles.icons-editing-core,oojs-ui.styles.icons-layout,oojs-ui.styles.icons-user,oojs-ui.styles.icons-media,oojs-ui.styles.icons-editing-advanced]|Adiutor.js|Adiutor-AIL.js|Adiutor-AFD.js|Adiutor-AIV.js|Adiutor-BDM.js|Adiutor-CMR.js|Adiutor-COV.js|Adiutor-CSD.js|Adiutor-DAS.js|Adiutor-DEL.js|Adiutor-INF.js|Adiutor-OPT.js|Adiutor-PMR.js|Adiutor-PRD.js|Adiutor-RDR.js|Adiutor-RPP.js|Adiutor-SUM.js|Adiutor-TAG.js|Adiutor-UBM.js|Adiutor-UPW.js|Adiutor-WRN.js|Adiutor.js|Adiutor.css|Adiutor-AFD.json|Adiutor-AIV.json|Adiutor-CMR.json|Adiutor-CSD.json|Adiutor-DAS.json|Adiutor-PMR.json|Adiutor-PRD.json|Adiutor-RDR.json|Adiutor-RPP.json|Adiutor-SUM.json|Adiutor-TAG.json|Adiutor-UBM.json|Adiutor-WRN.json|Adiutor-i18.json
Step 11: Create a Tag
editAfter completing the previous steps, go to the "Special:Tags" page in your local wiki. Here, you will create a tag named "Adiutor" that can be associated with specific actions performed using the tool.
Step 12: Activate Adiutor
edit- To enable and use Adiutor on your wiki, follow these steps:
- Go to the "Preferences" page in your local wiki. You can access it by clicking on your username and selecting "Preferences."
- In the "Preferences" page, navigate to the "Gadgets" section.
- Find the "Adiutor" option in the list of available gadgets.
- Check the corresponding checkbox to activate Adiutor.
- Scroll down and click the "Save" button to save your preferences.
Support
editIf you encounter any issues or have questions during the adaptation process, feel free to reach out to us for support. You can ask for help on your local wiki's discussion page or seek assistance through our talk page or Telegram group, where experienced users can provide guidance.