[go: up one dir, main page]

Jump to content

User talk:Holly Cheng/quickimgdelete.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Documentation

[edit]

Description

[edit]

quickimgdelete is a Javascript file that contains functions to make less tedious the following actions:

  • Nominating an image for deletion.
  • Identifying a possibly unfree image.
  • Tagging an image that is a blatant copyright violation (CSD G12)
  • Tagging an image that is a duplicate of another (CSD I1).
  • Tagging an image that is corrupted or missing (CSD I2).
  • Tagging an image that has no source (CSD I4).
  • Tagging an image that has no licensing (CSD I4).
  • Tagging an image that has no source AND no licensing at the same time.
  • Tagging an image that has licensing and a source, but no evidence that the source actually licensed it as such (CSD I11)
  • Tagging a fair use image as orphaned (CSD I5).
  • Tagging an image that has no fair use rationale (CSD I6).
  • Tagging a fair use image that could be replaced (those that violate WP:FUC #1).
  • Tagging a fair use image where the rationale is suspect.
  • Tagging an image as a candidate to move to Commons.
  • Tagging an image that has been moved to Commons for deletion (CSD I8).
  • Identifying images that do not have adequate source URLs.

This is a modified version of Commons:MediaWiki:Quick-delete.js.

How it works

[edit]

On image description pages, the "toolbox" in the left column (monobook skins) will contain extra links for each of the above actions.

When nominating an image for deletion, a dialog box will open where you can enter the reason why you feel the image should be deleted. After you enter the reason, the script will post the deletion template to the image, warning templates to all the uploaders, and an entry on the current day's log page.

When tagging images for missing source, license, or fair use rationale, a dialog box may or may not open, depending on which action you choose. The script will then post the deletion template to the image and warning templates to all uploaders.

For speedy deletion and Commons tagging, a dialog box may appear depending on the action.

Additionally, if you're clearing out Category:Copy to Wikimedia Commons or Category:Wikipedia files requiring renaming, this script will remove the relevant template and thus remove the image file from the category.

Requirements

[edit]

Has been tested in the latest versions of Firefox, Google Chrome, and Internet Explorer, and the Monobook skin. The script is reliant on jQuery. It should work in most modern browsers.

Known bugs

[edit]
  • None as of 23:36, 13 November 2013 (UTC).
Changelog edit
v2.4.1 (2023-03-31)
Fixed the date of the FFD log page.
v2.4.0 (2022-04-27)
It turns out that the API return values had changed a lot more than I had thought. Also added some console logging.
v2.3.0 (2022-04-26)
Replaced deprecated API parameters and made it so that we don't leave notifications for bots
v2.2.0 (2020-08-12)
Replaced deprecated variables such as wgPageName with their mw.config.get('wgPageName') equivalents
v2.1.0 (2016-04-23)
WP:PUF is now inactive.
v2.0.3/4 (2015-11-05)
Null check in case user doesn't enter a copyvio source; WP:FFD renamed to Files for Discussion.
v2.0.2 (2014-02-28)
Use UTC date for determining FFD/PUF log page. Replaced deprecated code (addOnloadHook$(document).ready(); addPortletLinkmw.util.addPortletLink).
v2.0.1 (2013-11-18)
Add support for {{db-g12}} (speedy deletion because of copyright violation).
v2.0.0 (2013-11-13)
Now uses AJAX to avoid spawning new windows. Edits are making using the MediaWiki API. Because of this, we don't need to worry about user talk page redirects anymore. Also cleaned up the templates: {{missing image}}{{db-f2}}; {{rfu2}} is no longer separate from {{rfu}}. Removed support for {{GFDL-presumed}}.
v1.14.3 (2010-10-13)
{{fdw}} has signature included. Also removed variations of {{Copy to Wikimedia Commons}}. Now also remove {{Rename media}} and variations.
v1.14.2 (2009-09-01)
Thumbnails are restored, so table cell indexes changed yet again.
v1.14.1 (2009-07-13)
Thumbnails were removed from the File History (cf. v1.12), so table cell indexes changed back to what they used to be.
v1.14.0 (2009-06-18)
There was a change made to the File History HTML, which is now accounted for. Also found a weird edge case where the text "#redirect" is in the user talk page somewhere.
v1.13.1 (2008-12-11)
Image namespace changed to File
v1.13 (2008-10-09)
Images no longer handled at WP:CP, plus added handling for {{npd}}
v1.12 (2008-09-03)
Thumbnail added to file history, so table cell indexes changed.
v1.11.2 (2008-07-23)
Changed all uses of "fair use" to "non-free".
v1.11.1 (2008-07-02)
New NSD and NLD templates do not require Image: namespace.
v1.11 (2008-07-01)
New: Auto-saving and forcing opening of new windows, plus changing warning templates for NSD and NLD.
v1.10.6 (2008-05-21)
Uploader listing table format change
v1.10.5 (2007-09-12)
Turns out that the new uploader listing table is different for admins.
v1.10.4 (2007-09-04)
Fixed bug in Firefox.
v1.10.3 (2007-08-27)
Changed to accommodate new uploader listing format (using a table instead of an unordered list).
v1.10.1 (2007-07-04)
Use {{pui2}} for listing on WP:PUI log pages.
v1.10 (2007-07-03)
WP:PUI changed format to use daily log pages instead of one big long page.
v1.9.3 (2007-06-20)
Add optional "log" parameter for {{ifd}}.
v1.9.2 (2007-06-13)
Fixed the attempt I made in v1.9.1 to disable the script when action != view.
v1.9.1 (2007-06-12)
Only runs when action = view (i.e., not on history or edit pages).
v1.9 (2007-05-31)
Uses {{subst:dfu}} instead of deprecated {{fair use disputed}}.
v1.8 (2007-05-14)
Now uses {{GFDL presumed warning}} on user talk pages when image was tagged using the now-deprecated {{GFDL-presumed}} template.
v1.7 (2007-04-18)
Add support for {{fair use disputed}} and inadequate source URLs ({{bsr}}). Also, for no rationale, orphaned fair use, replaceable fair use, and fair use disputed, will use "short" versions of the user warning templates if the user has already previously been warned.
v1.6 (2007-02-15)
Now converts IFD abbreviations (AB, OR, etc) to their full meanings. Also removes {{Move to Commons}} and other versions for NCD tagging.
v1.5 (2007-01-22)
Add support for simultaneous NSD/NLD, images that have been moved to Commons (CSD I9), images that should be moved to Commons, possibly unfree images (PUI), and imagevios.
v1.4.2 (2007-01-14)
Use new general functions/variables available (getPname() -> wgPageName, addLink() -> addPortletLink()).
v1.4.1 (2007-01-06)
Fixed bug for when image name has an equals sign in it (use 1= to pass image name parameter).
v1.4 (2006-12-21)
Add support for speedy deletion tagging (I1 - redundant image, and I2 - missing image).
v1.3 (2006-12-06)
Add support for when the user talk page is a redirect. Script now will add warning template on the correct page, not the page with the redirect. Theoretically, multiple redirects should be handled as well.
v1.2.1 (2006-10-24)
Fixed bug where getElementsByTagName() was not properly recognized as a function in Firefox.
v1.2 (2006-10-23)
Add support for multiple uploaders -- now you can choose which uploader to notify instead of it always being the last one.
v1.1 (2006-10-20)
Add support for {{replaceable fair use}} and {{replaceable}}.
v1.0.2 (2006-08-04)
Fixed bug with usernames containing characters outside the normal ASCII set not being handled properly in IE.
v1.0.1 (2006-08-01)
Now removes {{untagged}} from image description page.
v1.0 (2006-07-31)
Created.

Installation

[edit]

Add the below scripts and following to your script file (usually found at User:YOUR_USER_NAME_HERE/common.js):

/**** quick image delete ****/
importScript('User:Howcheng/quickimgdelete.js');

Remember to refresh your browser's cache (Ctrl-F5 for IE, Shift-Ctrl-R for Firefox) before complaining it doesn't work! You may also have to wait a few minutes, as Wikimedia's servers do cache user scripts.

Discussion

[edit]

This script is erratic - when I click on something to do, it will alwasy tag the image description page and notify the uploader, but it won't always add the entry to the IFD page. Sometimes it does, other times it doesn't. I'm using Opera 9.01. Hbdragon88 18:56, 14 August 2006 (UTC)[reply]

Hmmm. I've never worked with Opera so I don't know if there are any issues with opening new windows via Javascript or anything. I'm not sure I can get around to testing it anytime soon, but I can check with authors of similar scripts to see if they've had any such issue. howcheng {chat} 06:16, 15 August 2006 (UTC)[reply]

Well, if this helps: Opera loads the existing image description page and tags it with ifd. It opens a new window to notify the uploader. It will either then steal an existing IFD page and add an entry or open a new one, but sometimes it doesn't do either. Hbdragon88 05:16, 23 August 2006 (UTC)[reply]

I had a simmilar problem. I think it's just the popup killer doing it. If Opera is set to close unwanted popups (default) it seems to allow the first window to open (notify uploader), but stop the second window (the IFD nom page). I asume the logic is that mulitple windows opening based on a single click is typicaly unwanted. Setting it just open all popups in the background (on the Wikipedia site) fixed that issue for me and the script works like a charm (baring server issues and database locks naturaly). --Sherool (talk) 14:22, 31 May 2007 (UTC)[reply]

Bug in v1.2

[edit]

Since the latest update, the script doesn't work under Firefox anymore: Nothing happens when you click on any of the links in the toolbox and the JavaScript console reports an error ("el.getElementsByTagName is not a function") in the script at line 72.--Fritz S. (Talk) 11:10, 24 October 2006 (UTC)[reply]

Fixed this, thanks. I wonder if it had to do with upgrading to Firefox 2.0, because I didn't have this problem prior to my upgrading. howcheng {chat} 16:17, 24 October 2006 (UTC)[reply]
I use Firefox 1.5, so I guess it had nothing to do with that. Thanks for fixing the script so quick, by the way! --Fritz S. (Talk) 17:00, 24 October 2006 (UTC)[reply]

Redirects

[edit]

This script is getting fooled by users who have redirected their user talk pages. For instnace, User MegaHL90 changed his or her name to MegaXL90. See the history - both Gay Cdn and I have posted messages to the talk page. Can this script be updated to detect a redirect page and then jump to the new page to post the warning? Hbdragon88 03:34, 3 December 2006 (UTC)[reply]

OK, I'm on it. howcheng {chat} 03:25, 6 December 2006 (UTC)[reply]
Done. howcheng {chat} 17:40, 6 December 2006 (UTC)[reply]

Request

[edit]

Could you please add the capability to mark an image using the {{redundant image}} template? I envision a box popping up like when clicking the IFD and the user would type/paste the duplicate image name (the one to keep) and it would then mark the image with this template. I know it seems minor and like I should do it myself since it's just adding the template, but doing this 100 times a night is getting tiring, and may help other tag images as redundant. I also think user notification might need to be made since there may be a valid reason to keep a "duplicate" image. Thanks for this awesome tool! --MECUtalk 14:47, 20 December 2006 (UTC)[reply]

I added this feature to my monobook a while ago, based on the quickimgdelete script... I guess some parts could have been done better (I hadn't done any JavaScript for a while), but it works fine. Here's the code:
// One-click Speedy deletion I1 tagging
speedyi1_text = "CSD I1: Redundant";
speedyi1_tooltip = "Tag this image for speedy deletion";
speedyi1_prompt = "What image is this a redundant copy of? (filename.ext)";

function speedy_i1() {
  var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
  window.location = editlk + '&fakeaction=csdi1_tag';
}
function speedy_i1Tag() {
  var i1copy = prompt(speedyi1_prompt, '');
  if (!i1copy) return;
  var txt = '{{db-redundant|' + i1copy + '}}';
  var oldtxt = document.editform.wpTextbox1.value;
  document.editform.wpTextbox1.value = txt + '\n' + oldtxt;
  document.editform.wpSummary.value = 'tagged for [[WP:CSD#I1|speedy deletion]] (CSD I1)';
  if (qid_autosave) document.editform.wpSave.click();
}

function speedyi1_onload() {
  var pname = getPname();
  if (pname.indexOf('Image:') == 0) {
    addLink('p-tb', 'javascript:speedy_i1()', speedyi1_text, 'nom-for-del', speedyi1_tooltip);
  }
  var fakeaction = getParamValue('fakeaction');
  if (fakeaction == 'csdi1_tag')
    speedy_i1Tag();
}

addOnloadHook(speedyi1_onload);
--Fritz S. (Talk) 15:06, 20 December 2006 (UTC)[reply]
Awesome! I only have one complaint: Could the popup come up as soon as I click the link? I don't like how it pulls up the page first and then pops up the box. This way, once I enter the filename into the box, I can just forget about the tab even if it takes a minute to pullup the new image. Should just be a simple reordering of your script, but I don't wanna try and mess with it since I don't know JS. --MECUtalk 00:07, 21 December 2006 (UTC)[reply]
Let me incorporate it into my script. I'll announce when that's done. howcheng {chat} 01:03, 21 December 2006 (UTC)[reply]
Just a quick note that a kind user made this change to the above script because my monobook page was listed under the CSD pages. Thought I would share. --MECUtalk 14:54, 22 December 2006 (UTC)[reply]
This is now done. howcheng {chat} 00:17, 23 December 2006 (UTC)[reply]

Another suggestion

[edit]

I'd like to have {{imagevio}} ability on this awesome tool as well. Imagevios are also 3 steps like the IFDs so this tool makes perfect sense to do it as well. A popup could come up asking for the URL for the imagevio template, but I'd like it to stop before saving the image description page so a user could type in more information. Typically I'll put who the copyright it or items from the TOS page. That would be awesome. --MECUtalk 00:07, 21 December 2006 (UTC)[reply]

That's a good idea, but I think this should go into Autocopyvio instead. howcheng {chat} 00:19, 23 December 2006 (UTC)[reply]
I think it would be better installed on this script since it's more image related and someone who is processing images, like me, would want it with this rather than on that script page. But either way I definitely want to use it. --MECUtalk 19:40, 23 December 2006 (UTC)[reply]
Also, unrelated to this, this script does not work on the secure version of Wikipedia. CSD I1 works, but nothing else I've tried like FUR, no source, etc. --MECUtalk 19:40, 23 December 2006 (UTC)[reply]
There's a secure version of Wikipedia? Where? Anyway, the reason I suggest it go with Autocopyvio is that that script already does most of the heavy lifting with respect to reporting copyvios; adding imagevios to it is a small task, but adding imagevios to this script is a bigger deal -- a lot of new code has to be written. It's the same reason I haven't included PUIs in here either. howcheng {chat} 00:09, 26 December 2006 (UTC)[reply]
Yup: [1]. You'll have to login again. I'm having other issues with Wikpedia, so it may just be me. I see your point about it belonging on autocopyvio better now. --MECUtalk 03:29, 27 December 2006 (UTC)[reply]
Most likely the problem is that it's a cross-domain script; on the secure site, the domain is secure.wikimedia.org and your Monobook JS file is trying to get script from en.wikipedia.org -- because the domains don't match, there is a high level of security and a lot of script functions don't work because of this (the opening of new windows, for example). The only way I can see around this is to have a second user account that you use just for the secure site, where the script source uses the same domain, but I don't know what the exact URL would be. Someone at Wikipedia talk:WikiProject User scripts might be able to help there. howcheng {chat} 08:10, 27 December 2006 (UTC)[reply]

After I refactored the code to handle PUI, adding imagevios was not such a big deal after all, so now they're in too. howcheng {chat} 07:07, 24 January 2007 (UTC)[reply]

Another request: PUIdisputed

[edit]

Could you add {{PUIdisputed}} to this script? I believe it is more in line with this script than autocopyvio, but I could be wrong again. PUI disputed requires more work than IFD, due to the required manual generation of the listing on the PUI page. That is, the template, once added to the image page doesn't give you the line to include at PUI, which is annoying. Thanks again! --MECUtalk 23:04, 30 December 2006 (UTC)[reply]

Done. howcheng {chat} 23:32, 22 January 2007 (UTC)[reply]

Bug?

[edit]

For the image Image:Alfredo catalan==.jpg, when the script put the message on the user talk page (the image was being marked RFU), it didn't put the image in, and instead put {{{1}}}. I might have to do with the equal signs in the file name, but that's the first time in hundreds of times I've seen that. Not a real big deal, and I don't know any other filenames with = in them to test with. If anyone else has a filename with = in it and has this problem to confirm it's with the = and not just a one time script hiccup, that would be great. --MECUtalk 13:28, 4 January 2007 (UTC)[reply]

Yes, it's the equals signs that are the culprit. This will happen for any of the user warning templates. What's happening is that user warning template is being written as, for example, {{subst:replaceable|Alfredo catalan==.jpg}} -- MediaWiki thinks that there's a named parameter being passed and the template is expecting one unnamed parameter so you get {{{1}}} as a result. I'll have to inquire about this on the village pump to see if there's a workaround. howcheng {chat} 07:40, 6 January 2007 (UTC)[reply]
OK this is done. howcheng {chat} 19:16, 6 January 2007 (UTC)[reply]

Yet Another request

[edit]

Could we get {{move to commons}} added to this script? Thanks. --MECUtalk 02:18, 6 January 2007 (UTC)[reply]

Also, could we get {{ncd}} on this script too? --MECUtalk 15:31, 6 January 2007 (UTC)[reply]
Done and done. howcheng {chat} 23:32, 22 January 2007 (UTC)[reply]

Another suggestion

[edit]

Any way you can get the script to remove {{Move to Wikimedia Commons}} if it is found on a page when you run the {{ncd}} script?↔NMajdantalkEditorReview 17:13, 15 February 2007 (UTC)[reply]

Also, if you can add this, also take note of the other templates that redirect to this one, such as Move to Commons, Move to commons, Move to Wikimedia Commons, Copy to commons, Mtc, MtC, MTC, CWC, CtWC, CTWC, Ctwc. I think thats it.↔NMajdantalkEditorReview 17:57, 15 February 2007 (UTC)[reply]
Done. howcheng {chat} 01:14, 16 February 2007 (UTC)[reply]

Issue

[edit]

This script isn't working for me. I've added all required scripts. When I run the script (for instance, nominate for deletion), it asks for my reason and then opens up the two extra tabs. But there it stops. It doesn't add any text to any page and doesn't submit. Amy I missing something?--NMajdantalk 21:57, 8 January 2007 (UTC)[reply]

Ok, apparently its something in my .js file. I replaced my monobook.js file with somebody else's and it worked. Now to go through mine and figure out what is interfering.--NMajdantalk 22:45, 8 January 2007 (UTC)[reply]
Fixed. Something weird with the ordering of my scripts.--NMajdantalk 20:01, 9 January 2007 (UTC)[reply]
Glad you were able to figure it out. howcheng {chat} 20:53, 9 January 2007 (UTC)[reply]
Saw your change above. Thankfully, that wasn't the issue. I had the two libraries at the very top of my monobook.js file and your script at the very bottom. I just moved your script to the top, below the two libraries and above all my other scripts and it worked. Great script. Saves SO much time.--NMajdantalk 21:03, 9 January 2007 (UTC)[reply]

laud & question

[edit]

Would it be possible to include a combination button that would add both a {{no source}} and {{no license}} (as well as an appropriate warning notice as well)? — pd_THOR | =/\= | 16:06, 15 January 2007 (UTC)[reply]

Done. howcheng {chat} 23:32, 22 January 2007 (UTC)[reply]

Another suggestion for IFD tagging

[edit]

Would it be possible to add the capability to change the IFD "reason" entered codes to fully typed out versions? There are standard "codes" used at IFD such as OR=Orphaned, UE=Unencyclopedic, LQ=low quality.. and so on. Folks that are new to IFD often complain they don't know what these codes mean (and OR is sometimes confused for the other meaning). I think having this tool change an IFD reason from "OR, UE, AB" to "Orphaned, Unencyclopedic, Absent uploader" would both give us taggers a "shortcut" and expand so un-indoctrinated folks would still get the same meaning. You can see the whole glossary here. --MECUtalk 13:34, 5 February 2007 (UTC)[reply]

Done. howcheng {chat} 01:14, 16 February 2007 (UTC)[reply]

Another tag request

[edit]

Could you please add {{fair use disputed}} with a default reason such as "the licensing requires a "detailed fair use rationale for each use""? And the default reason is automatically selected in the editbox so that if you want a different reason, you can just type it in? Thanks. --MECUtalk 23:28, 10 March 2007 (UTC)[reply]

Also, add {{bsr}} please? --MECUtalk 19:34, 24 March 2007 (UTC)[reply]

Done and done. Sorry for the delay. howcheng {chat} 21:58, 18 April 2007 (UTC)[reply]

Could you please change your script such that it does not have to edit the whole of WP:PUI to add a possibly unfree image? Also, is it possible to edit the last section of an IFD daily log as to save bandwidth? Thanks. MER-C 12:38, 20 May 2007 (UTC)[reply]

This would be possible with the loss of edit summaries. In short, I would treat it like a new section on a talk page, but because I don't want to add a new header (either it shouldn't have one or the template already includes it), I'd have to leave that form field blank. I'm not sure I like that idea, though. The only other alternative would be to make two hits to the server -- one to get the page and determine what the last section is and then a second to actually edit the last section. Bandwidth-wise, it's a toss-up (more to download, but less to upload). howcheng {chat} 05:12, 21 May 2007 (UTC)[reply]
Seems like a case for bugzilla then, if anyone can be bothered. Thanks anyway. MER-C 13:01, 22 May 2007 (UTC)[reply]

Fair use disputed → Dated fair use disputed

[edit]

Could you implement the dated fair use template (Template:Dfu). It is implemented as {{subst:dfu|reason}}. Thanks, Iamunknown 21:13, 24 May 2007 (UTC)[reply]

Done. howcheng {chat} 05:49, 1 June 2007 (UTC)[reply]
Thanks.  :) I figured you'd notice it here sooner or later, so I didn't bother you on your talk page. --Iamunknown 00:13, 13 June 2007 (UTC)[reply]

