Wikipedia:WikiProject Articles for creation/Helper script
![]() | The WikiProject banner below should be moved to this page's talk page. If this is a demonstration of the template, please set the parameter |category=no to prevent this page being miscategorised. |
![]() | Articles for creation Project‑class | ||||||
|
![]() | |
Original author(s) | User:Timotheus Canens |
---|---|
Developer(s) | User:mabdul |
Stable release | 4.1.12
/ 24 June 2012 |
Preview release | 4.1.13
/ 24 June 2012 |
Written in | JavaScript (using Ajax, CSS, and HTML) |
Platform | web browser |
Available in | English |
Yet another AFC Helper Script is a Wikipedia script designed to help when reviewing Articles for creation article and redirect submissions.
Instructions
Installation
- To install the script, simply add the following line to your account's common JavaScript file. The tool is tested on Monobook, Modern and Vector (the default skin). So, if you were using Vector, you would add the following to Special:MyPage/vector.js:
importScript('User:Timotheus Canens/afchelper4.js'); // Yet another AfC helper script v4.
- After this, you must clear your browser's cache.
Usage
If the installation was done properly, you should see a "review" tab on the top of the page when viewing a submission in CAT:AFC or when reviewing WP:AFC/R; it may be a drop-down tab. Note that the tab will only appear when viewing a page that is a subpage of Wikipedia:Articles for creation or Wikipedia talk:Articles for creation. Misplaced submissions must be moved to the proper location first.
Reviewing an article submission
The "review" tab
When clicked, the review tab brings up 5 buttons:
- Accept
- Decline
- Comment
- Mark as reviewing
- Clean the submission
Accepting
Once you are satisfied that the submission should be accepted, simply click the "accept" button. You will be prompted to enter the title of the page to move to (by default the name of the AFC subpage) and to assess the article. You can also enter some additional wikitext that will be appended to the article (for example, stub tags and categories) and/or its talk page (for example, WikiProject banners).
The script currently does the following:
- It extracts the author from the first {{afc submission}} tag, if there is such a tag, and notifies them.
- It moves the submission to mainspace.
- It removes all {{afc submission}} and {{afc comment}} templates from the article.
- It removes all other templates starting with {{afc from the article and does some additional cleanup. If there are other templates in the template parameters, however, it will not work properly. It cannot remove subst'd templates.
- It optionally appends some text to the article (useful for adding stub tags or categories in one go).
- It records the assessment on the talk page, and optionally adds some extra text.
- It records the creation at WP:Articles for creation/recent.
- It uncomments categories like [[:Category:XXX]].
Known issues:
- If a page is blacklisted and the reviewer has neither the account creator right nor admin right, the error message "Error info:hookaborted : The modification you tried to make was aborted by an extension hook" will occur and the page won't get moved. Please find an admin (or account creator) to accept the page, e.g. by asking at WT:AFC.
Declining a submission
If the submission should be declined, click the "decline" button. You will be prompted to select or enter a reason for declining. There are also three possible options:
- Notify if possible - if checked, the script will try to notify the creator. On by default.
- Blank - if checked, will replace the content with {{afc cleared}}; on by default if the decline reason is copyvio or BLP; otherwise off by default.
Once you click "submit", the script does the following:
- If you have not entered any reason, it aborts.
- If you have selected a reason and entered a custom reason, it puts the custom reason as a comment in a {{afc comment}}.
- It notifies the author about the Teahouse project, if requested.
- It blanks the submission, if requested.
- It cleans the submission page.
Commenting
The "comment" button can be used to insert a comment in the page. It is placed right before the first horizontal line, if there is one, or otherwise right after the AfC template. It also cleans the submission page.
Marking as being reviewed
This should be self-explanatory, it also cleans the submission page.
Clean the submission
This should be self-explanatory. At the moment following tasks will be done
- Unnecessary submission templates will be removed (duplicated pending submission, drafted submission if other pending or declined submission is placed)
- removes many HTML comments (mostly added through the wizard)
- submission and comment template sorting (and moving to the top
- removes {{userspacedraft}}, {{userspace draft}}, {{user sandbox}}
- commenting out categories (see also #Accepting)
- wikilink correction
- [[http://en.wikipedia.org/wiki/Foo|foo]] --> [[Foo|foo]]
- [[http://en.wikipedia.org/wiki/Foo|bar]] --> [[Foo|bar]]
- [[http://en.wikipedia.org/wiki/Foo foo]] --> [[Foo|foo]]
- [http://en.wikipedia.org/wiki/Foo bar] --> [[Foo|bar]]
- and other variations (e.g. secure links; please report unnoticed variations)
Reviewing redirect and category submissions at WP:AFC/R
At the top of WP:AFC/R, there should be a "review" tab. Click on it, and the script will list all redirects and categories submissions not yet reviewed. Pick an action for some (or all) of them, which may be "accept", "decline", or "comment", fill in the applicable info, click "Done", and the script will do its job.
- It will not overwrite a page that already exists.
- It will not automatically add categories to the pages.
Acknowledgement & Disclaimer
Great thanks are due to be had by User:Mr.Z-man and his closeAFD script, from which this script is adapted.
The format of this page is shamelessly plagiarized from User talk:The Earwig/afc-helper.js.
A beta script is available at User:Mabdul/afc beta.js. Be careful, although the script is already tested, changed or new functionalities might not work properly. Please report (or in general) bug reports and feature requests at User talk:Mabdul/afc beta.js.