Page MenuHomePhabricator

Make Special:Upload add {{3dpatent}} to 3D files that have been uploaded
Closed, ResolvedPublic

Description

(will need to alter custom JS)

Details

Related Gerrit Patches:
mediawiki/extensions/3D : masterAdd patent selection to Special:Upload
mediawiki/core : masterAllow extension of the Special:Upload form

Event Timeline

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Dec 12 2017, 10:04 PM

Change 398845 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/core@master] Add patent selection to Special:Upload

https://gerrit.wikimedia.org/r/398845

matthiasmullie added a comment.EditedDec 18 2017, 2:24 PM

Code is up for review.

  • Patent templates can be selected from a list of radio buttons
  • Selected patent will also be previewed, like licenses
  • When the file uploaded is not an STL file, the patent selection will be hidden, as it is irrelevant.

I will still need to make some changes to https://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js so this will show up on Commons as we want it to.


DONE


Once this goes up, the content of these pages should be altered:

/wiki/MediaWiki:3d-patents (for the non-default options of the patent selector)

* 3dpatent|ownwork|This file is my own work and I agree to the [[wmf:Wikimedia_3D_file_patent_license|WMF Patent License]]
* 3dpatent|This file is not my own work and I agree that use of this file and any objects depicted in the file will not knowingly or recklessly infringe any patents.

/wiki/MediaWiki:3d-nopatent (the text of the default option - it'll otherwise just be "None selected")

None selected (if this is a 3D file, a 3dpatent license tag is required or the file will be deleted)
matthiasmullie added a comment.EditedDec 20 2017, 1:59 PM

DONE


Instructions to add the (?) icon/tooltip, once this goes out:


Edit https://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js

After setHelp ('wpPermission', button_imgs, button_lk, max_width, is_reupload);, add:

setHelp ('wpPatent', button_imgs, button_lk, max_width, is_reupload);

Inside the function setHelp switch, add:

case 'wpPatent':
  field     = document.getElementsByName (id)[0];
  if (!field) return;
  insert_in = field.parentNode.parentNode.parentNode.cells[0];
  before    = null;
  break;

Edit https://commons.wikimedia.org/wiki/MediaWiki:UploadFormHelpTexts
Add:

{{#if: {{{live|}}}||*[[MediaWiki:UploadFormPatentHelp{{#if:{{{lang|}}}|/{{{lang}}}}}]]: }}

{{#ifexist: MediaWiki:UploadFormPatentHelp{{#if:{{{lang|}}}|/{{{lang}}}}}|
<div class="wpPatentHelp">{{MediaWiki:UploadFormPatentHelp{{#if:{{{lang|}}}|/{{{lang}}}}}}}</div>}}

Create https://commons.wikimedia.org/wiki/MediaWiki:UploadFormPatentHelp
Add:

<div>
'''Patent permissions:''' If this file is your own work, the [[wmf:Wikimedia_3D_file_patent_license|WMF Patent License]] (<nowiki>{{3dpatent}}</nowiki>) is required. Additionally, 3D files depicting weapons are not allowed. [[meta:Wikilegal/3D_files_and_3D_printing|Click here for more information]].
</div>

Change 401541 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/3D@master] Add patent selection to Special:Upload

https://gerrit.wikimedia.org/r/401541

Change 398845 merged by jenkins-bot:
[mediawiki/core@master] Allow extension of the Special:Upload form

https://gerrit.wikimedia.org/r/398845

Change 401541 merged by jenkins-bot:
[mediawiki/extensions/3D@master] Add patent selection to Special:Upload

https://gerrit.wikimedia.org/r/401541

ABorbaWMF closed this task as Resolved.Feb 8 2018, 6:48 PM
ABorbaWMF added a subscriber: ABorbaWMF.

Also looking good on Beta