Bug with IE6

[edit]

Hi, This is good script I use it, but I have an error with this script after your last edit (v1.9.1 (2007-06-12)). I use IE6. The script open user talk page and image page, But this doesn't do anything (Doesn't add template or save). Can you help me?--OsamaK 19:07, 14 June 2007 (UTC)[reply]

User:MECU beat you to it. I've already fixed it. Ctrl-F5 to reload the script. howcheng {chat} 19:23, 14 June 2007 (UTC)[reply]
Thank you! also Can you help me to use this script in ar.wp? we need like this script but with others templates.--OsamaK 19:50, 14 June 2007 (UTC)[reply]
Well, most of the template names are just coded into the script, so all you would need to do is change them and the names of the pages you are posting to. It shouldn't be too difficult to convert, but you'd probably want someone with Javascript experience to do it. But you are free to take the code and modify it as needed for the processes that are on ar-WP. howcheng {chat} 21:23, 14 June 2007 (UTC)[reply]
Well, Thank you. Other error, Now the script edit image page only (Don't add message in user talk)! --OsamaK 14:08, 15 June 2007 (UTC)[reply]
Do you have any popup blockers in your browser? You need to set it to allow all popups for *.wikipedia.org. That should take care of it. howcheng {chat} 16:04, 15 June 2007 (UTC)[reply]
No, I don't have one. --OsamaK 16:29, 15 June 2007 (UTC)[reply]
Sorry! Now, It's very good. Thank you too much--OsamaK 16:31, 15 June 2007 (UTC)[reply]

In ar.wiki

[edit]

Hi Howcheng, We want to use this script in ar.wiki because now we are cleaning the image. I try move this script to Arabic language, but I can't. Can you help me to do this? I give you the Arabic text (like: "Mark as Commons duplicate" → "وسم بمكررة في كومنز" ) then you edit this script to Arabic language. Can you please?--OsamaK 08:29, 2 July 2007 (UTC)[reply]

I can do that, but it's more than just the labels. I'd need all the template names, the corresponding page names for IFD, PUI, etc. Does ar-WP have CAT:NS, CAT:NR, CAT:NL, etc too? Preferably, I'd like to hand it off to someone on ar-WP who's a Javascript developer. howcheng {chat} 16:13, 2 July 2007 (UTC)[reply]
Oh yaeh. Sorry Howcheng, go ahead.--OsamaK 01:48, 4 July 2007 (UTC)[reply]

Edit users' discussion page

[edit]

Hi! Now, script edits users' discussion page like this link (http://en.wikipedia.org/w/index.php?title=User_talk:Howcheng&action=edit). Why do not you change it to (http://en.wikipedia.org/w/index.php?title=User_talk:Howcheng&action=edit&section=new). That's better for long discussion page. --OsamaK 14:34, 31 July 2007 (UTC)[reply]

If I do that, then I lose the edit summary. All of the user warning templates include the new section header, so when doing a new comment, I would have to leave that field blank. See also bugzilla:9932, which would solve this problem. howcheng {chat} 16:15, 31 July 2007 (UTC)[reply]
AHA, sorry again ;)--OsamaK 17:30, 31 July 2007 (UTC)[reply]

