Page MenuHomePhabricator

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

Description

(will need to alter custom JS)

Event Timeline

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

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)

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 subscribed.

Also looking good on Beta