Uporabnik:GeographieMan/MoveToDraft
Ta uporabniška stran je za krajši čas rezervirana, saj stran namerava eden izmed sodelavcev v večji meri preurediti. Prosimo vas, da strani v tem času ne spreminjate, saj bi lahko prišlo do navzkrižja urejanj. Če je iz zgodovine strani razvidno, da je zadnjih nekaj dni ni spreminjal nihče, lahko to predlogo odstranite. |
MoveToDraft (source) – A script that is used to WP:DRAFTIFY articles (move to draft space), including cleanup and author notification.
Steps performed by the script:
- Move the current page to draftspace and, if the user isn't an admin or page mover, then tag the redirect left behind for R2 speedy deletion.
- Check if any files used are non-free.
- Edit page to comment out non-free files, put categories in {{Draft categories}}, and add the {{AFC draft}} template.
- Add a notification message on the author's/significant contributors' talk page/s.
- Update talk page banners.
- Log the move to the /Draftify log subpage of the user's space, if it exists.
Installation[uredi | uredi kodo]
Automatic[uredi | uredi kodo]
- Check the checkbox at Nastavitve → Pripomočki → Advanced → and click Save.
- Click the big blue "Install" button in the infobox on the right of this page.
Manual[uredi | uredi kodo]
- Add the following to Special:MyPage/common.js (or your skin-specific js, if you prefer):
{{subst:iusc|User:MPGuy2824/MoveToDraft.js}}
Usage[uredi | uredi kodo]
On articles, there will be an additional "Move to draft" menu option next to the regular "Move" option. In Vector skin, this is within the "More" dropdown menu.
Selecting "Move to draft" will bring up a list of contributors to whom notifications can be sent. This step is skipped if there is only one contributor to the page.
Next, a dialogue box is shown where the new draft title, the username of the author to notify, and a set of checkboxes to indicate the problem/s with the current version of the article can be chosen.
When the "Continue" button is clicked, the script will undertake the steps listed above. If there are any errors encountered with a step, you generally have the option to retry or skip it.
Note: for those without the page mover user-right, the redirect left behind from moving the article to draftspace will be tagged for CSD R2 deletion automatically.
Warnings[uredi | uredi kodo]
The script warns the user in certain conditions:
- Previous draftification of the article
- Old article (created more than 90 days ago)
- New article (significant edit/s less than 1 hour ago)
Draftify log[uredi | uredi kodo]
This script adds a pseudo-special page for viewing logs of draftifications – all draftifications, not just from this tool.
Once installed, you can navigate to Special:Draftify log and view logs from all users, or a particular user.
For convenience, a "Draftify log" link is placed on user pages (near the "Move to draft" menu option), linking to that user's log.
A wikitext version of the log is generated in a textbox at the bottom of the page, for easy copy-pasting if desired.
Todos[uredi | uredi kodo]
- Switch UI to Vue.js
Customisation[uredi | uredi kodo]
- Watching pages: If you want to watchlist the pages that you move, you can change your preferences in Special:Preferences#mw-prefsection-watchlist ("Watched pages" section).
- "Move to draft" link placement: Add the line
var m2d_portlet = "Predloga:Gi";
to your common.js, replacing Predloga:Gi with one of the portlet id values from Help:Customizing toolbars (the script's default location isp-cactions
) - Move log rationale: Add the line
var m2d_rationale = "Predloga:Gi";
to your common.js, replacing Predloga:Gi with custom text. The default rationale is Predloga:Samp - Edit summary for preparing article for draftspace: Add the line
var m2d_editsummary = "Predloga:Gi";
to your common.js, replacing Predloga:Gi with custom text. The default rationale is Predloga:Samp - Disable logging within your userspace: Add the line
var m2d_doNotLog = Predloga:Gi;
to your common.js to disable logging moves (in /Draftify log within your userspace). Logging is enabled if this omitted or set to Predloga:Samp.
Note to interface admins[uredi | uredi kodo]
I, MPGuy2824, the owner of this script and userspace, give interface-admins permission to edit this script with any changes based on consensus, including redirecting the script to a new location, via inline code that loads a different user script location, in the following cases: