Wikipedia:WikiProject Articles for creation/Helper script: Difference between revisions

Content deleted Content added
Lead section update
add infobox
 
(176 intermediate revisions by 49 users not shown)
Line 1:
{{pp|small=y}}
__NOTOC__
{{redirect|WP:AFCH|the Articles for creation helpdesk|Wikipedia:WikiProject Articles for creation/Help desk}}
{{Wikipedia:WikiProject Articles for creation/tabs}}
{{tool warning|the Articles for Creation Helper Script}}
{{Infobox software
{{Shortcut|WP:AFCH}}
| name = AFCH
{{infobox user script
| title = Articles for creation helper script
| name = Articles for Creation Helper Script (AFCH)
| logo = [[File:AFC-Logo.svg]]
| desc = Accept, decline, or reject pages in the draft namespace
| screenshot = <!-- [[File: ]] -->
| author = [[User:Theopolisme|Theopolisme]]
| caption =
| maintainer = [[User:Novem Linguae|Novem Linguae]]
| collapsible =
| version =
| author = [[User:Timotheus Canens]]
| updated =
| developer = [[User:Mabdul]]
| source =
| released = <!-- {{Start date|YYYY|MM|DD|df=yes/no}} -->
* [[MediaWiki:Gadget-afchelper.js]]
| latest release version = 4.1.12.2
* [[MediaWiki:Gadget-afchelper.css]]
| latest release date = {{Start date and age|2012|06|24|df=yes}}
* [[MediaWiki:Gadget-afchelper.js/core.js]]
| latest preview version = 4.1.13a
* [[MediaWiki:Gadget-afchelper.js/submissions.js]]
| latest preview date = Updated multiple times every day
* [[MediaWiki:Gadget-afchelper.js/tpl-submissions.js]]
| programming language = [[JavaScript]] (using [[Ajax (programming)|Ajax]], [[CSS]], and [[HTML]])
* [[MediaWiki:Gadget-afchelper.js/tpl-preferences.js]]
| platform = [[Web browser]]
| github = https://github.com/wikimedia-gadgets/afc-helper
| language = English
| skins =
| status = Active development
| browsers =
| logo =
| screenshot = File:AFC Helper Script accept screen.png
| screenshot-caption = The AFCH "accept" screen
}}
The '''Articles for creation helper script''' (AFCH) is a Wikipedia [[WP:Gadget|gadget]] designed to help when reviewing Articles for creation [[CAT:AFC|article submissions]]. It is currently the only script officially recognized and supported by WikiProject Articles for creation. In early 2014, the helper script was completely rewritten and redesigned from the ground up, with a number of new features. This rewritten script is now the default; you can read about what changed at [[/Rewrite]]. The source is located at [[MediaWiki:Gadget-afchelper.js]].
{{Shortcut|WP:AFCH}}
'''Yet another AFC Helper Script''' is a Wikipedia [[WP:JS|script]] designed to help when reviewing Articles for creation [[CAT:AFC|article]] and [[WP:AFC/R|redirect]] submissions. It is currently the only script officially recognized and supported by WikiProject Articles for creation.
 
== Installation ==
[[File:AFCHv091.jpg|thumb|450px|Screenshot of the panel that appears when AFCH is launched. Different options appear based on the current review status of the page.]]
* To install the script, simply add the following line of code to [[Special:MyPage/common.js|your account's common JavaScript file]]:
To install the script, navigate to [[Special:Preferences#mw-prefsection-gadgets]], click on the check box next to "'''AFC Helper Script'''", and hit "Save". You should be ready to go!
 
=== How do I launch AFCH? ===
<source lang="javascript">
importScript('User:Timotheus Canens/afchelper4.js'); // Yet another AfC helper script v4.
</source>
 
To launch AFCH, click on <code>More ▼</code> in the toolbar on an AFC-applicable page and then on the <code>Review (AFCH)</code> link. In the Monobook skin <code>review (afch)</code> appears as an extra tab in the page's toolbar.
* After this, you must [[WP:BYPASS|clear your browser's cache]].
 
'''''Tip''': You can also launch AFCH using the keyboard access key '''1'''. For instructions on how to use access keys in your browser, see [[Access keys#Access in different browsers|this table]] (typically, Mac: Ctrl + Opt + 1; Windows: Alt + Shift + 1).''
==== 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 ==
{{Commonscat|Screenshots of Wikipedia AfC helper}}
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 [[WP:AFC/R|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 {{user|ArticlesForCreationBot}}, 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).
 
''Extended documentation for the helper script can found on GitHub in the [https://github.com/WPAFC/afch-rewrite/wiki AFCH wiki].''
The script currently does the following:
* It extracts the author from the first {{tl|afc submission}} tag, if there is such a tag, and notifies them.
* It moves the submission to mainspace.
* It removes all {{tl|afc submission}} and {{tl|afc comment}} templates from the article.
* It removes all other templates starting with ''<nowiki>{{afc</nowiki>'' 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 <nowiki>[[:Category:XXX]]</nowiki>.
 
Welcome to AFCH, a powerful tool for reviewing Articles for creation submissions. The tool aims to be largely intuitive; if you find elements of the software unclear, [[WT:AFCH|do let us know]]!
===== Known issues =====
* If a page is [[MediaWiki:Titleblacklist|blacklisted through the blacklist extension]] and the reviewer has neither the [[WP:account creator|account creator right]] nor the [[WP:ADMIN|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 [[WT:AFC|this page]].
 
==== DecliningWhere adoes submissionAFCH run? ====
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 {{tl|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 [[WP:TH|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 {{tl|afc comment}}.
* It notifies the author about the [[WP:TH|Teahouse project]], if requested.
* It blanks the submission, if requested.
* It cleans the submission page.
 
AFCH can be launched on AfC-applicable pages that begin with any of the following strings:
===== Known issues =====
* <code>Draft:</code>
* There will be an error if you attempt to leave a Teahouse notification without leaving the default notice.
* <code>User:</code>
 
=== What can I do using AFCH? ===
====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.
 
AFCH has many features. When reviewing a submission, a subset of the following options will be available depending on the automatically parsed submission status.
==== Marking as being reviewed ====
* Submit
This should be self-explanatory, it also cleans the submission page.
* Accept
* Decline/Reject
* Comment ''(always available)''
* Tag for G13 speedy deletion
* Postpone G13 speedy deletion
 
Additionally, clicking on the '''<code>&lt;&lt;</code>''' to the right of the main buttons reveals the following additional options:
==== Clean the submission ====
* [https://github.com/WPAFC/afch-rewrite/wiki/General-documentation#clean Clean submission] (small Wikicode and Manual of Style fixes)
This should be self-explanatory. At the moment the following tasks will be done
* Mark/unmark as under review ''(context-sensitive)''
*Unnecessary submission templates will be removed (duplicated pending submission, drafted submission if other pending or declined submission is placed)
*Removes many [[HTML comment|HTML comments]] (mostly added through the wizard and other scripts)
*Submission and comment template sorting (and moving to the top
*Removes {{tl|userspacedraft}}, {{tl|userspace draft}}, {{tl|user sandbox}}
*Commenting out categories
*Wikilink correction
**<nowiki>[[http://en.wikipedia.org/wiki/Foo|foo]]</nowiki> --> <nowiki>[[Foo|foo]]</nowiki>
**<nowiki>[[http://en.wikipedia.org/wiki/Foo|bar]]</nowiki> --> <nowiki>[[Foo|bar]]</nowiki>
**<nowiki>[[http://en.wikipedia.org/wiki/Foo foo]]</nowiki> --> <nowiki>[[Foo|foo]]</nowiki>
**<nowiki>[http://en.wikipedia.org/wiki/Foo bar]</nowiki> --> <nowiki>[[Foo|bar]]</nowiki>
**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.)
 
After performing any of these actions, the page will reload in place, allowing you to inspect your changes. Diff links are available for each edit the script made automatically.
=== 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)
 
=== Version historyCustomising AFCH===
[[File:AFCH with preferences.jpg|thumb|Screenshot of AFCH with preferences selected]]
* v4.2.12 - Bugfix for Firefox users
When AFCH is open on a draft or userpage, click the "(preferences)" link, which will open up a menu for customisation:
** v4.2.12.3 - Remove inactive features
*Set where to see the AFCH option (in the "More" dropdown or as an option in the side toolbar)
** v4.2.12.2 - Bugfix for removing random submission templates
*Logging speedy deletion nominations
** v4.2.12.1 - Bugfix for blanking the submission completely whenever the script is used
*Log accepts, declines, and rejects
* 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 auto-sorted when clean-up is triggered, horizontal line is added under AfC templates, more HTML comments are removed automatically upon accepting a submission, interface copyedits (including a fix to the redlink bug with the Teahouse invite feature), ALL decline templates are now 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 artcle, submission is now cleaned up automatically upon declining, code cleanup
* v4.2.6 - Bug fix involving duplicate <code><nowiki>{{subst:submit}}</nowiki></code> templates
* v4.2.5 - Removed "ilc" decline reason per discussion on [[WT:AFC|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 and abuse prevention reasons
* v4.2.2 - Additional decline option for adding Teahouse notification
* v4.2.1 - Decliner and declinets variables added
 
== Other notes ==
== Acknowledgements & Disclaimers ==
* The WikiProject list used by the script is [[Wikipedia:WikiProject Articles for creation/WikiProject templates.json]].
Great thanks are due to be had by [[User:Mr.Z-man]] and his [[User:Mr.Z-man/closeAFD|closeAFD]] script, from which this script is adapted.
* The templates used by the script are listed at [[Template:AfC submission]].
 
== Developers ==
Unstable versions of this script are...well...unstable. They can break, make incorrect edits, or pretty much anything you can think of. Please be careful.
 
[https://github.com/orgs/WPAFC/people A number of developers] have contributed to make AFCH a reality. The current rewrite was completed by {{U|Theopolisme}}, with subsequent maintenance by {{u|Enterprisey}}. You may contact {{u|Novem Linguae}} for urgent issues. We'd love your help! For instructions on how to contribute, see '''[[/Contributing]]'''. Interface administrators can deploy updates to the extension using the work instruction at [[/Deploying]].
After multiple incidents of abuse, this script now marks all edits preformed using it with an AFCH banner in the edit summary. Please do not hack the script to remove this notice.
{{Wikipedia technical help|collapsed}}