If the user move his nick name

[edit]

Hi! look at this edit and this one. they are redirect page. Can you fix this problem?--OsamaK 17:14, 5 August 2007 (UTC)[reply]

problem with installation

[edit]

Can you check my monobook and see if I've installed your code correctly? I'm not seeing any extra buttons, but I don't really know what I'm doing so it's probably my bad. (BTW I did press Ctrl-F5 to no avail.) Calliopejen1 12:53, 7 August 2007 (UTC)[reply]

I think you had it in there twice. Ctrl-F5 now and you should see the extra links in the "toolbox" section. howcheng {chat} 16:17, 7 August 2007 (UTC)[reply]

Hi! can you add {{ShouldBeSVG}}?--OsamaK 21:45, 10 August 2007 (UTC)[reply]

Last version does not work with firefox, I try Control+F5 ;)--OsamaK 14:35, 31 August 2007 (UTC)[reply]

It would be nice if you could add an option to use this template instead of the standard template to label an image to move to commons. Thanks. AlptaJS 03:16, 15 September 2007 (UTC)[reply]

Fair use reduce

[edit]

Could you add a code to the script to implement the {{non-free reduce}} and {{non-free reduced}} templates? Thanks. –Dream out loud (talk) 17:30, 16 November 2007 (UTC)[reply]

