Wikipedia:WikiProject Articles for creation/Helper script
Main page | Talk page | Submissions Category, Sorting, Feed | Showcase | Participants Apply, By subject | Reviewing instructions | Help desk | Backlog drives |
Articles for creation helper script | |
---|---|
![]() | |
Original author(s) | Timotheus Canens |
Developer(s) | mabdul |
Stable release | 4.1.13
/ 26 June 2012 |
Preview release | 4.1.14a
/ Updated multiple times every day |
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. It is currently the only script officially recognized and supported by WikiProject Articles for creation.
Installation
To install the script, simply add the following line of code to your account's common JavaScript file or to your skin's JavaScript file:
importScript('User:Timotheus Canens/afchelper4.js'); // Yet another AfC helper script v4.
After doing that, you must clear your browser's cache to finish installing the script. After that, you should be ready to go!
Compatibility
- This script has been tested compatible on the following browsers:
- Internet Explorer 7+
- Mozilla Firefox 13.0.1+
- Apple Safari
- Opera 10+
- This script has been tested on the following skins:
- Vector (default)
- Monobook (default emeritus)
- Modern
Documentation
If the installation was done properly, you should see a "Review" tab on the top of the page when viewing a submission in CAT:PEND or when reviewing redirects; it may be a drop-down tab in certain skins. 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 using the link in the submission template. (Note: Misplaced submissions are patrolled and moved by ArticlesForCreationBot (talk · contribs), but this can take a few days.)
Reviewing an article submission
The "Review" tab
When clicked, the review tab brings up five buttons:
- Accept
- Decline
- Comment
- Mark as reviewing
- More options
- Clean the submission
- Resubmit
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 substituted 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 Wikipedia:Articles for creation/recent.
- It uncomments categories like [[:Category:XXX]].
Known issues
- If a page is blacklisted through the blacklist extension and the reviewer has neither the account creator right nor the administrator 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 this page.
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.
- Notify about the Teahouse - If checked, this will add a notice about asking questions about the submission at the Teahouse (it automatically checks if there is a Teahouse template already as well).
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.
Known issues
- There will be an error if you attempt to leave a Teahouse notification without leaving the default notice.
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 the 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 and other scripts)
- Submission and comment template sorting (and moving to the top
- Removes {{userspacedraft}}, {{userspace draft}}, {{user sandbox}}
- Commenting out categories
- 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]]
- http://en.wikipedia.org/wiki/Foo --> [[Foo]]
- [[http://enwp.org/Foo foo]] --> [[Foo|foo]]
- [[Foo_bar|Foo bar]] --> [[Foo bar]]
- [[Foo_bar|Foo Bar]] --> [[Foo bar|Foo Bar]]
- [[Foo_bar]] --> [[Foo bar]]
- and other variations (e.g. secure links; please report unnoticed variations)
This action is preformed automatically when preforming any other task (e.g. declining, commenting, etc.)
Reviewing redirect 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 (other than ones automatically added by the regular redirect template you selected)
Configuring the script
Over the next few updates, patches will become available for the script that will allow you to configure it with different options. When this comes out, you will be able to use this page to configure it, along with a setting in the review window.
Version history
- v4.2.13 - Bugfixes, advert is no added to page move summaries
- v4.2.12 - Bugfix for Firefox users
- v4.2.12.2 - Remove inactive features
- v4.2.12.1 - Bugfix for removing last submission templates
- v4.2.11 - Added "More options" button, accepting now triggers clean-up, test of ref and comment tag formatting checkers, bug fixes
- v4.2.10 - Wikilinks created using external link coding will now be corrected automatically, a new button to only preform a cleanup task, a fix for the comment created by the "My sandbox" link gadget
- v4.2.9 - Decline templates are now moved to the top when clean-up is triggered, horizontal line is added under comments, more HTML comments are removed automatically upon accepting a submission, in some cases all decline templates are shrunk when clean-up is triggered, and clean-up is now triggered when declining, adding a comment, or marking the submission as reviewing
- v4.2.8 - Fixed bug when accepting templates, categories, and certain specific talk pages through AfC
- v4.2.7 - Copyedited Teahouse invite messages in widget, automatically remove left-over comment from re-submitting upon accepting or declining an article, submission is now cleaned up automatically upon declining, code cleanup
- v4.2.6 - Bug fix involving duplicate pending AFC submission templates
- v4.2.5 - Removed "ilc" decline reason per discussion on main talk page
- v4.2.4 - Checking if the notice is already present when adding a Teahouse notification, edit summary fix
- v4.2.3 - Added script notice to edit summary for tracking
- v4.2.2 - Additional decline option for adding Teahouse notification
- v4.2.1 - Decliner and declinets variables added
Unstable versions
We have two unstable versions of the script available to test:
Beta version
This is a beta version of the script. It is hosted by mabdul and includes newly coded fixes and improvements that haven't been tested enough to be patched to the main build. Please leave your comments and bug reports on the talk page. Be careful! Although this script is tested and should work, it can happen that it doesn't react as intended. Please review your edits on a regular basis. If you still want to use it you have to add the following line to your common.js file instead of the line at the top:
importScript('User:Mabdul/afc beta.js'); // Yet another AfC helper script - beta script!
Alpha version
This is the build that actively is coded by mabdul. You can use this script, but do so at your own warning - it might not work from one moment to the other, it's normally buggy and breaks at any point, it might not load, etc. This script shouldn't be used on the regular basis, only for testing and scripting!
Development page
We have a page for tracking and discussion about bugs in the script here.
Developers
- Timotheus Canens (talk · contribs) - Creator
- mabdul (talk · contribs) - Lead developer
- The Earwig (talk · contribs) - Developer
- Excirial (talk · contribs) - Developer
- Nathan2055 (talk · contribs) - Beta tester and documentation coordinator
Useful links
Acknowledgements & Disclaimers
Great thanks are due to be had by User:Mr.Z-man and his closeAFD script, from which this script is adapted.
Unstable versions of this script are...well...unstable. They can break, make incorrect edits, or do pretty much anything you can think of. Please be careful.