Last modified: 2011-05-23 23:10:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31026, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29026 - Load text into information box when uploading images
Load text into information box when uploading images
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-17 21:02 UTC by wiccan1
Modified: 2011-05-23 23:10 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description wiccan1 2011-05-17 21:02:07 UTC
Hi. Over at cywiki we'd like something similar to the [https://secure.wikimedia.org/wikipedia/de/wiki/Spezial:Hochladen dewiki version of the file uploader]. We currently have a problem where users are just ignoring copyright information and just uploading a picture without any information.

We have the Information template [https://secure.wikimedia.org/wikipedia/cy/wiki/Nodyn:Gwybodaeth here], which can been seen in dewiki's "Beschreibung/Quelle: {{Information...}}"

We'd like this also to be preloaded into the description box where the user is more likely to fill out the information. We've discussed it on translatewiki, and I've also asked over at dewiki to see if they could help, and they suggested here. A user on cytranslatewiki has found [https://secure.wikimedia.org/wikipedia/de/w/index.php?title=Spezial:MediaWiki-Systemnachrichten&offset=Robots.txt&limit=5000 this link] which shows "uploadtext" which redirects to the actual dewiki upload page. We've searched in the translate strings but have found nothing to the equivalent.

Is there a way of loading our [https://secure.wikimedia.org/wikipedia/cy/wiki/Nodyn:Gwybodaeth Information template] into the description? Thanks.
Comment 2 wiccan1 2011-05-21 00:28:31 UTC
Great! Thank you, Mark. I'll give it a go and come back if need be :)
Comment 3 wiccan1 2011-05-21 00:53:15 UTC
Mark, I've updated to something similar to dewiki, but still can't figure out how they get the parameters (or basically just text) in their "Beschreibung/Quelle:" box. Is there a way to edit the contents of that box? At the moment, the one on cywiki is blank.
Comment 4 Mark A. Hershberger 2011-05-23 01:30:42 UTC
That bit is added via JavaScript.  In their MediaWiki:Common.js there is this bit:

  //*** import Onlyifuploading-functions
  // SEE ALSO [[MediaWiki:Onlyifuploading.js]]
 
  if (mw.config.get( 'wgCanonicalSpecialPageName' ) == "Upload") {
      importScript("MediaWiki:Onlyifuploading.js");
      importScript("MediaWiki:Onlyifediting.js");
  }
 

Meanwhile, MediaWiki:Onlyifuploading.js has this:

  addOnloadHook(function() {
 
     var editbox = document.getElementById('wpUploadDescription');
     if (!editbox)            return;
     if (editbox.value !== '') return;
     editbox.value = "{"+"{Information\n"
                   + "|Beschreibung     = \n"
                   + "|Quelle           = \n"
                   + "|Urheber          = \n"
                   + "|Datum            = \n"
                   + "|Genehmigung      = \n"
                   + "|Andere Versionen = \n"
                   + "|Anmerkungen      = \n"
                   + "}"+"}";
  });
Comment 5 wiccan1 2011-05-23 23:10:17 UTC
Amazing! Thank you very much, Mark!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links