Omitted signatures

[edit]

I have found bugs of omitted signatures through this tool while I never willfully omit signatures when expected. Examples can be found from my first two edits to User talk:Cvxmelody through this tool.--Jusjih (talk) 01:37, 18 December 2007 (UTC)[reply]

It looks like the problem is not with this script, but because someone has been removing the signatures from the notification templates. For example, I found that User:Storkk had removed it from {{idw-pui}}. I corrected that particular template and left a note on the user's talk page. I don't know if any other templates are screwed up because of this. Videmus Omnia Talk 16:30, 22 December 2007 (UTC)[reply]

Suggestion: Incorporate scipting user message "notice opt out" capability

[edit]

After getting several requests to not notify people in the future after I notified them about their images, and seeing that it's not possible, I had the idea, let people opt out of getting these messages. It could be incorporated with the Template:Bots system, or a separate similar system. I personally would only want to stop receiving "Orphaned fair use" images, so I could put something like

<!-- NOTICE OPT OUT: ORPHANED FAIR USE -->

on my page and any script could check for it when trying to notify them and if it's there, just die. Bots could check for it too. could have a blanket category (probably the most popular, but I dunno)

<!-- NOTICE OPT OUT: ALL -->

and one for each type they might get. Putting this on a user's talkpage should be done by the user only (of course) which means they would explicitly understand that they won't get the message and images may be deleted without their notice as a result. I think it sounds fairly straightforward to implement, just setting up a page to explain what to put on the page for people and then some "standard code" for people to use in their scripts (I'm not aware if there's any other image tagging script like yours) or in their bot code. We could even put a notice in each user message with a link on how to opt out: [[Opt Out place|<small>Opt out?</small>]] to help spread the message and use and get an article in the WikiPaper. I'd be happy to get the user info page setup if you're willing to code something on your end. Lemme know what you think and the best way to implement it. Thanks. MECUtalk 22:11, 31 March 2008 (UTC)[reply]

Maybe using a series of hidden templates? I would think that such an opt-out system should apply to any scripts/bots leaving templated messages on user talk pages. It sounds like a large undertaking needing some coordination but I think that would be a good approach. howcheng {chat} 23:18, 31 March 2008 (UTC)[reply]
That's what Template:Bots or Template:Nobots does. It's a template that doesn't do anything, but being on a page a bot/script could see it: and . I'll put the idea up at Village Pump. An Arbcom case involving BetacommandBot and using this (it's less about this and more about Betacommand's behavior) is going on, just FYI. MECUtalk 13:10, 1 April 2008 (UTC)[reply]
See also Wikipedia:Village_pump_(proposals)#Expand_Template:Bots_to_allow_opt_out_of_other_notices MECUtalk 14:15, 1 April 2008 (UTC)[reply]
Regardless of that discussion, I was bold and added the capability to Template:Bots. I will announce shortly on a grander stage as well. MECUtalk 16:38, 3 April 2008 (UTC)[reply]

Not working?

[edit]

This doesn't seem to be working for me at the moment. I click on "no rationale" on an image's page, and nothing happens. I'm using IE 7 if that helps.--Rockfang (talk) 03:50, 21 May 2008 (UTC)[reply]

The Fair Use Disputed link isn't working for me either. I get the dialog box asking for a reason, then after I hit enter, nothing happens.--Rockfang (talk) 18:49, 21 May 2008 (UTC)[reply]

It should be OK now. I think the file history table changed, so that messed me up. Try ctrl-F5 and see if that does anything for you. howcheng {chat} 04:50, 22 May 2008 (UTC)[reply]
I just came across another image I could test it on. Right now, nothing happens when I click the no source link. I'll update when I find an image with no rationale to test that part on.--Rockfang (talk) 06:34, 22 May 2008 (UTC)[reply]
Works fine now. Thanks. :) Rockfang (talk) 06:48, 22 May 2008 (UTC)[reply]

two requests

[edit]

could you add the {{orphan image}} tag? and would it be possible to group these into seperate boxes, similar to User:Smith609/toolbox.js? There are just so many possible options, it takes a while to look through them all. I tried it myself but was having caching issues and couldn't quite get it working. -ΖαππερΝαππερ BabelAlexandria 21:18, 5 August 2008 (UTC)[reply]

{{Bots}} and this script

[edit]

Does this script work with the variations of {{Bots}}? Including (but not limited to) this section.--Rockfang (talk) 23:52, 22 September 2008 (UTC)[reply]

Nope, sorry. howcheng {chat} 02:37, 23 September 2008 (UTC)[reply]

Not showing up

[edit]

Howdy. After your recent change, the script isn't showing any of the links along the left side of my screen like it used to. I have IE7 still. I tried Ctrl-F5 and it didn't help. Any suggestions?--Rockfang (talk) 23:33, 11 December 2008 (UTC)[reply]

It works now. Sorry. :) Rockfang (talk) 00:26, 12 December 2008 (UTC)[reply]

Mark as Commons duplicate

[edit]

Hey Howcheng! Long time no see. I love your quickimgdelete, and I've been using the "Mark as Commons duplicate" feature. I notice it removes the {{Move to commons}} tag, which is great... but could it also remove the {{Rename media}} tag? After all, if it exists on Commons at another name, there's no need to rename it. And if it's at Commons at the same (bad) name, it still shouldn't be renamed here; it should be deleted and the Commons version should be renamed. ({{Rename image}} and {{ifr}} are very common alternate names, by the way.) All the best, – Quadell (talk) 01:21, 19 April 2009 (UTC)[reply]

Possible PUF bug

[edit]

Howdy. Using this script I recently tagged this image as being a Possibly Unfree File. It did everything smoothly with the exception of putting the listing on the wrong daily page. Note the date on my signature on that page.--Rockfang (talk) 03:31, 2 February 2014 (UTC)[reply]

var logDate = $.datepicker.formatDate('yy MM d', new Date());
var templateWikiText = '{{' + template + '|log=' + logDate + '}}';
[...]
logPage += logDate;
This code unfortunately localises the dates: local time zone (as selected by the user at Special:Preferences) is used. PUF and FFD require you to use GMT, but if the user has selected his own local time zone, the script places the nomination on the wrong log page and adds the wrong date to the {{puf}} and {{ffd}} templates on the file information pages. Also, if the user has selected a language other than English at Special:Preferences, the month name will not be in English, creating incorrect log pages with localised page names.
Fix line 2 by replacing it with the following:
var templateWikiText = '{{' + template + '|log={{subst:#time:Y F j}}}}';
I don't know how to fix line 3 which decides on which log page the nomination ends up. --Stefan2 (talk) 01:35, 28 February 2014 (UTC)[reply]
Sorry for the delay in response. I somehow completely missed this thread in my watchlist. Javascript does support UTC time, so instead of subst'ing I just converted the local time to UTC. Thanks for spotting this. howcheng {chat} 05:36, 28 February 2014 (UTC)[reply]

Files for discussion

[edit]

WP:FFD was renamed into "Files for discussion", and starting today, subpages have the syntax "Wikipedia:Files for discussion/2015 November 4". Subpages for previous dates are still called "Files for deletion". This script needs to be updated so that requests are placed on the correct subpages. --Stefan2 (talk) 18:20, 4 November 2015 (UTC)[reply]

 Done. howcheng {chat} 08:19, 5 November 2015 (UTC)[reply]

Remove PUF

[edit]

WP:PUF has now been closed. Could you please remove the following lines from User:Howcheng/quickimgdelete.js?

pui_text = "Possibly unfree file";
pui_tooltip = "Mark this file as possibly unfree";
pui_prompt = "Why do you think this file is possibly unfree?";
pui_delReq = "Wikipedia:Possibly unfree files/";
pui_deleteTemplate = "puf";
pui_idwTemplate = "Fdw-puf";
pui_ifdTemplate = "puf2";

mw.util.addPortletLink('p-tb', 'javascript:nfd_tagImage(\'pui\')', pui_text, 'puf', pui_tooltip);

	switch (qid_action) {
		case 'nfd':

		case 'pui':
			promptMsg = pui_prompt;
			template = pui_deleteTemplate;
			summary = 'this is a [[WP:PUF|possibly unfree file]]';
			warnTemplate = pui_idwTemplate;
			warnSummary = '[[:' + wgPageName + ']] is possibly unfree';
			logTemplate = pui_ifdTemplate;
			logPage = pui_delReq;
			break;
	}

	switch (qid_action) {
		case 'nfd':

		case 'pui':
			logWikiText += '|reason=' + reason;
			break;
	}

Also, could you please change the "* ==Automatic 'nominate for discussion/pui/imagevio' script==" line to instead say "* ==Automatic 'nominate for discussion/imagevio' script=="? GeoffreyT2000 (talk) 03:08, 23 April 2016 (UTC)[reply]

 Done. howcheng {chat} 06:14, 24 April 2016 (UTC)[reply]

Use of global variables

[edit]

Just FYI Howcheng, this has a number of bare global variables (wgPageName, wgTitle, etc.); that usage has been deprecated, and should be replaced with mw.config.get('wgPageName') and so on. ~ Amory (utc) 18:18, 12 August 2020 (UTC)[reply]

@Amorymeltzer: Thanks for the heads up. howcheng {chat} 03:05, 13 August 2020 (UTC)[reply]

bugs? (08.2023)

[edit]
1.1

When using "Non-free use disputed" does not add the "concern=" parameter, you have to add it manually (see File:071723 JTBC Newsroom anchors.webp). — Ирука13 10:39, 19 July 2023 (UTC)[reply]

1.2

And on the talk page adds "{{subst:No fair|1=}}" instead of "{{subst:di-disputed non-free use rationale-notice|1=}}" (User talk:Gioiadeasis). — Ирука13 10:39, 19 July 2023 (UTC)[reply]

1.3

A signature is not put when a file is submitted for discussion ("Nominate for discussion"). — Ирука13 13:46, 25 July 2023 (UTC)[reply]

1.4

Files taken down for copyright infringement ("Copyright violation") should probably be marked with the template {{Db-f9}}, not {{Db-g12}}. — Ирука13 13:46, 25 July 2023 (UTC)[reply]