MediaWiki talk:Gadget-Stockphoto.js/Archive 1

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

jQuery

This section was archived on a request by: DieBuche (talk) 10:53, 10 October 2010 (UTC)

is available on skins now; so feel free to move this from vector.js to common.js (See Mediawiki:AjaxQuickDelete.js for css dependencies). Otherwise: the buttons could IMO be smaller; the mail icon features two "envelope" icons, one should be enough.--DieBuche (talk) 16:57, 4 October 2010 (UTC)

Two more things: There seems to be an encoding problem when using email this file with files with non-latin character (CHrome on Vista, mailto: goes to thunderbird) and why does the "use file on wiki" button have a attribution field in the dialog when it's not used?--DieBuche (talk) 17:04, 4 October 2010 (UTC)
The second mail icon is generated by Chrome. I'll look into the encoding issue. I thought the attribution line couldn't do any harm in case the user wants it; I can remove it if it's too confusing. --Magnus Manske (talk) 18:16, 4 October 2010 (UTC)
The double envelope isn't generated by Chrome. One is generated in this script and one is generated by MediaWiki with the following CSS line:
#content a[href ^="mailto:"],
.link-mailto {
    background: url(images/mail-icon.png?2) center right no-repeat;
    padding: 0 13px 0 0;
}
Which sets the icon for any mailto: link, just like MediaWiki's CSS also puts a arrow-icon for external links. However these 'attribute CSS selectors' dont work in older versions of Firefox or any version of Internet Explorer. They do work almost any version of WebKit browsers such as Chrome or Safari. I would vote for deleting it from this script. Those with browsers that dont support it, just see the clickable link without the icon. –Krinkletalk 21:41, 4 October 2010 (UTC)
Fixed the encoding problem by switching from escape() to encodeURIComponent(). TheDJ (talk) 22:37, 4 October 2010 (UTC)
And I got rid of the envelope icons. --Magnus Manske (talk) 19:15, 5 October 2010 (UTC)

Error in Use this file on a website

This section was archived on a request by: DieBuche (talk) 10:53, 10 October 2010 (UTC)

The code produced named of a different picture than the one requested in some of the adresses. I have some Gadgets turned on, e.g. the Gallerypreview. Haros (talk) 18:30, 4 October 2010 (UTC)

✓ Fixed --Magnus Manske (talk) 19:42, 5 October 2010 (UTC)

Share this

This section was archived on a request by: DieBuche (talk) 10:53, 10 October 2010 (UTC)

I would change the way in which the "share" buttons light up when you move your mouse over them. Now, the entire row lights up, but I would change that so only one icon lights up instead of the entire row. Kameraad Pjotr 19:05, 5 October 2010 (UTC)

✓ Fixed --Magnus Manske (talk) 20:00, 5 October 2010 (UTC)

Fading

This section was archived on a request by: DieBuche (talk) 10:53, 10 October 2010 (UTC)

Anyone else think that the faded look is a tad too faded ? It's currently 0.5, but I think 0.7 or 0.7 might be more appropriate.

  • 0.5:
  • 0.7:
  • 0.8:
  • 1.0:

Actually, upon inspection, atm. it's actually 0.5 of 0.5 due to a double opacity setting:

  • current:

TheDJ (talk) 14:36, 6 October 2010 (UTC)

+1 .7 or .8 are more appropriate --DieBuche (talk) 17:28, 6 October 2010 (UTC)

Checker

This section was archived on a request by: DieBuche (talk) 12:52, 10 October 2010 (UTC)

Every icon has the transparency checker visible due to

/* Put a checker background at the image description page only visible if the image has transparent background */
/* You may want to clear the gallery background for the main namespace on other projects as galleries are used in articles */
#file img, .gallerybox .thumb img { background: url("http://upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png") repeat; }

in common.css --DieBuche (talk) 17:26, 6 October 2010 (UTC)


Poor positioning when categories placed above other content

This section was archived on a request by: DieBuche (talk) 12:52, 10 October 2010 (UTC)

This has probably been pointed out before (I found one possible allusion to it here, but nothing explicit), but the positioning of the icons/text ("Download all sizes", etc.) is messed up when the "Place categories above all other content" gadget is used. (Specifically, in FF3.6 the icons are getting pushed up into the page title.) - dcljr (talk) 11:23, 9 October 2010 (UTC)

You must have an old version of the script in your cache. The icon mode that shows this problem, atm is only used to present to anonymous users I think. TheDJ (talk) 12:02, 9 October 2010 (UTC)

Compatibility with mwEmbed gadget and iframe embed code

Status:    Done

mwEmbed now ( r172+ ) works with iframe urls for example [1] it supports dynamically resizes and exposes all the timed text tracks when embed. Mdale (talk) 22:51, 15 November 2010 (UTC)

Added support in mwEmbed iframe support here The share code now shares a video clip that can be embed into blogs like so Mdale (talk) 02:53, 8 January 2011 (UTC)
This section was archived on a request by: --Dferg (talk) 17:15, 30 April 2011 (UTC)

protocol relative URLs

Regarding this (and the two edits before):

There is still the img src URL without protocol. In case of local files (e.g. presentation slides) this doesn't work. To keep this gadget easy to use (what it is all about) I suggest to simply adjust to the viewer's protocol which he currently uses. If he uses http we use http and if he uses https we use https. Also in the img src attribute of this snippet:

<img width='75' alt='Feedback Loop' src='//upload.wikimedia.org/wikipedia/commons/thumb/7/77/Feedback_Loop.svg/75px-Feedback_Loop.svg.png'/>

Cheers --Saibo (Δ) 18:50, 8 October 2011 (UTC)

Yes please, the change away from including a protocol scheme has made it much less easy to use. (I use lots of Commons images in slides.) -Reagle (talk) 15:31, 13 October 2011 (UTC)

✓ Done diff. --Saibo (Δ) 16:00, 13 October 2011 (UTC)

This section was archived on a request by: Saibo (Δ) 00:19, 14 October 2011 (UTC)

Download links should open up a download dialog

Like flickr does it: http://www.flickr.com/photos/brevity/6221434141/sizes/l/in/faves-53799745@N04/ Click the download link and a download popup from your browser appears. Stockphoto.js just displays the image in this size (at least for me - Opera 11). --Saibo (Δ) 16:25, 13 October 2011 (UTC)

I had a look at this and it's basically impossible w/o backend changes. To create a "download dialog" the image needs to be sent with a specific header (content-disposition) and we can't set this via JS. --DieBuche (talk) 17:54, 13 October 2011 (UTC)
Thank you for researching! Unfortunate, but okay. --Saibo (Δ) 00:18, 14 October 2011 (UTC)

 Not done:This section was archived on a request by: Saibo (Δ) 00:18, 14 October 2011 (UTC)

Vector only?

Is intentional if I read the intro correctly. Where is the killswitch in the code? Cannot find it. Just curious .. --Saibo (Δ) 14:24, 3 November 2011 (UTC)

It's simply not imported ( only vector.js not monobook.js etc.) --DieBuche (talk) 14:57, 3 November 2011 (UTC)
Ah, thanks! I had guessed it is imported via common.js... Couldn't we also activate it for Monobook? Or at least as optional Gadget for Monobook users? Sure: I guess the percentage of users who use Monobook who want to see the buttons is not that high.. But sometimes it is useful (for me: to support newbies and reusers). I have placed this in my monobook.js now to enable it when I need it:
// [[MediaWiki:Stockphoto.js]]
if (mw.config.get("wgNamespaceNumber") === 6) {  //only run on File pages
   addPortletLink('p-tb', "javascript:{$.cookie(\'StockPhotoDisabled\', null, { path: \'/\'}); importScript(\'MediaWiki:Stockphoto.js\'); void(0);}", "Stockphoto buttons", 't-stockphotobuttonsOnDemand', null); 
}
--Saibo (Δ) 18:41, 3 November 2011 (UTC)
This section was archived on a request by: Saibo (Δ) 18:41, 3 November 2011 (UTC)

Update translation

{{Editprotected}}

I've just updated Catalan translation in the following page below: http://commons.wikimedia.org/wiki/MediaWiki_talk:Stockphoto.js/ca

When possible, may you update it? Thanks in advance! --Toniher (talk) 14:24, 26 December 2011 (UTC)

✓ Done. A reply on the subpage is enough though, just make sure you use {{editprotected}} without the <nowiki> tags so that the template is rendered and your request is added to the admins todo list. –Krinkletalk
This section was archived on a request by: Saibo (Δ) 16:11, 6 February 2012 (UTC)

Duplicate links

For German interface language (not for English!) and monobook I get

  1. Reuse this file
  2. Diese Datei verwenden

- both - on the file links box on top of file pages. And for vector:

  1. Diese Datei verwenden
  2. Diese Datei verwenden

--Saibo (Δ) 13:53, 6 January 2012 (UTC)

Can't reproduce. But I also can't see the use of $(document).ready( stockPhoto.init ); in MediaWiki:Gadget-Stockphoto.js/de since it is already done in MediaWiki:Gadget-Stockphoto.js -- RE rillke questions? 14:23, 6 January 2012 (UTC)
Hmm, btw: this was FF 3.6. Now I get "# Diese Datei verwenden # Diese Datei verwenden" also on monobook.
Opera 11.5: clean account, vector or monobook: English OK, German duplicate links. Cheers --Saibo (Δ) 01:38, 8 January 2012 (UTC)
$(document).ready( stockPhoto.init ); is invoked from the translation subpage because of the asynchronous nature.
If Gadget-Stockphoto.js would only invoke stockPhoto.init on it's own, then it will initialize before the translations have been loaded, so the initialization must happen after the translation is loaded. I agree it's not pretty, I'll see if I can think of a way that doesn't decentralize this call. –Krinkletalk 11:34, 6 February 2012 (UTC)
Okay, I've implemented it as follows. Gadget-Stockphoto.js will request the translation subpage with a callback. Inside the callback the initialization happens, so we get the best of both. –Krinkletalk 13:23, 6 February 2012 (UTC)
Have updated from FF3.6 to FF10 - can't test with FF3.6 anymore. Works now (logged in / not logged in, Monobook / Vector, German / English, FF10 / Opera11.6) - thank you both! Cheers --Saibo (Δ) 16:10, 6 February 2012 (UTC)
This section was archived on a request by: Saibo (Δ) 16:10, 6 February 2012 (UTC)

Bug: incomplete license URLs

I noted a bug in this gadget, it generates faulty URLs for the licenses. However, I see this more as a bug in the license templates, they should include the URI scheme, so I reported it at the Village Pump. But if the templates aren't fixed, the gadget should be fixed. Maybe it should be changed anyway, to defensively add http:// if there is no scheme. Here is a fixed version (diff). /skagedaltalk 22:14, 12 March 2012 (UTC)

Disregard the proposed fix since it fails for protocol relative urls. /skagedaltalk 20:37, 19 March 2012 (UTC)
This issue has now been fixed in the templates, no need for code changes. /skagedaltalk 21:39, 27 March 2012 (UTC)
This section was archived on a request by: skagedaltalk 21:39, 27 March 2012 (UTC)

Improvements in "Use this file on a wiki"

I would like to suggest rename "Use this file (on a wiki)" to "Wikicode" (or something like that) and remove "Page URL", "File URL", and "Attribution" - these items already exist in window "Use this file on the web". "Wikicode" should contain only "Thumbnail" (plus add possibility to change size) and "Image" and reword description: "Wikimedia/InstantCommons?:" to "You can use wikicode in Wikimedia projects and in wikis with InstantCommons? mechanism". LeinaD dyskusja 12:07, 13 October 2010 (UTC)

Done--DieBuche (talk) 15:58, 29 October 2010 (UTC)
This section was archived on a request by: McZusatz (talk) 20:22, 7 July 2012 (UTC)

Fix hardcoded paths

Status:    Done

Use stylepath and wgServer where possible (considering consequences for reuse on other wiki's) might not want to do that for transcluded Commons pages

stylepath usage fixed. TheDJ (talk) 14:25, 6 October 2010 (UTC)
This section was archived on a request by: McZusatz (talk) 16:56, 9 July 2012 (UTC)

PD-user attribution

Status:    In progress

If you have a look at this image, the attribution goes to whatever is written in the "Author" field, although the "PD-user" tag is used, and the username could be taken from there. I don't know if tweaking the script to do that would be a good idea, or it'd be better if the author fields were checked by a bot for inconsistencies, or maybe fix it on sight and rely on the common sense of the re-users in similar cases. -- Orionisttalk 13:33, 28 October 2010 (UTC)

There can be multiple licences some of which require attributions and some of which don't. The information in the Author-field is the correct one to use, with the exception of the "attribution" parameter in Creative Commons licenses which overrules the Author because Creative Commons says "You must attribute the work in the manner specified by the author". If no particular attribution is specified by the author it falls back to the Author field. If people treat the {{Information}} template as a Quesetion&Answers document by saying "Permission: Not needed, Other version: No, Date: Don't know, Author: ME!", then that's their misunderstanding. I think there's a point where smart scripting should end and endless possible mistakes by uploaders start. –Krinkletalk 16:45, 9 November 2010 (UTC)
This section was archived on a request by: McZusatz (talk) 17:04, 9 July 2012 (UTC)

Sounds/Videos

Status:    In progress

The script does not care too much about sounds/videos, see e.g. File:Example.ogg, File:Edit Button.ogv. Almost all of the tools are broken in some way. The “Download” link shows dialog with “Download image file” and “Full resolution”, “Use this file” shows strange HTML for sounds and no HTML for video, etc. Maybe it would be better to disable the tool for non-images in its current state. --Mormegil (talk) 12:55, 31 October 2010 (UTC)

At least the share on the web option has been fixed. Should be strait forward to fix the download link too. Aside: mwEmbed player support download links for video and subtitles --Mdale (talk) 03:02, 8 January 2011 (UTC)
This section was archived on a request by: McZusatz (talk) 09:04, 11 July 2012 (UTC)

Remove the unneeded www.

Status:    Done

Remove it from the link to Creative Commons site, it redirects you to creativecommons.org anyway. I think you can also safely remove it from GNU link, I tried gnu.org and it redirects to www.gnu.org, but I don't know if that could cause any issues. It's a minor thing, but I feel that a shorter credit line for images is a good thing. -- Orionisttalk 10:38, 1 November 2010 (UTC)

This should be fixed in the respective license templates, imho – no special code here. /skagedaltalk 21:33, 8 March 2012 (UTC)
Jean-Fred fixed this for the CC templates. Makes sense to me to keep links in the form considered canonical by the web pages themselves, i.e. the form redirected to? Thus, www.gnu.org and creativecommons.org; marking this done, feel free to change back if anyone disagrees. /skagedaltalk 19:55, 28 March 2012 (UTC)
This section was archived on a request by: McZusatz (talk) 09:05, 11 July 2012 (UTC)

Bug prevents re-enabling the links

Status:    Done

var $enable = $('<li class="mw-filetoc-links"><a id="SpEnable">' + this.i18n.reuse + '</a></a>');
Should be:
var $enable = $('<li class="mw-filetoc-links"><a id="SpEnable">' + this.i18n.reuse + '</a></li>'); ?
I don't see an enable-link. Edokter (talk) — 00:05, 19 July 2011 (UTC)

✓ Done. – Adrignola talk 19:59, 5 September 2011 (UTC)
This section was archived on a request by: McZusatz (talk) 09:07, 11 July 2012 (UTC)

Remove boilerplate text in a way that works for all language settings

{{Editprotected}}

  • Problem: When Stockphoto looks for author information from the {{Information}} template, and there is no author set, it should remove boilerplate text. Currently, this only works when language setting is English, since the code looks for the exact text "This file is lacking author information". As a code comment says, this is not a very elegant solution.
  • Steps to reproduce: Make sure your language in Special:Preferences is set to something other then English. Go to File:Test_image_1.png, a test image I uploaded, whose description page lacks author information. Press the "Use this file" button. You will see text like "By This file is lacking author information" (in your local language) instead of "See page for author" (which it says if your language is set to English).
  • Proposed solution: Fortunately, the boilerplate text set by {{Information}} – using the {{Author missing}} subtemplate – is wrapping the text in a div with class set to boilerplate metadata. We can thus filter it out in a more robust way.
  • Code: Here is a modified version that seems to work; I've tested it insofar as it correctly keeps the existing author information from this image but displays "see page for author" when author information is missing on this image. Diff. The proposed patch also uses this method for the source field.

Regards, skagedaltalk 23:24, 23 March 2012 (UTC)

✓ Done Thanks for helping. Jean-Fred (talk) 23:26, 24 March 2012 (UTC)
This section was archived on a request by: McZusatz (talk) 09:10, 11 July 2012 (UTC)

How to recover the gadget ?

#Hints above teaches how to remove the gadget. But I would like to know how I can recover the gadget if I change my mind after removing it.

How about creating a help page, to write down this sort of information ?

Teofilo (talk) 15:32, 17 February 2011 (UTC)

Just reenable the checkmark to recover the gadget. --McZusatz (talk) 09:45, 11 July 2012 (UTC)
This section was archived on a request by: McZusatz (talk) 09:45, 11 July 2012 (UTC)

Bug reports

Par James Axford, Melbourne (Travail personnel) [<a href="www.creativecommons.org/licenses/by-sa/3.0">CC-BY-SA-3.0</a>, <a href="www.gnu.org/copyleft/fdl.html">GFDL</a>, <a href="www.gnu.org/copyleft/fdl.html">GFDL</a> ou <a href="www.creativecommons.org/licenses/by-sa/3.0">CC-BY-SA-3.0</a>], <a href='http://commons.wikimedia.org/wiki/File:Agnes_Milowka_by_J_Axford.jpg'>via Wikimedia Commons</a>
  • Links should have protocol, otherwise it breaks when used (processed as relative links by CMS such as Wordpress). I thought I had a fix, but I only brought more havoc :-)

Jean-Fred (talk) 12:26, 21 May 2011 (UTC)

This section was archived on a request by: McZusatz (talk) 09:49, 11 July 2012 (UTC)

Error in HTML attribution

When ticking the HTML box for attribution in e.g. File:Grangärde_vapen.svg the username comes up as <a href="/wiki/User:Lokal_Profil" title="User:Lokal Profil">Lokal_Profil</a> i.e. the http://commons.wikimedia.org part of the url is missing. /Lokal_Profil 16:00, 21 June 2011 (UTC)

This seems to be linked to the inclusion of a specific attribution parameter (wikilinked) into the cc-by-sa template. /129.215.149.97 15:29, 22 June 2011 (UTC)
I think this is fixed by now? --McZusatz (talk) 20:42, 7 July 2012 (UTC)
This section was archived on a request by: McZusatz (talk) 09:50, 11 July 2012 (UTC)

IE 8 opacity

Status:    In progress

IE 8 has trouble with opacity on transparent PNGs. Alternative is said to set opacity on a parent element of a png that you want to be transparent. TheDJ (talk) 17:12, 8 October 2010 (UTC)

Done, does it help?--DieBuche (talk) 12:52, 10 October 2010 (UTC)
No. Only a problem in compatibility mode, native IE8 seems to work fine --DieBuche (talk) 15:42, 18 October 2010 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 06:34, 29 October 2015 (UTC)

Languages for anonymous users

Status:    In progress

The logged-out version should have language switch + remember selected language in cookie. LeinaD dyskusja 13:54, 11 October 2010 (UTC)

There's several scripts and templates that already have it's own language memory. I'm currently working with a few people to think of some kind of central way fix this for both {{Mld}}, {{LangSwitch}}, the Sitenotice and perhaps more. –Krinkletalk 16:37, 9 November 2010 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 06:34, 29 October 2015 (UTC)

Hints

How to turn this feature off

  • To turn temporarily off, click on the red x (x) near the buttons.
  • To turn completely off, go to section Gadgets in your Preferences, remove the checkmark ☑ in front of “StockPhoto” and save.

What version do I have cached ?

StockPhoto =  {
  rev: 'number',
  //…
}

. Even if you purge that page, the code that is sent to the browser is the raw version the browser keeps a seperate cache for that. If you're developing in your Console simply execute StockPhoto.rev; and see what it returns to compare. Otherwise pasting javascript:alert(StockPhoto.rev); in the addressbar on a File-page and hitting Enter will give you the number aswell.

This section was archived on a request by: Hedwig in Washington (mail?) 03:56, 6 June 2017 (UTC)

Version for Wikipedias to show on transcluded pages

Status:    In progress

This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Attribution field

Status:    In progress

If the attribution field (possibly the author field and definitely the second parameter of the cc licenses) is hyperlinked then so should the "attribution" text. At least in the "use for web" section. /129.215.149.97 15:39, 7 October 2010 (UTC)

Much to do with the license problem + links. We need to redesign the licenses to be better machine readable. TheDJ (talk) 18:42, 7 October 2010 (UTC)
Second one done now--DieBuche (talk) 15:42, 18 October 2010 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Mobile access with Opera

Status:    In progress

When viewing an image page using Opera Mobile this "feature" is a bit annoying: the (on mobile screen) big icons are first(!) on the image page... then you have to scroll down to see the image you wanted to see. Cheers --Saibo (Δ) 18:18, 9 November 2010 (UTC)

We could add a check to not only use the small icons in the tocbar when the image is narrow/small, but also when the screen width is narrow (use screen.width / screen.height) –Krinkletalk 03:40, 16 November 2010 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Print usage

Status:    In progress

A button with information on how to use it in print will come in handy. This making the third "Use file"-ish button we may wanna group them somehow. Perhaps make it a single button with tabs, or clarify the kind of usage direct in the link (Not just a different icon). Or perhaps a single link with three icons in parentheses. Will see. –Krinkletalk 03:27, 23 November 2010 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Always show buttons

Status:    In progress

Today, the whole gadget is disabled if sufficient metadata can't be found. I think this is confusing to the user (at least for me), "where did that thing go?". It would be better to always show the buttons, but give an informative message such as "Sufficient licensing information can't be found. You can help Wikimedia Commons by editing this page (link with help on tagging)" or "This file has licensing problems, please do not reuse until this is resolved." /skagedaltalk 07:06, 14 March 2012 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Should work on Internet Explorer

Status:    In progress

Thought there should be a ticket for this. The gadget is currently disabled on all IE versions. Would be nice if issues were worked around so it can be enabled. /skagedaltalk 07:06, 14 March 2012 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

stockPhoto.backlink_url only protocol-relative when used in HTML

Status:    In progress

"stockPhoto.backlink_url" should be protocol relative when used in html, and use current window protocol in other places. --Sumanah 14:22, 30 March 2012‎

Right now it expands the relative url with the current protocol of the reader. That's still better than hardcoding it, but ideally we wouldn't hardcode the protocol at all on that backlink so that people will stay on HTTPS when serving the web and make use of the HTTPS service that Wikimedia has. Should be an easy fix (keep backlink_url protocol-relative, and expand in textContent and input values where needed). –Krinkletalk 14:30, 30 March 2012 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Social networking icons

Really really not happy about this. The copyright issues asside this is advertising. There are also massive nutrality issues (why no Hi5 or Orkut for example).I've commented them out for the time being (hopefuly js isn't something I've used much). If we are going to use them we really need to have a sitewide debate.Geni (talk) 18:30, 6 October 2010 (UTC)

Okey I've set show_social_bookmarks : false , which is a far more sensible approach.Geni (talk) 18:47, 6 October 2010 (UTC)
I call bullshit. TheDJ (talk) 19:30, 6 October 2010 (UTC)
1: There is no neutrality issue. The services that are included are entirely up to us. We decide.
2: If there is a copyright issue, then it is a fair use. The icons are however not hosted on Commons.
3: Share icons are a good idea, that will help further the mission of our Free collection. We should not let good ideas be limited by our efforts to be the most anal kid in the class.
TheDJ (talk) 19:44, 6 October 2010 (UTC)
1)Us deciding does not mean neutral. It means chosing to endorse. Something we should not be doing.
2)If if you want to argue fair use let me know when you've got an EDP for commons through the foundation.
3)it is not evident.Geni (talk) 19:57, 6 October 2010 (UTC)
1) We also list a hundred or so commercial services for maps. (and considering limiting that, because the page is starting to become unusable). We endorse identi.ca as a free service, because it's the only free service. Beyond that we have to live in the reality that there are 500 million Facebook users. That's my opinion.
2) Actually most files are actually public domain or CC icons hosted locally at Commons and mirrored under wikinews under fair use it seems... Many are of Category:Open Icon Library.
3) He said she said situation, but if you want to vote on that. sure, why not. lets waste some more editor time :D TheDJ (talk) 20:45, 6 October 2010 (UTC)

WikiNews uses these icons (that's where I got them from), so the Foundation apparently has no problem with using them. Reusing content is a (or the) part of the Commons mission; that includes making reuse easier IMHO. Personally, I stay away from social networks as far as possible these days, so I couldn't care less for these icons in terms of personal use, but they do seem to be useful and used by many people on other sites. --Magnus Manske (talk) 20:22, 6 October 2010 (UTC)

Do we have any evidence that they are actualy used to any great degree?Geni (talk) 20:38, 6 October 2010 (UTC)
Only their prevalence on other (non-wikimedia) sites. And googling "social network icons" (with quotes) yields >300K pages, so it seems to be a topic of interest for websites in general. I'm not sure clicktracking would be particularly well received on Wikimedia sites, even if it's only for anonymous bulk statistics, so how could we record those? --Magnus Manske (talk) 21:15, 6 October 2010 (UTC)
Here is a blog arguing that these icons are not worth it. Note that the blog page itself has such icons... --Magnus Manske (talk) 21:24, 6 October 2010 (UTC)
  • As I said above, it's not fair that we have all these icons for all users - people use other social medias in USA, other in Russia, other in Poland etc. Plus, there should be clear rules which social bookmarks can be added on the list. LeinaD dyskusja 22:59, 6 October 2010 (UTC)
Hasn't the problem of avoiding endorsing one organisation over another already been essentially solved by the geohack tool e.g. [2]? It's not as nice as being able to click on an icon, but it preserves the functionality for those that want it. IMO it's definitely worth having the links available somewhere fairly easy to find. Mike Peel (talk) 08:15, 7 October 2010 (UTC)
Alternatively, we could do something like the ShareThis tool with a pull-out set of sharing buttons that is as long as you like (I believe ShareThis has > 800), with the world's main networks shown as default. This could work without going down the route of having language-specific network selection and ordering, though that's potentially useful too..
James F. (talk) 11:45, 7 October 2010 (UTC)
Depends on what you call solved. Solved in our warped perspective perhaps, but I know many people who consider geohack and ISBN tools unsuable and scary. There is a proposal for those pages on en.wp almost monthly to cut them down to 10 services and toss the rest into a well hidden deep pitt. The Sharethis system works a lot better in that respect, but unfortunatly both sharethis and addthis are commercial services in their own, and we are definitely not gonna use a single commercial services. Some one should write an open version of that, but i've been asking for that for 3 years now and it doesn't seem to me to be around the corner any time soon. TheDJ (talk) 13:24, 7 October 2010 (UTC)

The Signpost recently had a similar discussion, and ended up going with an icon-free pulldown menu. See here, for example; it's at the top of the article on the right. I rather like it, design-wise. (I do use a number of social services, but I don't think I've ever used the share buttons. For me, adding them is just clutter. But I'm happy to tolerate them if others find them useful.)--ragesoss (talk) 21:11, 7 October 2010 (UTC)

To be honest, I didn't see the share links on the Signport page until I really looked for the menu very closely. I'm like you, I never use the share buttons, but hiding them in a collapsed menu is the best way to hinder discoverability. Just sayin' (I'm not really leaning either way). guillom 21:42, 7 October 2010 (UTC)

They are removed -- RE rillke questions? 14:41, 6 January 2012 (UTC)

Moving to original layout

I am moving the icons back to the original top/side layout, as per discussion thread starting here. Please join the discussion on the mailing list so we can decide together which layout is preferable. --Magnus Manske (talk) 08:00, 7 October 2010 (UTC)

IMO they're definitely much better on the right-hand side, although that is possibly because I use a widescreen monitor. ;-) They were difficult to find when they were below the image, but that could be due to the reduced size of the icons when they were in that position - perhaps if they were kept at the same size it would still be easy to see them there? I like how they change to being on the top line if the picture is a panorama e.g. File:Cheyenne_dance4.jpg. It would be nice if they appeared on the page load, though, rather than slightly afterwards - presumably this is due to the timing of the javascript loading? Having the code embedded into the HTML code would be better (but presumably is more politically difficult?). Mike Peel (talk) 08:21, 7 October 2010 (UTC)
I don’t really care about side/bottom, but the current side layout is broken, i18n-wise. You cannot constraint the boxes tightly around English texts, the translations are usually significantly longer. See e.g. [3] --Mormegil (talk) 09:45, 7 October 2010 (UTC)
✓ Fixed --Magnus Manske (talk) 10:41, 7 October 2010 (UTC)
Right-handed side for me too Otourly (talk) 17:19, 7 October 2010 (UTC)
I'm late to the party, but I'll pile on in case it comes up again. I much prefer the large icons to the right of the image.--ragesoss (talk) 21:00, 7 October 2010 (UTC)

Needs major improvements for crossbrowser compatibility and other stuff

Copied from Village Pump

Good idea, not such a good code behind it, though. :-/ CSS needs improvements, since the look is seriously broken e.g. in Firefox 2. The HTML result code is also not very well designed and should be rewritten. Lot of unnecessary redundant stuff. Using intrinsic events instead of their binding isn't also the best approach. Last but not least: if it is supposed to be shown to all users by default, there should be gadget providing the chance to suppress such feature and such script should be loaded according to the state of supressing. I can provide better HTML output and appropriate CSS if somebody with access rights (and enough knowledge of JS/jQ :-)) is willing to fix the script with it.

Danny B. (talk) 11:57, 7 October 2010 (UTC)

There are plenty people here, just make suggestions. TheDJ (talk) 13:00, 7 October 2010 (UTC)

Hard to make suggestions for code, when design and position are being changed under hands. :-/ Yesterday, there was a block under the image with icons of random third party services and small icons, today it's above the image, no services, big icons, what will happen tomorrow? Set a consensus on design, preferably put some final mockup online (as currently it looks totally different in random browsers) and I'll be happy to provide the code immediately. Now it would be just wasting of time of all of us - me with creating, you (whoever would be putting it into the script) with recoding of the script and then on and on again with nearly every single change of design.

Re the suggestions - some already are in my previous text, the other major one is that since this is significantly undevelopped prealpha version, it should not be forced for all users (and scare/confuse them on daily basis) until it's fully developped. Make it as a gadget for the time of development, and those interested in it can turn it on. Promote it in sitenotice if you'd need more feedback.

Danny B. (talk) 16:27, 7 October 2010 (UTC)

Not on top!

Please don't put these huge buttons above the image! Maybe it was unintentional as it only does it on certain images (like File:Anonymous Flag by D3L1GHT.jpg). Or is this a problem specific to my browser/gadgets/etc. setup? Rocket000 (talk) 01:19, 8 October 2010 (UTC)

It depends on the size of the image. If it's too small vertically, then it aligns the buttons at the top. TheDJ (talk) 13:51, 8 October 2010 (UTC)
Changed it: For anons, they go into the toc if the file is to small--DieBuche (talk) 12:52, 10 October 2010 (UTC)

Share icons

I doubt whether share icons are ok... I see a few problems:

  • Wikimedia Commons is a multilingual project, not an English Wikinews, so some services are completely unknown in some countries - list of "share icons" should depend on the language and geographical region.
  • Who should decide which services should be on the list of "share icons"? - now it looks like free advertising of certain selected services.

LeinaD dyskusja 01:05, 6 October 2010 (UTC)

I love NewsTrust (the last icon), but it certainly doesn't belong in the sharing toolkit for Wikimedia Commons. It's a site to review news articles, which makes a lot of sense on Wikinews. ;-)
There are definitely different dominant platforms in different countries -- short of localizing the selection, I think global usage numbers are the most meaningful criterion that can be used. What services are popular in China? :-)--Eloquence (talk) 01:39, 6 October 2010 (UTC)
I just copied all that are on Wikinews. I haven't even checked if they work, because I'm not using any of them actively. Removing one of them is just deleting/commenting a line; feel free to do so, or I'll do it later. Creating new ones is a little less trivial, and making language-specific ones will be even more work, but I'll get around to it eventually; so suggest away. --Magnus Manske (talk) 08:59, 6 October 2010 (UTC)
I removed newstrust. TheDJ (talk) 14:15, 6 October 2010 (UTC)
Awesome. I came here just to request its removal, as it is something completely unrelated to a multimedia project ;-) --Diego Grez return fire 19:46, 8 October 2010 (UTC)
This section was archived on a request by: Hedwig in Washington (mail?) 02:38, 20 July 2017 (UTC)

Separate tab?

Couldn't the share/use menu simply be another tab at the top of the page? As in "View | Edit | Use/Share | View History" Then it would be highly visible, not conflict with other gadgets (above/below image), and would not get cut off on some displays (right margin). Also, JavaScript would not be required, just as the Signpost menu still works with JS disabled. And if the plan is tapping directly into the database instead of screen scraping, a MediaWiki extension might make more sense IMHO. --Morn (talk) 10:18, 8 October 2010 (UTC)

That an extension is the best way to implement this is clear. Who is volunteering to do that, is what is not clear. TheDJ (talk) 13:52, 8 October 2010 (UTC)
I do not believe that the database has more information we could use. On the contrary: HTML tag IDs distinguish very nicely the different Information parts; there is no way to get to that reliably fron the database/wikitext. A tab could be created with JS. --Magnus Manske (talk) 14:51, 8 October 2010 (UTC)
True, that field in the database would have to be created first. But at least it would have to be done only once for each file (unless the license changes), while doing it client-side means that the JS parser must be more or less perfect (and there would need to be some test pages to make sure it still works right after an update).
Why doesn't Wikimedia help with this, especially if a MW extension is what's really wanted? Presumably whatever solution is developed for Commons will sooner or later be deployed on the Wikipedias themselves, so they should be interested in this, right? Supposedly they have some programmers and a budget now, don't they?
Wikia wikis have "Follow" and "Share this article" in the tab bar. Can't we use that code as a starting point for an extension? Or isn't that GPL'ed? --Morn (talk) 16:24, 8 October 2010 (UTC)
This is called the ShareFeature extension. It is GPL, but currently only works with the skin of Wikia, has the same issues regarding supporting a limited number of commercial services, and most importantly, our feature cannot work without JS, because it needs to screenscrape the HTML to retrieve the proper license and attribution information. TheDJ (talk) 17:24, 8 October 2010 (UTC)

IE8 transparency issue

Microsoft. sigh

Anyone got ideas on how to fix this ? I tried setting it on a parent element, but it doesn't really seem to do the trick either. The blue lines are from the IE8 develop tool inspector btw. don't worry about that. TheDJ (talk) 17:20, 8 October 2010 (UTC)

Success!

Hi, please have a look at this blogpost, I found today by a GoogleAlert (on my real name). All images are from Wikimedia Commons and all attributions were generated by Magnus' ShareIt icons. This is a really great success for this script. I bet that if this blogpost would has be written 1 week before (or earlier) the attributions would'nt be so perfect. Raymond 17:39, 8 October 2010 (UTC)

What didn't work is the ampersand in the second image attribution line, but perhaps the blogging software has escaped the HTML entity. Otherwise it's very nice to see a blog getting attribution right of course. --Morn (talk) 18:10, 8 October 2010 (UTC)

Use mwEmbed code for embedding ogg files

When mwEmbed is finally "finished", we can use the embeddable player. It's rather simple and currently looks like: <object data="http://prototype.wikimedia.org/mwe-gadget/mwEmbed/remotes/../mwEmbedFrame.php?apiTitleKey=Adeste_Fidelis.ogg&apiProvider=commons&skin=kskin&durationHint=123&width=250&" width="250" style="overflow:hidden" ></object>

It should be possible to retrieve it with the getShareEmbedObject() of the player. Probably not a good idea to do this right now, because I expect that uri to change in the immediate future. TheDJ (talk) 18:52, 8 October 2010 (UTC)
updated to a relatively stable url ( did not see this section in the feature request above ) http://commons.wikimedia.org/wiki/File:Nice_People_MEDIUM.ogv?withJS=MediaWiki:MwEmbed.js&embedplayer=yes Mdale (talk) 22:59, 15 November 2010 (UTC)

CJK script is broken in send_email

If source is filled with non-Latin (for example, CJK) script, Source is broken in email program. (Windows Live Mail, Windows XP) Please fix this problem. Thanks. – Kwj2772 (msg) 03:28, 9 October 2010 (UTC)

Please give example links if you encounter issues like this. TheDJ (talk) 12:00, 9 October 2010 (UTC)
Files containing {{Own}}. It should be "자작" but client shows "?먯옉" instead. (uselang=ko). – Kwj2772 (msg) 05:35, 10 October 2010 (UTC)
Works. icw Mail.app. Example tested was File:Kpc1.jpg TheDJ (talk) 10:03, 10 October 2010 (UTC)
still not working for me. – Kwj2772 (msg) 12:38, 10 October 2010 (UTC)
Some googling reveals: "Windows Live Mail and Outlook do not support UTF-8 mailto: links", but then there is this: http://blogs.msdn.com/b/ie/archive/2007/02/12/international-mailto-uris-in-ie7.aspx, which say it is supported under some conditions... TheDJ (talk) 12:53, 10 October 2010 (UTC)

Bug?

Hmm ... when I'm logged in I see the buttons above the image in the gray bar, but when I'm logged out, the buttons appear on the right side of the image - is this correct? LeinaD dyskusja 22:03, 10 October 2010 (UTC)

This is intentional. It was the solution to present a very visible solution to readers, and yet keep current registered users happy as well, who were annoyed by all the "clutter" the "reader mode" was creating. TheDJ (talk) 23:47, 10 October 2010 (UTC)
IMHO buttons on the right look much better :) And I can't see navigation links in gray bar:
  • File
  • File history
  • File usage on Commons
  • Metadata
  • File usage on other wikis

Maybe a good solution would be a gadget, which moves the buttons to the right side or under a gray bar? LeinaD dyskusja 11:27, 11 October 2010 (UTC)

Yeah, they replace links there, because most people simply don't use the TOC anyway. I was personally considering a sort of "buttonbar", but I haven't finished my design yet. In the end it's all a problem of "can't satisfy every person", decisisions will have to be made and preferably without month long votes :D TheDJ (talk) 12:16, 11 October 2010 (UTC)

Author info

The author info needs to be improved, especially when there are creator templates. Something like this perhaps:

var authorNode = $j("#fileinfotpl_aut + td");
var author = '';
$j(authorNode).find("div.vcard span#creator").each(function (idx) {
  if (idx > 0) author += ", ";
  author += $j.trim($j(this).text());
});
if (author.length == 0) author = $j.trim($j(authorNode).text());

(Untested) Lupo 15:39, 16 October 2010 (UTC)

Additionally, the CC-templates (with Attribution) should override the Author-field whenever possible. It is machine readable by getting .licensetpl_attr
Also, since some of the older uploads don't have {{Information}}, but do have {{Creator}}, I suggest not limiting the Creator-search to the authorNode, but instead look through #bodyContent:
var author = '';
$j("#bodyContent div.vcard span#creator").each(function (idx) {
  if (idx > 0) author += ", ";
  author += $j.trim($j(this).text());
});
if (author.length == 0) {
  author = $j.trim($j('.licensetpl_attr').eq(0).text()); // eq(0) because {{Self|GFDL|Cc-by-sa|migration=relicense|author=Foo}} causes two cc-by-sa's (2nd being migration) to show up. Only pick the first one.
}
if (author.length == 0) {
  author = $j.trim($j("#fileinfotpl_aut + td").text());
}
Krinkletalk 15:42, 21 October 2010 (UTC)
And additionally, for photos of statues and such, should the author info contain both the author of the photo as well as that of the sculpture? In particular for still copyrighted sculptures? Lupo 18:13, 21 October 2010 (UTC)

Translation (2)

Just a note which I'll do myself when I have the time. Create a function to get a message instead of hooking into the i18n object directly. Also, name the core one differently so that the loaded translation won't override it. That way the function will pick the translation if available, and if that object item is undefined, it'll pick the english one. For example, right now the Dutch version is returning 'undefined' on via_wikimedia_commons in the attribution. Doing it this way will make it possible to A) add a message without having to add the English-version to other languages to avoid breakage, B) dont force translators to translate everything at once because missing 1 message breaks it. –Krinkletalk 23:30, 28 October 2010 (UTC)

Artworks

The attribution function does not work properly when an "artwork" infobox template is used. In this case, the attribution should be the "source" rather than the "author" or "artist" (the source is the photographer, the author is the the author of the work and the one who owns rights on the photo, see File:Satyr Anapauomenos Musei Capitolini MC2419 n2.jpg for instance). I don't know if it can be fixed here or if something has to be done directly on the template.--Zolo (talk) 20:29, 5 October 2010 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 02:38, 20 July 2017 (UTC)

Bug reports & requests

Hi folks, here are my complaints :-) :

Jean-Fred (talk) 20:04, 5 January 2011 (UTC)

Most of the above is fixed ; this leaves :
  • « Public domain » should be i18n (to display « Domaine public » in French for example)
This is set in {{PD-Layout}}, with <span class="licensetpl_short" style="display:none;">Public domain</span><span class="licensetpl_long" style="display:none;">Public domain</span> ; what can be done? Jean-Fred (talk) 19:33, 21 March 2011 (UTC)

"Use this file" code and download "attribution" code of Creative Commons files should be compatible with OpenAttribute

http://openattribute.com/ is a system allowing people on a variety of websites to easily copy-paste copyright and licensing information when they reuse Creative Commons contents from one website on another website.

I learnt about it the other day at http://lists.wikimedia.org/pipermail/foundation-l/2011-February/063796.html .

It is not working very well on Commons at present, but even if it remains so for the time being, at least the copy-paste code provided by Wikimedia Commons should be (by default or not ? I don't know) made compatible with the markup language they have developped.

That means adding "rel=license" property="cc:attributionName" and that sort of things, as you can see in the source code of http://labs.creativecommons.org/2011/ccrel-guide/examples/multiple_textimage.html .

The aim of this proposal is that after a user adds the "use this file" code from Wikimedia Commons on his own website, the OpenAttribute tool is able to work fine on that website. Teofilo (talk) 15:06, 12 February 2011 (UTC)

This concerns also what happens after a user uses the "html" tick box at the "download all sizes" popup. Teofilo (talk) 12:38, 13 February 2011 (UTC)

The title names of the source files combined in derivative works must be provided

This is a legal requirement for Creative Commons derivative works :

"If you distribute (...) or publicly digitally perform (...) any Derivative Works (...) You must (...) give the Original Author credit (...) by conveying (...) the title of the Work if supplied;

http://creativecommons.org/licenses/by-sa/2.0/legalcode Article 4-c

For example in the case of File:Collage_of_Six_Cats-01.jpg every source file name mentioned in |source= of template:information must be provided in a simplified way as follows or exactly the same way as we can see in the |source= field, with links to each source files, and author names nearby :

  • Tesla the cat 2.jpg
  • Orange tabby cat sitting on fallen leaves-Hisashi-01A.jpg
  • Brown and white tabby cat and flower trees-Hisashi-01.jpg
  • Mackerel tabby cat with orange eyes-Hisashi-02.jpg
  • Black and white cat sitting on a street-Hisashi-01.jpg
  • Stray calico cat near Sagami River-01.jpg

Teofilo (talk) 15:15, 12 February 2011 (UTC)

Would not the easiest approach be to simply provide 100% of the exact contents included in the information template instead of trying to write things in another format, but missing some key legal requirements ? The mouseover might be a little big, but what is the problem with big mouseovers ? Teofilo (talk) 20:39, 12 February 2011 (UTC)

"Mouseovers" cannot contain any markup, not even linebreaks...--DieBuche (talk) 22:50, 12 February 2011 (UTC)
So, for the mouseover, we might simply put commas or semicolons between sets of information, instead of linebreaks. Conversely, the "html" tick box at the "download all sizes" popup could be bigger and be as big as the whole information template (without the |description= part which is not a legal requirement). Teofilo (talk) 12:35, 13 February 2011 (UTC)

"Use this file" box html code for videos

I think the "attribution" html tick box and the "html/bbcode" box should be merged (at least for the html part : bbcode might remain separate). They should provide a ready-to-use "video + licensing/attributing caption", fulfilling the Creative Commons legal code requirements.

If we want to use the OpenAttribute markup, this would result into something like this for File:Time_Lapse_of_New_York_City.ogv :

<table class="video">
<tr><td>
<iframe src="http://commons.wikimedia.org/wiki/File:Time_Lapse_of_New_York_City.ogv?withJS=MediaWiki:MwEmbed.js&embedplayer=yes" width="500" height="281" frameborder="0" ></iframe>
</td></tr>
<tr><td class="caption">
<span about="http://www.flickr.com/photos/26395784@N00/2968646319/" xmlns:dct="http://purl.org/dc/terms/" xmlns:cc="http://creativecommons.org/ns#"><a href="http://www.flickr.com/photos/26395784@N00/2968646319/" property="dct:title">From Bluerock's office window in New York City</a> / <a rel="cc:attributionURL" property="cc:attributionName" href="http://www.flickr.com/photos/tylersparks/">Tyler Sparks</a> / <a rel="license" href="http://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a> via <a href="http://commons.wikimedia.org/wiki/File:Time_Lapse_of_New_York_City.ogv">Wikimedia Commons</a></span>
</td></tr>
</table>

Teofilo (talk) 13:57, 13 February 2011 (UTC)

The "embed on a page" code provided by the Kaltura player at the end, when the video stops running, should also provide this sort of code with full licensing and attribution information, possibly with the OpenAttribute markup. The "credit" option provided by the Kaltura player at the end of the video should be filled with the exact credits, which is not presently the case. Teofilo (talk) 14:10, 13 February 2011 (UTC)

I tried to use the tool at http://creativecommons.org/choose/

The following kind of code is provided  :

<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Contrat Creative Commons" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/MovingImage" property="dct:title" rel="dct:type">titleofvideo</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http:www.thecreatorshomepage.org" property="cc:attributionName" rel="cc:attributionURL">Nameofcreator</a> est mis à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">licence Creative Commons Paternité 3.0 Unported</a>.<br />Basé(e) sur une oeuvre à <a xmlns:dct="http://purl.org/dc/terms/" href="http:www.theinternetsitewhereifoundthevideo.ogg" rel="dct:source">http:www.theinternetsitewhereifoundthevideo.ogg</a>.<br />Les autorisations au-delà du champ de cette licence peuvent être obtenues à <a xmlns:cc="http://creativecommons.org/ns#" href="http:www.thecreatorshomepage.org" rel="cc:morePermissions">http:www.thecreatorshomepage.org</a>.

Teofilo (talk) 15:28, 20 February 2011 (UTC)

fix or disable for Internet explorer. It is crashing the whole browser.

Please see Commons:Village_pump#Internet_Explorer_.28IE.29_8.0.6_and_IE_7.0.6_crash (archived here)

Thank you! --Saibo (Δ) 15:00, 17 February 2011 (UTC)added archive link --Saibo (Δ) 00:29, 2 May 2011 (UTC)

"Edit 2011-02-17T15:10:17 DieBuche" disabled it. Now in both my test system the problem does not occur anymore. Thank you! Viele Grüße --Saibo (Δ) 15:30, 17 February 2011 (UTC)
Maybe add a link/hint in the comment line ("// Disabled for Opera 9.27 and below") to this section here so people do understand why it is disabled for msie. ;-) --Saibo (Δ) 00:29, 2 May 2011 (UTC)


Maybe this script works now in IE (similar crash was fixed by using a newer jquery version - see https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=60698104#IE_8_crash ) I would test it but I do not know how since I have no adblock in IE. Cheers --Saibo (Δ) 18:56, 8 October 2011 (UTC)

A caption version should be provided in addition to the present mouseover version

The present solution using a en:mousover is not suitable for printing. Webmasters should be provided with an alternative code using a caption below the picture. This could be combined with the above proposal about OpenAttribute. Teofilo (talk) 15:47, 12 February 2011 (UTC)

Where is the gadget supposed to be located ?

When I am logged in, I see the gadget above the picture, as a header. The "File-File history-File usage on Commons-Metadata" header/Table of contents disappears.

When I am logged off, I see the gadget as a sidebar on the right side of the picture.

Is this a feature or a bug ?

Teofilo (talk) 15:37, 17 February 2011 (UTC)

Unless I am mistaken, feature. It was argued that for visitors buttons had to be big to be useful ; and long-time users complained it was using too much space. Thus solution. :-þ Jean-Fred (talk) 16:00, 17 February 2011 (UTC)
You are probably right. This is another reason why there should be a help page available explaining in which cases the tool will be a horizontal bar, and in which cases a vertical right-hand-side sidebar, and what User preferences I must set in order to choose the horizontal version or the vertical version. Teofilo (talk) 16:04, 17 February 2011 (UTC)

The horizontal toolbar version should be centered on the center of the picture (at 512 px for a 1024 px wide picture) rather than the center of the html page. Or left-aligned, which would be consistent with the information template. Teofilo (talk) 11:32, 20 February 2011 (UTC)

Missing URI of CC legalcode in "Use this file on the web"

Displaying the URL of or the hyperlink to the CC legalcode is a central requirement of the license (see 4.a de, en). I miss that in most of the codes displayed when using the gadget "Use this file on the web". An example:


  • Page URL:

http://commons.wikimedia.org/wiki/File:Landtag_Th%C3%BCringen_2011-05-18_(9).JPG

  • File URL:

http://upload.wikimedia.org/wikipedia/commons/5/56/Landtag_Th%C3%BCringen_2011-05-18_%289%29.JPG

  • Attribution:[1]

Foto: Martina Nolte / Lizenz: Creative Commons CC-by-sa-3.0 de, via Wikimedia Commons

  • (with HTML button enabled:)
<p>Foto: <a href="http://de.wikipedia.org/wiki/User:Martina_Nolte" class="extiw" title="de:User:Martina Nolte">Martina Nolte</a> / Lizenz: <a href="http://creativecommons.org/licenses/by-sa/3.0/de/legalcode" class="external text" rel="nofollow">Creative Commons CC-by-sa-3.0 de</a>

, <a href='http://commons.wikimedia.org/wiki/File:Landtag_Th%C3%BCringen_2011-05-18_(9).JPG'>via Wikimedia Commons</a>
  • HTML/BBCode:[1]

<a title=' Foto: Martina Nolte / Lizenz: Creative Commons CC-by-sa-3.0 de , via Wikimedia Commons' href='http://commons.wikimedia.org/wiki/File:Landtag_Th%C3%BCringen_2011-05-18_(9).JPG'><img width='800' alt='Landtag Thüringen 2011-05-18 (9)' src='http://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Landtag_Th%C3%BCringen_2011-05-18_%289%29.JPG/800px-Landtag_Th%C3%BCringen_2011-05-18_%289%29.JPG'/></a>

  • with BBCode enabled:[2]

[url=http://commons.wikimedia.org/wiki/File:Landtag_Th%C3%BCringen_2011-05-18_(9).JPG][img]http://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Landtag_Th%C3%BCringen_2011-05-18_%289%29.JPG/800px-Landtag_Th%C3%BCringen_2011-05-18_%289%29.JPG[/img][/url] [url=http://commons.wikimedia.org/wiki/File:Landtag_Th%C3%BCringen_2011-05-18_(9).JPG]Landtag Thüringen 2011-05-18 (9)[/url] [CC-BY-SA-3.0-de (www.creativecommons.org/licenses/by-sa/3.0/de/deed.en)], by Martina Nolte (Eigenes Werk), from Wikimedia Commons

  1. a b URI of CC legalcode missing
  2. hyperlink to the english deed instead of hyperlink to CC legalcode and original credit line (see above) slightly changed

This bug leads to illegitimate reuses. Could that be fixed? --Martina talk 18:32, 21 June 2011 (UTC)

 Info A user informed me that this occures in images where the template:credit line is embedded. If not, the gadget seems to continuously show the en-deed (instead of hyperlink to the legalcode):

--Martina talk 18:43, 21 June 2011 (UTC)
This falls into the category: "everything can be fixed but someone needs to do some actual work and no one is doing it so it is not getting fixed until someone does some actual work". Too busy RL myself. TheDJ (talk) 19:40, 21 June 2011 (UTC)
Unless I am mistaken linking to the legalcode is not mandatory, linking to the deed is enough − that is what is actually stated in, er, the deed : « For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. ».
The all point of the deed is to be human readable to show to normal people. Linking it just makes sense. This is what Flickr does, what OSM asks for, etc.
Jean-Fred (talk) 20:25, 21 June 2011 (UTC)
We are dealing with two issues.
  1. The gadget obviously cannot properly handle the credit line (most codes lack of any licence URI/URL)
  2. The deed's disclaimer says itself: The Commons Deed is not a license. [...] This Deed itself has no legal value, and its contents do not appear in the actual license. (bold marking by me) The CC legalcode says: You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. This is, of course, a mandatory condition.
Both bugs are sending trustful reusers into unauthorized usages. --Martina talk 11:14, 22 June 2011 (UTC)
  1. Yeah, that sucks.
  2. So, basically, Flickr, Google Knol, Vimeo, DeviantArt, PloS, these major companies and institutions featured as examples on Creative Commons front page are wrongly using the Creative Commons licenses ? Even the Creative Commons website itself and Lawrence Lessig himself are? Please.
Jean-Fred (talk) 12:53, 22 June 2011 (UTC)
Does the URI requirement really require the URL to the deed or license text? Per en:URI "one can classify URIs as locators (URLs), or as names (URNs), or as both." I.e. perhaps simply "CC-BY-SA-3.0-de" (or the same written out in full) is enough. Also note that on the official FAQ it says "Cite the specific CC license the work is under. If you are publishing on the Internet, it is nice if the license citation links to the license on the CC website." (emphasis added by me) i.e. a link is not a requirement (yet personally I believe it's nevertheless useful). /129.215.149.98 14:52, 22 June 2011 (UTC)
Other platforms or CC FAQ (even more when addressing publishers not reusers) are not a measure (neither is en:URI, contradicting de:URI/de:URN. The author himself might publish it with a link to the deed, but reusers have to follow the terms of the legalcode. The [German CC version even says deren vollständige Internetadresse (its full internet address). There's nothig to interpret or discuss about that. --Martina talk 17:39, 22 June 2011 (UTC)
There you go: here the CC blog reuses a Flickr photo, not as the publisher of the picture. Here Lessig reuses an xkcd sketch. I’m sorry, but in these conditions I am not going to change my mind with your opinion only against the practices of people who happen to be quite knowledgeable on the subject. Please provide some sources to back your interpretation (the existence of alternate interpretations quite clearly mean there is something to interpret and discuss here). Jean-Fred (talk) 13:32, 23 June 2011 (UTC)
Whom could we ask to fix it? (I am sorry, cannot write one single line of program code) --Schwäbin (talk) 20:53, 22 June 2011 (UTC)
I am sorry, but I am lost what are we discussing here. Is the whole discussion about if we should be linking to either:
If that is the whole controversy than I think we are slitting hairs here, since the first page links to the second and second page links to the first. First page gives you the essence using readable language and second one gives you all the gory details in en:Legalese#Legalese. It makes no sense for anybody to suffer the details without first reading the bullet points. --Jarekt (talk) 21:08, 23 June 2011 (UTC)
As far as I can tell, there is not a single, right solution to this. You might notice here that similar issues are raised daily, and usually CC people just link to their FAQ/best practices section (I cannot find it now, but I remember clearly an answer given to a Commons user there saying what I stated earlier; you might ask there for an advice, but do not expect official or final answers). If you ask me, we'd be safe with the legal code (I'd +1 this), but we'd be ok with the deed too as the first one is just a click away. This said, I don't see how unjustified animosity toward an user legitimately pointing out a potential issue might take us anywhere. --Elitre (talk) 21:25, 23 June 2011 (UTC)
You’re right, thanks for pushing some perspective in my mind. I was getting into a hotted debate quite unnecessary and totally unjustified. Jarekt spoke my mind better than I did. Thanks to both. Jean-Fred (talk) 22:52, 23 June 2011 (UTC)
If I use the template:credit line when uploading my pictures, any person who might want to use my pictures elsewhere on the internet, clicking Use this file on the web will NOT receive a link to neither the deed nor the legal code. That was the first point that Martina made, as far as I understood. So it is a question of programming, isn't it? --Schwäbin (talk) 21:34, 23 June 2011 (UTC)
It is, yes. Jean-Fred (talk) 22:52, 23 June 2011 (UTC)
I do not know how this script works but since searching for "credit line" returns nothing I assume it does not look for {{Credit line}} template. And I agree that it should, that is one of the standard ways users could specify exact attribution format. Other way is the attribution parameter in license templates for example in {{{1}}} in {{Cc-by-sa-3.0}} or "author" and "attribution" in {{Self}}. I am not sure if this script can parse those either. --Jarekt (talk) 03:54, 24 June 2011 (UTC)
Huh. I was sure this was done through fileinfotpl_xxx fetching, but it appears {{Credit line}} does not set it... Maybe we should push that into the template, so the script would get it? Jean-Fred (talk) 06:50, 24 June 2011 (UTC)
Since I do not speak programmer's language, I do not understand your debate (never mind), but may I add a wish if you are about to fix the link anyway? I publish my pictures under CC-BY-SA 3.0 de, that is the German ported version. I would appreciate the link leading not to the English version of the deed, but to the German version (or the German legalcode, but this was the point that made the feelings run high above and I do not wish to press on this). Is that a wish that may become true? --Schwäbin (talk) 09:24, 24 June 2011 (UTC)
  • @Jean-Fred I am not familiar with fileinfotpl_xxx could you add it to {{Credit line}} or tell me how to use it?
  • @Schwäbin in {{Credit line}} you can point to any license in any language. If we get it to work with this script than your wish would come true.
--Jarekt (talk) 13:53, 24 June 2011 (UTC)
I’ll try to have a look into that script and what can be done tomorrow. Jean-Fred (talk) 21:12, 24 June 2011 (UTC)

Hi folks, when working on languages let's do it right from the very beginning. It's nice to see how we translate our templates in any languages out there by the same pattern (subpages that is). I am rather bewildered to notice that we don't do that for CC licences so far. Question to our tech folks: is business as usual (via subpages) the proper method for this issue or does this require serious coding? Regards, PETER WEIS TALK 15:46, 24 June 2011 (UTC)

The CC licenses use a more advanced system that the ususal subpages thing, using the MediaWiki system messages and TranslateWiki. See this post by Guillaume Paumier for a comprehensive overview. Jean-Fred (talk) 21:12, 24 June 2011 (UTC)
Thanks for the hint. I wonder if we could use this for other static licences, such as pd-us-gov as well. Regards, PETER WEIS TALK 10:03, 29 June 2011 (UTC)
Browse through Commons:Template i18n and look for dark gray rows - all those templates are internationalized using TranslateWiki. We are slowly moving towards converting other templates. Unfortunately very few people know how to do it, since the process is not documented as far as I know. --Jarekt (talk) 13:12, 29 June 2011 (UTC)

The field Attribution is fine now

But HTML/BBCode still gives a wrong attribution without any licence link or in BBCode only with the - english - deed:

[url=http://commons.wikimedia.org/wiki/File:Augustinerkloster_Erfurt_19-05-2011_DSCF6230.jpg]Augustinerkloster Erfurt 19-05-2011 DSCF6230[/url] [CC-BY-SA-3.0-de (www.creativecommons.org/licenses/by-sa/3.0/de/deed.en) or CC-BY-SA-3.0-de (www.creativecommons.org/licenses/by-sa/3.0/de/deed.en)], by Martina Nolte (Eigenes Werk), from Wikimedia Commons An issue since 2010. --Martina talk 21:33, 15 August 2011 (UTC)

maybe this is a resulting error:
HTML attribution at http://commons.wikimedia.org/wiki/File:Dibba_on_24_November_2007_Pict_2.jpg?uselang=de misses the protocol and // for both license text links.
By Imre Solt [<a href="www.gnu.org/copyleft/fdl.html">GFDL</a> or <a href="www.creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA-3.0</a>], <a href='http://commons.wikimedia.org/wiki/File:Dibba_on_24_November_2007_Pict_2.jpg'>via Wikimedia Commons</a>
Cheers --Saibo (Δ) 19:08, 8 October 2011 (UTC)
Cannot find these incomplete URLs in the script.. no clue where they come from. --Saibo (Δ) 16:06, 13 October 2011 (UTC)

Credit line should be more proeminent

Quick hack

Hi,

This blogpost by User:Ludo29 is some food for thought about this tool. What is argued there is that the “Credit line” (John Doe, CC-BY-SA) is not proeminent enough, and is buried between other information. Indeed, it may be accessed either by the “Download” button (which may be unexpected), with other URLs ; or by the “use the file on the web”, with blocks of HTML below. There is definitive (albeit anecdotal) evidence that make the credit line hard to find.

Okay, brainstorming time. I played around and have a first idea, depicted on the screenshot on the right.

Thoughts ? Better, worse ?

Jean-Fred (talk) 21:43, 21 March 2012 (UTC)

Good blog post by User:Ludo29, it deserves to be widely shared in the Wikimedia universe. Although I unfortunately do not read French, I had no problems reading it using Google Translate. I also agree with Ludovic in the comments – why require the click of a button at all? I would prefer just a box with text right under the image, "Credit as: Joe Ravi [CC-BY-SA 3.0, etc...]" maybe even in a slightly larger font than the rest of the text. In some cases, this will duplicate the exact information already on the page (e.g. when {{Credit line}} is used), and sometimes it might say something empty or broken, but I think it's worth it for consistency and ease of finding this important info. This will also encourage contributors to machine-readably tag their uploads.
(If Ludo's suggestion would for some reason not be acceptable by the community, your proposed change in the screenshot is an improvement from the current situation.) /skagedaltalk 13:10, 23 March 2012 (UTC)
 Support. --McZusatz (talk) 07:59, 15 July 2012 (UTC)

{{Credit line}} should not be ignored

Related to the discussion on the German Village pump: The stockphoto gadget ignores the {{Credit line}} which could lead to legal problems.

--McZusatz (talk) 07:59, 15 July 2012 (UTC)

  • This is not a reply to you, McZusatz but I'd like to add some general points. The problem is that people invent new templates without adjusting the scripts or notifying the script-authors or thinking about them. This really s****. The same is true for the edit-summaries the bots use: They change and if your script tries to extract the original uploader you can go mad. I am just not sure how one could educate people... I thought it would be in the interest of the photographers to get correct attribution but when I see some distracting colorful author-templates I am not sure anymore. This means that I'll refrain from improving this script as long as script devs have to run after the whole world. -- Rillke(q?) 21:20, 15 July 2012 (UTC)
This sounds like a lot of work to do. Something has to be done to keep an overview over all the templates and stuff... Maybe only the most common license templates of the whole license jungle should be kept and replace the "colorful" ones, as you call them. --McZusatz (talk) 11:32, 16 July 2012 (UTC)

HTML generated by "use this code" does not work as img src URL is missing scheme

On Wikimedia commons the "HTML/BBCode" HTML for "use this file" includes image URLs that are without a protocol scheme. That is:

src="//upload.wikimedia.org/wikipedia/commons/3/3b/Glenda_dog_blue_eye.jpg")

instead of:

src="http://upload.wikimedia.org/wikipedia/commons/3/3b/Glenda_dog_blue_eye.jpg")

This happened once before and I was told it had to do with the switch to HTTPS, but it was restored and hence I could easily paste that code elsewhere. Now,the scheme has gone missing again in the past week or so. — Preceding unsigned comment added by Reagle (talk • contribs) 09:22, 26 March 2012 (UTC)

This is actually valid HTML! It's called a protocol relative URL and is used on Wikimedia Foundation wikis for URLs. When the browser follows a protocol relative URL, it uses http if on a http page, https if on a https page. This has some advantages, for example to get rid of annoying messages in Internet Explorer that appears when http delivered images are emedded in https delivered documents.
The generated html for "use this file" was changed by Krinkle on 2012-03-19 with the edit message: "remove "location.protocol + " from stockphoto_get_thumbnail_url(). The html given to people for usage on their own site should be protocol relative, no reason not to. that means https for https sites, and http for https sites."
So it's the intended behavior, and not a bug. I'm not all convinced it's the best behavior here, since this is code generated for use elsewhere, and most other places use URLs with absolute protocol scheme. Could there be places where you'd want to paste your HTML where this is not accepted? Reagle, are you having such problems? If so, where are you trying to use the HTML? /skagedaltalk 11:24, 27 March 2012 (UTC)
Ah, I now found the last time this issue was raised. So, it causes problems when pasting HTML into local documents – which is natural, since there is then no http or https to relate to. I agree that it should be changed back again: "relative" only makes sense when we know what we're relative to. Otherwise, explicit is better. /skagedaltalk 11:31, 27 March 2012 (UTC)
It is about re-usage on the web. On the web it will be relative to the current protocol of the web page it is embedded in. So if you paste it into a wordpress article on a server that uses HTTP, then it will load the image from HTTP://upload.wikimedia.org. If you paste it into an HTML document on a HTTPS server, it will load the image from HTTPS://upload.wikimedia.org. This works fine and it is supported in all major browsers (and has been for a very long time; just like a href="/wiki/Sandbox" works as relative path within a domain, //server/path works are relative path for a protocol).
I don't think local navigating via file:/// is a use case we should support (not to confuse with local navigation of html files through http://localhost, which works fine). And if you really do want to use it local file without a webserver, or are creating custom things (like rich HTML emails), then use the url displayed in the input fields (e.g. "File URL:") which are not protocol-relative or simply add the protocol to the html snippet manually. –Krinkletalk 14:25, 30 March 2012 (UTC)
Could you clarify what the benefits are of using the same protocol as the embedding document? Except for the annoying message in IE? /skagedaltalk 21:22, 30 March 2012 (UTC)
It seems arbitrary to simply say you are going to throw out support for a major Web protocol/scheme, that is "file:", and hence people can't see images on pages when viewed from a file system. I used the the images this way and have done so for a while now. I don't use IE and don't see these nags, if that's the sole reason, sounds like a clientside issue. -Reagle (talk) 21:45, 12 April 2012 (UTC)

If the BBCode is missing the URL scheme, it seems to be impossible to use it in some server software. Reported at talk page of German Main page. -- Rillke(q?) 20:50, 6 October 2012 (UTC)

Info

See also m:Meta:Babel/Archives/2008-12#Proposal_to_disable_hotlinking; Add this at Commons, Problems using pictures from Commons in Blogger - making it more of a stock photo repository (August 2010), [Commons-l] Nice icons... (October 2010), Commons:Village_pump/Archive/2010/10#Share_this, Commons:Village_pump/Archive/2010/10#Disable_file_menu_with_icons, Commons:Village_pump/Archive/2010/10#Share_icons, Commons:Village_pump/Archive/2010/10#.22Use_this_file.22_is_a_bit_of_a_mess

This script displays download/attribution buttons next to images under the Vector skin. Original author is Magnus Manske (talk).

Tickets

See also MediaWiki talk:Stockphoto.js/Closed tickets
This section was archived on a request by: Hedwig in Washington (mail?) 03:58, 6 June 2017 (UTC)

Social icons

While I understand the change to remove social icons by default a few months ago, I as a personal choice would like to have them. I ended up duplicating StockPhoto.js under my personal space and then restoring old social code.

Unsurprisingly, it doesn't work. Is there a posibility that someone may take a look and help making this optional? (Perhaps creating a gadget that sets variable=true and correctly enabling the missing code? -- Magister Mathematicae 09:29, 16 March 2011 (UTC)

New buttons

We have these new buttons on the image page. Wondering how we would go about improving the "use this file on a wiki" output? Rather than it substituting the file name as the caption can we set it so that it uses the description? This would say me a few operations.--James Heilman, MD (talk) 00:50, 5 April 2011 (UTC)

Anyone? --James Heilman, MD (talk) 01:14, 29 May 2011 (UTC)

No buttons on some pages

Some pages like File:Side view of adobe house with water in foreground," Acoma Pueblo (National Historic Landmark, New Mexico).", 1933 - 1942 - NARA - 519834.TIF do not have Stockphoto buttons, while other images from the same mass upload do, like File:"Two Medicine Lake, Glacier National Park," Montana, 1933 - 1942 - NARA - 519874.tif. Actually, most images in Category:Media from the National Archives and Records Administration needing categories are missing them. --Jarekt (talk) 16:06, 22 July 2011 (UTC)

It seems to work better now than before. "Use this file" on File:"Two Medicine Lake, Glacier National Park," Montana, 1933 - 1942 - NARA - 519874.tif used note something like "see page", if I recall correctly. Possibly this is due to Template:NARA-Author having been edited since. --  Docu  at 10:01, 24 July 2011 (UTC)

The buttons are not showing on File:Hauling guns by ox teams from Fort Ticonderoga for the siege of Boston, 1775 - NARA - 531113.tif : what should I do ? Teofilo (talk) 16:04, 27 July 2011 (UTC)

Without knowledge of codes, I'd say: There are a lot of unusual fields in the source code. Especially field author = not specified and instead field = creator. I guess you cannot expect a script to work on this. --Schwäbin (talk) 08:03, 20 October 2011 (UTC)
At least it is no issue with ".tif" (works at this file). --Saibo (Δ) 15:23, 20 October 2011 (UTC)

Escaping fix in URLs

{{Editprotected}}

Recommend using encodeURIComponent in place of encodeURI to fix escaping bug in description page backlink when contains "?". Thanks! --brion (talk) 18:31, 19 October 2011 (UTC)

Doing it. --Saibo (Δ) 19:04, 19 October 2011 (UTC)
Should be fixed. Tested it. --Saibo (Δ) 19:18, 19 October 2011 (UTC) ✓ Done


The ? is fixed but not the ' signs. Test case: File:ThisisatestX" onclick="alert('XSS');" title="y.png produces this HTML code for reuse:

<a title='By idea by de:Benutzer:Schnark, image faithfully created by Saibo (Δ) [Public domain, CC0 (creativecommons.org/publicdomain/zero/1.0/deed.en) or Public domain], via Wikimedia Commons' href='https://commons.wikimedia.org/wiki/File%3AThisisatestX%22_onclick%3D%22alert('XSS')%3B%22_title%3D%22y.png'><img width='640' alt='ThisisatestX&quot; onclick=&quot;alert(&#039;XSS&#039;);&quot; title=&quot;y' src='https://upload.wikimedia.org/wikipedia/commons/2/22/ThisisatestX%22_onclick%3D%22alert%28%27XSS%27%29%3B%22_title%3D%22y.png'/></a>

Unescaped ' in href. --Saibo (Δ) 19:28, 19 October 2011 (UTC)

Icons are separated from their text if line length is too short (line break)

(with big icons - not logged in)

They should break (together with their text) to the next line. That is especially strange if the horizontal layout is shown. --Saibo (Δ) 16:10, 6 February 2012 (UTC)

Some questions on the code

  1. Sometimes it prints "via Wikimedia Commons" and sometimes "from Wikimedia Commons". This is controlled by the variable stockPhoto.fromCommons, which defaults to false (i.e., "via" Wikimedia Commons), but is set to true if either: 1. the author field contains the text "Original uploader was", or 2. the author field is non-empty and an element with id "own-work" is found. What is the logic behind this? Is it to do with files automatically transferred from other wikis?
  2. What is the origin of the [▼] that is stripped with the if (author.substr(0, 3) === '[&#9660;]') ... code?

Hmm, there were other things... but let's start there. :) /skagedaltalk 21:28, 8 March 2012 (UTC)

For #1 : Media hosted here may either be the production of Wikimedians and uploaded here (or in some Wikimedia project) in the first place (labeled as "own work"), or be made available from somewhere under a free license and copied over here. I guess the distinction is made to reflect this, and "advertise" Commons justly and only when this is really justified. Jean-Fred (talk) 23:23, 12 March 2012 (UTC)
Ok, thanks! That makes sense — almost: it's not entirely clear to me why files transfered from Wikipedia (or other Wikimedia projects) should be labeled as "from Wikimedia Commons", are these always work by Wikimedians? Here's one counterexample... /skagedaltalk 12:38, 13 March 2012 (UTC)

file, fullImageLink and fullMedia

Just so you know, I recently committed changes to MediaWiki to make those classes more consistent. It really was a mess and tools like this show it. TheDJ (talk) 12:10, 30 October 2010 (UTC)

Japanese translation

{{Editprotected}}

I'd like to add my Japanese (ja) translation.

stockPhoto.i18n = {
      reuse: 'このファイルを再利用',
      download: 'ダウンロード',
      download_this_file: 'このファイルをダウンロードする',
      use_this_file_web: 'このファイルをウェブで利用する',
      use_this_file_web_short: 'このファイルを利用',
      use_this_file_wiki: 'このファイルをウィキで利用する',
      use_this_file_wiki_short: 'このファイルを利用',
      email_link_short: 'リンクをメールで送信',
      information: 'ご案内',
      remove_icons: 'これらのアイコンを隠す',
      all_sizes: '全てのサイズ',
      on_a_website: 'ウェブで',
      on_a_wiki: 'ウィキで',
      to_this_file: 'このファイルへ',
      about_reusing: '再利用について',
      look_what_i_found: 'ウィキメディア・コモンズで見つけたもの : ',
      from_wikimedia_commons: 'ウィキメディア・コモンズより',
      via_wikimedia_commons: 'ウィキメディア・コモンズ経由で',
      by: '作者',
      by_u: '作者',
      see_page_for_author: '作者のページを見る',
      see_page_for_license: 'ライセンスのページを見る',
      page_url: 'ページURL',
      file_url: 'ファイルURL',
      attribution: '著作権者表示',
      no_attr: '著作権者の表示は必須ではありません',
      or: 'または',
      gfdl_warning: 'このファイルを利用するにあたって<a href="//ja.wikipedia.org/wiki/GNU_Free_Documentation_License">GFDL</a>の完全な文書を添付することが求められる場合があります。',
      download_image_file: '画像ファイルをダウンロード',
      full_resolution: '最大解像度',
      not_available: '利用不可',
      share_this_file: 'このファイルを共有',
      html: 'HTML',
      bbcode: 'BBコード',
      px_wide_icon: 'ピクセル(幅、アイコン)',
      px_wide: 'ピクセル(幅)',
      wikipedia_instant_commons: 'Wikimedia/InstantCommons',
      thumbnail: 'サムネイル',
      image: '画像',
      share_on_facebook : "Facebookで共有" ,
      share_on_digg : "Digg.comで共有" ,
      share_on_delicious : "deliciousで共有" ,
      share_on_reddit : "reddit.comで共有" ,
      share_on_stumbleupon : "stumbleupon.comで共有" ,
      share_on_yahoo_buzz : "Yahoo! Buzzで共有" ,
      share_on_identi_ca : "identi.caで共有" ,
      share_on_google_buzz : "Google Buzzで共有" ,
      share_on_twitter : "twitter.comで共有" ,
      reusing_content_url: 'Commons:ウィキメディア内のコンテンツを外部で再利用する'
};

Thank you. Darklanlan (talk) 00:56, 15 December 2016 (UTC)

✓ Done Thanks! --Hedwig in Washington (mail?) 19:33, 17 December 2016 (UTC)

Russian translation

{{Editprotected}}

Please replace text in MediaWiki:Gadget-Stockphoto.js/ru page (updated).

// <source lang="javascript">
stockPhoto.i18n = {
  reuse: 'Использовать этот файл',
  download : 'Загрузить' ,
  download_this_file : "Загрузить этот файл" ,
  use_this_file_web : "Использовать этот файл в вебе" ,
  use_this_file_web_short : "Использовать файл" ,
  use_this_file_wiki : "Использовать файл в вики" ,
  use_this_file_wiki_short : "Использовать файл" ,
  email_link_short : "Отправить на e-mail" ,
  information : "Информация" ,
  remove_icons: "Убрать эту иконку",
  all_sizes : "все размеры" ,
  on_a_website : "в вебе" ,
  on_a_wiki : "в вики" ,
  to_this_file : "ссылку на этот файл" ,
  about_reusing : "об использовании" ,
  look_what_i_found : "Смотрите, что я нашёл на Викискладе: " ,
  from_wikimedia_commons : "с Викисклада" ,
  via_wikimedia_commons: "через Викисклад",
  by : "автор" ,
  by_u : "Автор" ,
  see_page_for_author : "См. страницу автора" ,
  see_page_for_license : "см. страницу лицензии" ,
  page_url : "URL страницы" ,
  file_url : "URL файла" ,
  attribution : "Указание авторства" ,
  no_attr: "Указание авторства не требуется",
  or: "или",
  gfdl_warning : "Использование этого файла может потребовать присоединение полной копии <a href='http://en.wikipedia.org/wiki/GNU_Free_Documentation_License'>GFDL</a>" ,
  download_image_file : "Загрузить файл изображения" ,
  full_resolution : "Полное разрешение" ,
  not_available : "не доступно" ,
  share_this_file : "Поделиться этим файлом" ,
  html : "HTML" ,
  bbcode : "BBCode" ,
  px_wide_icon : "px (ширина; иконка)" ,
  px_wide : "px (ширина)" ,
  wikipedia_instant_commons : "В проектах Викимедия или с поддержкой InstantCommons" ,
  thumbnail : "Превью",
  image : "Изображение",
  share_on_facebook : "Добавить в закладки на Facebook" ,
  share_on_digg : "Поделиться на Digg.com" ,
  share_on_delicious : "Поделиться на delicious" ,
  share_on_reddit : "Поделиться на reddit.com" ,
  share_on_stumbleupon : "Поделиться на stumbleupon.com" ,
  share_on_yahoo_buzz : "Поделиться на Yahoo! Buzz" ,
  share_on_identi_ca : "Поделиться на identi.ca" ,
  share_on_google_buzz : "Поделиться на Google Buzz" ,
  share_on_twitter : "Поделиться на twitter.com" ,
  reusing_content_url : "Commons:Использование_содержимого_Викисклада_вне_проектов_Викимедиа"
};
// </source>

Thanks. --Kaganer (talk) 17:07, 13 May 2016 (UTC)

✓ Done Awesome! Thank you! ~riley (talk) 20:41, 13 May 2016 (UTC)

Problem with the Slovak translation?

@Jarekt: I have translated this gadget into Slovak and now it seems that something went wrong. After creating the page MediaWiki:Gadget-Stockphoto.js/sk firstly there was no change (perhaps some caching) and now this gadget disapeared - but only when switched to Slovak language (for example also the gadget MyLangNotify is not working). When switched to other languages everything is OK. I have made more changes to the Slovak translation in tha past time - is it possible, that I accidently disabled some kinds of gadgets from the Slovak language, or is there a problem in this gadget? I have no idea. --LacoR (talk) 21:25, 20 February 2016 (UTC)

LacoR I do not speak JS so I will not be able to help much. I did some minor code cleanup to make it look more like DE version but if it does not work we might have to ask the code developers for help. --Jarekt (talk) 22:40, 20 February 2016 (UTC)
@Jarekt:  Thank you.
Now it is working. It seems your clean up helped - I think the problem was with the string "gfdl_warning" with apostrophes mismatch. Thank you very match.--LacoR (talk) 17:31, 22 February 2016 (UTC)

A very weird Preferences page

Hello,

My wiki is here. I'm trying to install the Stockphoto gadget. Here's what I've done so far:

  1. Tried to import the .xml file. This didn't work, and it threw up an error message about Scribunto.
  2. Installed the Scribunto extension. It's now showing up on the Special:Version page. That means it worked, right? :S
  3. Tried again to import the .xml file. It said it was successful.
  4. Added the line the page gave me to the MediaWiki:Gadgets-definition page. That seems to have gone okay, but I don't know - maybe I did it wrong?

And when I go to the Gadgets tab of Preferences, I now get this epic wall of code (screenshot).

What did I do? D: How do I fix it?

Edit: Also there is no change whatsoever to the File:File.jpg pages. — Preceding unsigned comment added by Cassolotl (talk • contribs) 13:46, 06 February 2016 (UTC)

--Cassolotl (talk) 13:37, 6 February 2016 (UTC)

Turkish translation

{{Editprotected}}

Add MediaWiki:Gadget-Stockphoto.js/tr page.

// <source lang="javascript">
stockPhoto.i18n = {
        reuse: 'Dosyanın yeniden kullanımı',
        download: 'İndir', 
        download_this_file: "Bu dosyayı indir", 
        use_this_file_web: "Dosyayı Web'de kullanın",
        use_this_file_web_short: "Dosyayı kullanın",
        use_this_file_wiki: "Bir Viki'de bu dosyayı kullanın",
        use_this_file_wiki_short: "Bu dosyayı kullanın",
        email_link_short: "E-posta gönderin",
        information: "Bilgi",
        remove_icons: "Simgeleri kaldır",
        all_sizes: "tüm boyutlarda",
        on_a_website: "Web'de",
        on_a_wiki: "Viki'de",
        to_this_file: "bu dosyadan",
        about_reusing: "yeniden kullanım hakkında",
        look_what_i_found: "Bu dosyayı Wikimedia Commons'ta buldum: ",
        from_wikimedia_commons: "Wikimedia Commons'ta",
        via_wikimedia_commons: "Wikimedia Commons'ta",
        by: "tarafından",
        by_u: "tarafından",
        see_page_for_author: "Yazarı için sayfaya bakınız",
        see_page_for_license: "Lisansı için sayfaya bakınız",
        page_url: "Sayfa URL'si",
        file_url: "Dosya URL'si",
        attribution: "Atıf",
        no_attr: "Atıf yasal olarak gerekli değil",
        or: "ya da",
        gfdl_warning: "Bu dosyayı kullandığınızda <a href="//tr.wikipedia.org/wiki/GNU_Özgür_Belgeleme_Lisansı">GÖBL</a> lisansının tam bir kopyasını kullanmanız gerekebilir",
        download_image_file: "Görüntü dosyasını indir",
        full_resolution: "Tam çözünürlük",
        not_available: "kullanılamaz",
        share_this_file: "Bu dosyayı paylaş",
        html: "HTML",
        bbcode: "BBCode",
        px_wide_icon: "Px geniş (ikon)",
        px_wide: "Px geniş",
        wikipedia_instant_commons: "Wikimedia/InstantCommons",
        thumbnail: "Küçük resim",
        image: "Resim",
        share_on_facebook: "Facebook üzerinde",
        share_on_digg: "Digg.com üzerinde",
        share_on_delicious: "delicious üzerinde",
        share_on_reddit: "reddit.com üzerinde",
        share_on_stumbleupon: "stumbleupon.com üzerinde",
        share_on_yahoo_buzz: "Yahoo! Buzz üzerinde",
        share_on_identi_ca: "identi.ca üzerinde",
        share_on_google_buzz: "Google Buzz üzerinde",
        share_on_twitter: "twitter.com üzerinde",
        reusing_content_url: "Commons:Reusing_content_outside_Wikimedia"
};
// </source>

Thanks. --i.е. v-mail 10:18, 27 October 2015 (UTC)

✓ Done --Hedwig in Washington (mail?) 06:33, 29 October 2015 (UTC)

image urls are not protocol relative anymore, messing this gadget up

{{Editprotected}} The following line:

stockPhoto.file_url = location.protocol + stockPhoto.file_url;

needs to be changed, as <img> no longer uses protocol relative urls. Bawolff (talk) 23:38, 18 June 2015 (UTC)

✓ Done -- Rillke(q?) 00:21, 19 June 2015 (UTC)

Attribution text for printed newspapers

I recently stumbled upon a problem that could be fixed quite easily on our end and could help a lot of media editors out there to reuse our content. Recently a journalist from Gazeta Wyborcza (the biggest daily newspaper in Poland) contacted me (I'm a spokesperson for Wikimedia Polska) with a problem. He chose some 100 pics out of 400 Wiki Loves Monuments 2014 Finallists and wanted to prepare a gallery for their main page, that would sit there for the duration of the Christmas break. Great media coverage, if you asked me.

The problem is, their CMS does not allow links in caption space, so they use the same system as in their paper edition (I'm using this file as a reference):

  • Konstantin Brizhnichenko / CC BY-SA 4.0 / Wikimedia Commons

It's pretty much a standard in many media out there. Yet the closest caption we offer is this:

So in practice he had to prepare 100 captions by hand. Is there a way to customize the output of this tool? Halibutt (talk) 11:28, 28 December 2014 (UTC)

In kazak language

{{Editprotected}}

I request an admin to create the sub-page MediaWiki:Gadget-Stockphoto.js/kk-cyrl for the Kazakh language. The text of the page should be

//

stockPhoto.i18n = {
  download : 'Жүктеу' ,
  download_this_file : "Бұл файлды жүктеу" ,
  use_this_file_web : "Бұл файлды вебте қолдану" ,
  use_this_file_web_short : "Файлды қолдану" ,
  use_this_file_wiki : "Файлды уикиде қолдану" ,
  use_this_file_wiki_short : "Файлды қолдану" ,
  email_link_short : "e-mail-ге жіберу" ,
  information : "Ақпарат" ,
  all_sizes : "барлық өлшемдері" ,
  on_a_website : "вебте" ,
  on_a_wiki : "уикиде" ,
  to_this_file : "осы файлға сілтеме" ,
  about_reusing : "қолдану туралы" ,
  look_what_i_found : "Ортаққордан не тапқанымды қараңыздар: " ,
  from_wikimedia_commons : "Ортаққордан" ,
  by : "by" ,
  by_u : "Автор" ,
  see_page_for_author : "Автор бетін қарау" ,
  see_page_for_license : "Лицензия бетін қарау" ,
  page_url : "бет URL-і" ,
  file_url : "файл URL-і" ,
  attribution : "Авторлықты көрсету" ,
  gfdl_warning : "Бұл файлды қолдану толық көшірмесімен бірге болуды қажет етуі мүмкін <a href='http://en.wikipedia.org/wiki/GNU_Free_Documentation_License'>GFDL</a>" ,
  download_image_file : "Суреттің файлын жүктеу" ,
  full_resolution : "Толық рұқсат" ,
  not_available : "қол жетімді емес" ,
  share_this_file : "Бұл файлмен бөлісу" ,
  html : "HTML" ,
  bbcode : "BBCode" ,
  px_wide_icon : "px (ені; белгіше)" ,
  px_wide : "px (ені)" ,
  wikipedia_instant_commons : "Уикимедия жобаларында немесе InstantCommons қолдауымен" ,
  thumbnail : "Алдын ала қарау",
  image : "Сурет",
  share_on_facebook : "Facebook-те бөлісу" ,
  share_on_digg : "Digg.com-да бөлісу" ,
  share_on_delicious : "delicious-те бөлісу" ,
  share_on_reddit : "reddit.com-да бөлісу" ,
  share_on_stumbleupon : "stumbleupon.com-да бөлісу" ,
  share_on_yahoo_buzz : "Yahoo! Buzz-де бөлусі" ,
  share_on_identi_ca : "identi.ca-да бөлісу" ,
  share_on_google_buzz : "Google Buzz-де бөлісу" ,
  share_on_twitter : "twitter.com-да бөлісу" ,
  reusing_content_url : "Commons:Reusing content outside Wikimedia"
};
//

--Мұхамеджан Амангелді (talk) 16:47, 7 September 2014 (UTC)

@Мұхамеджан Амангелді: : Done in MediaWiki:Gadget-Stockphoto.js/kk-cyrl. Thanks for helping! Jean-Fred (talk) 20:49, 7 September 2014 (UTC)

Download not working for ogg files in Firefox?

Hello,

I tried downloading File:Flying Tigers Bite Back.ogg via the Download button of this gadget. Strangely, the "File URL" given in the box popping up is https:/wiki/Special:Categories and the actual "Full resolution" download link below that leads to https://commons.wikimedia.org/wiki/Special:Categories. Doesn't really make sense, does it? So I've tried some other videos:

I'm using Firefox 26.0 on Linux Mint 15. JavaScript is enabled, no Adblocker active, nothing else I can think of. --El Grafo (talk) 19:48, 28 August 2014 (UTC)

Works fine with w:Midori (web browser), though. --El Grafo (talk) 19:53, 28 August 2014 (UTC)
Correction: full resolution downloads seems to work with Midori, lower resolution download links still lead to https://commons.wikimedia.org/wiki/undefined --El Grafo (talk) 19:57, 28 August 2014 (UTC)

Bug with src element

Since a few days, the HTML snippet produced by the tool has an invalid src element. See for example on File:Mandarin Oranges (Citrus Reticulata).jpg

<a title="Joe Ravi [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3AMandarin_Oranges_(Citrus_Reticulata).jpg"><img width="512" alt="Mandarin Oranges (Citrus Reticulata)" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/49/Mandarin_Oranges_%28Citrus_Reticulata%29.jpg/512px-Mandarin_Oranges_%28Citrus_Reticulata%29.jpg"/></a>

Where the src to the thumb uses protocol relative URLs instead of full URLs.

Jean-Fred (talk) 20:11, 31 August 2013 (UTC)

Huh, already described and discussed above at #HTML_generated_by_.22use_this_code.22_does_not_work_as_img_src_URL_is_missing_scheme. Jean-Fred (talk) 20:26, 31 August 2013 (UTC)

Not working always

Hi, I noticed that the gadget does not always work for some images. One that I found just now is File:USS Newport News CA-148.jpg. Can someone please see why the gadget fails here? --Sreejith K (talk) 16:14, 4 February 2013 (UTC)

The gadget requires an {{Information}} template or some other of the same family ({{Artwork}} etc.) − technically, one template that defines the HTML classes 'fileinfotpl_desc' or 'fileinfotpl_src'.
Jean-Fred (talk) 16:22, 4 February 2013 (UTC)
That explains. Thanks. However, I would still prefer to have this gadget displayed even if the templates are missing. --Sreejith K (talk) 17:12, 4 February 2013 (UTC)
At least for "users/editors", it then should show a hint about the absence of {{Information}}, yes. -- Rillke(q?) 12:02, 5 February 2013 (UTC)

Serbian translation

{{Editprotected}}

I request an admin to create the sub-page MediaWiki:Gadget-Stockphoto.js/sr for the Serbian language. The text of the page should be

//

stockPhoto.i18n = {
        reuse: 'Поновно коришћење датотеке',
        download: 'Преузми', 
        download_this_file: "Преузми ову датотеку", 
        use_this_file_web: "Користи датотеку на вебу",
        use_this_file_web_short: "Користи датотеку",
        use_this_file_wiki: "Користи датотеку на викију",
        use_this_file_wiki_short: "Користи датотеку",
        email_link_short: "Пошаљи линк на е-пошту",
        information: "Информације",
        remove_icons: "Уклони ове иконице",
        all_sizes: "Све величине",
        on_a_website: "на вебу",
        on_a_wiki: "у викију",
        to_this_file: "ове датотеке",
        about_reusing: "Услови коришћења",
        look_what_i_found: "Види шта сам пронашао на Викимедијиној остави: ",
        from_wikimedia_commons: "од Викимедијине оставе",
        via_wikimedia_commons: "преко Викимедијине оставе",
        by: "од",
        by_u: "Од",
        see_page_for_author: "За аутора види",
        see_page_for_license: "За лиценцу погледај",
        page_url: "Линк на страницу",
        file_url: "Директан линк",
        attribution: "Ауторство",
        no_attr: "Није потребно навођење аутора",
        or: "или",
        gfdl_warning: "За употребу ове датотеке можда је потребно навођење интегралне верзије <a href='http://en.wikipedia.org/wiki/GNU_Free_Documentation_License'>GFDL</a> лиценце.",
        download_image_file: "Преузми ову слику",
        full_resolution: "Пуна резолуција",
        not_available: "није доступно",
        share_this_file: "Дели ову датотеку",
        html: "HTML",
        bbcode: "BBCode",
        px_wide_icon: "ширина у px (Икона)",
        px_wide: "ширина у px",
        wikipedia_instant_commons: "Викимедија/InstantCommons",
        thumbnail: "Мала слика",
        image: "Слика",
        share_on_facebook: "Дели на Facebook-у",
        share_on_digg: "Дели на Digg.com",
        share_on_delicious: "Дели на delicious-у",
        share_on_reddit: "Дели на reddit.com",
        share_on_stumbleupon: "Дели на stumbleupon.com",
        share_on_yahoo_buzz: "Дели на Yahoo! Buzz-у",
        share_on_identi_ca: "Дели на identi.ca",
        share_on_google_buzz: "Дели на Google Buzz-у",
        share_on_twitter: "Дели на twitter.com",
        reusing_content_url: "Commons:Reusing content outside Wikimedia"
};
//

--Milićević (talk) 20:42, 11 August 2013 (UTC)

✓ Done Thank you! :) −ebraminiotalk 13:27, 15 August 2013 (UTC)

Should be "Download file:"

{{Edit request}} It currently always says "Download image file:" (download_image_file key). Because it could be a video, it should say "Download file:" or something along those lines. It makes sense to also change to i18n key (download_file), but it isn't critical.

It would be nice if it did in fact say the right thing (e.g. "Download video:") when appropriate, but it isn't necessary. Superm401 - Talk 16:20, 16 December 2012 (UTC)

To be clearer, this is the requested change. Since ths shouldn't be controversial, I'm adding {{Edit request}}}. Superm401 - Talk 16:26, 16 December 2012 (UTC)
 Not done for now. The message in question is for the links to the image in different sizes, and it makes little sense to change the wording to cover non-image files. As you can see in File:Editing_basics_-_Uploading_and_adding_images.webm, the relevant links go to nowhere. Instead, perhaps we could just hide these links for non-image files, but that requies some tweaks in the code. It will be great if you could offer any help changing the script along that line. --whym (talk) 23:56, 21 December 2012 (UTC)

Skins other than vector and monobook

So a user in hewiki is fond of "modern", and is also fond of Stockphoto.

In trying to see what the deal is, I copied the gadget code and removed the line that checks to see what the skin is, i.e., this line:

	&& ( mw.config.get( 'skin' ) === 'vector' || mw.config.get( 'skin' ) === 'monobook' )

And guess what - the gadget works perfectly with modern. My guess is that it probably works just as well with all the other skins, but I can't/do not wish to test them all.

My suggestion is to either remove this line, or at least replace it with:

	&& ( $.inArray( mw.config.get( 'skin' ), ['vector', 'monobook', 'modern'] ) + 1 )

peace - קיפודנחש (talk) 05:11, 11 December 2012 (UTC)

Oddity on non-image files

from Commons:Village_pump/Archive/2011/07#Download_dialog_on_non-image_files

The download dialog ("Download" link just above the image, in the sharing options menu) should probably not link alternative sizes for non-image files (such as this one). --Tgr (talk) 09:52, 24 July 2011 (UTC)

Python "port"

I mentioned this at the Village pump, but I thought I should drop a note here as well. I ported the code for extracting attribution and license info into a Python library available here. This can be useful for generating attribution text from third party code. Some questions have arisen about why some things are the way they are, but I'll ask that under a separate heading. /skagedaltalk 20:49, 8 March 2012 (UTC)

Further hint on how to use this in a wiki

Hi there, when clicking on the puzzle globe it ways "Use this file on a wiki" and displays two wikitext input fields. What about some additional line explaining that the user should copy this into an article of the wiki (e.g. Wikipedia)? A friend of mine tested uploading pictures to commons without any previous knowledge. She found the button, but didn't know what to do with the popup and the wikitext. --Flominator (talk) 12:23, 7 September 2012 (UTC)

I would prefer a pictogram. Otherwise one has to translate everything… Ideas welcome. -- Rillke(q?) 13:17, 7 September 2012 (UTC)
Isn't "copy and paste this text into your wiki" a bit too much for a pictogram? --Flominator (talk) 10:04, 23 September 2012 (UTC)
Was für Paste? And where the hell I should paste it? In my opinion, there could be much more pictograms. But if no one creates one, what about using MediaWiki:mwe-upwiz-thanks-wikitext: (To use the file in a wiki, copy this text into a page:) -- Rillke(q?) 11:26, 23 September 2012 (UTC)
Better than nothing. --Flominator (talk) 15:15, 20 October 2012 (UTC)
Where can we insert that? --Flominator (talk) 15:03, 16 November 2012 (UTC)
We would have to edit each translation. In theory, with Gadgets 2.0, we could use MediaWiki messages directly but Gadgets 2.0's deployment and development seems to be delayed. -- Rillke(q?) 15:41, 5 January 2013 (UTC)
What time dimension (days, months or years) do you expect for it to take? Where can I read something about Gadgets 2.0? --Flominator (talk) 17:21, 12 January 2013 (UTC)
I've absolutely no clue. In 2012-03, I asked Krinkle and he said they will be likely usable in about 2012-10. No update since then. mw:Gadgets 2.0 is the design draft page. -- Rillke(q?) 14:15, 16 January 2013 (UTC)

Translation

Hello, it could be really really really nice to allow the translation. How to proceed ? Otourly (talk) 04:46, 5 October 2010 (UTC)

Is there an "official" way for i18n of JS on our wikis? --Magnus Manske (talk) 06:55, 5 October 2010 (UTC)
Maybe translatewiki like Multichill did?--Diaa abdelmoneim (talk) 08:23, 5 October 2010 (UTC)
Translation is now possible. See the schema at the end of the JavaScript file. --Magnus Manske (talk) 15:46, 5 October 2010 (UTC)
It seems not work : MediaWiki:Stockphoto.js/fr Otourly (talk) 19:17, 5 October 2010 (UTC)
There seems to be some race condition between loading of the translation and loading of the page. I fixed it partially; the buttons are labeled in English, the dialogs text is in French. I'll keep working. --Magnus Manske (talk) 19:55, 5 October 2010 (UTC)
✓ Fixed Needed an additional line at the end of the translation. --Magnus Manske (talk) 20:00, 5 October 2010 (UTC)

Done: MediaWiki:Stockphoto.js/pl. LeinaD dyskusja 00:34, 6 October 2010 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 02:38, 20 July 2017 (UTC)

Cleanup Use on wiki

Use on wiki and website have the same "Page URL" and "File URL" Fields. I suggest you clear those from Use on wiki and have use on wiki as Use on wikipedia with just the thumbnail and image fields and maybe something like mdales mediawizard gadgets tools like specifying the thumbnail size and description. Users from outside the wikimedia foundation can use the use this file on a website or just use the use on wikipedia if they have instant commons.--Diaa abdelmoneim (talk) 08:41, 5 October 2010 (UTC)

This section was archived on a request by: Hedwig in Washington (mail?) 02:38, 20 July 2017 (UTC)

Videos in BB Code

{{Edit request}} Currently, the BB code generated for videos is broken. Lacking a better alternative (that I know of), I suggest duplicating the HTML output to BB, as it works on forums that allow iframes (which seems to be the default for phpBB).--Strainu (talk) 21:22, 4 June 2017 (UTC)

Hello Strainu, can you please more concrete⁉ For me the BBcode works for vids. -- User: Perhelion 09:37, 4 October 2017 (UTC)
@Perhelion: : I tried to link to File:Trenul_IR1580_tractat_de_91-53-0-473-004-6.webm and the output I got was the one below (notice the undefined in the img tag - the preview image is lacking).

[url=https://commons.wikimedia.org/wiki/File%3ATrenul_IR1580_tractat_de_91-53-0-473-004-6.webm][img]undefined[/img][/url]
[url=https://commons.wikimedia.org/wiki/File%3ATrenul_IR1580_tractat_de_91-53-0-473-004-6.webm]Trenul IR1580 tractat de 91-53-0-473-004-6[/url] [CC BY-SA 3.0 ro (https://creativecommons.org/licenses/by-sa/3.0/ro/deed.en)], by Strainu (Operă proprie), from Wikimedia Commons
What movie does it work for?--Strainu (talk) 10:14, 4 October 2017 (UTC)

Oh* I see, the function stockPhoto.stockphoto_get_thumbnail_url needs somehow to be updated. As this is more a WMF gadget I would open a Phab-task (or just ping @Krinkle, Magnus Manske, Jean-Frédéric, and TheDJ: ). -- User: Perhelion 11:20, 4 October 2017 (UTC)
This is not a WMF gadget, it's an unmaintained gadget :) —TheDJ (talkcontribs) 11:42, 4 October 2017 (UTC)
Replacing all occurences of #mwe_ogg_player_1 with #mwe_player_0, will probably do the trick. Must have been broken for 4 years or so already. —TheDJ (talkcontribs) 11:52, 4 October 2017 (UTC)
✓ Done Thank you! The problem was that the function quits if there is no alt attribute on the thumb, but vids don't have this. -- User: Perhelion 22:47, 5 October 2017 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:32, 25 August 2023 (UTC)

shortened attribution

@Krinkle: . Thanks a lot for reworking the Gadget in the past days. But could you please have a look to this screenshot? As you can see the attribution is shortened to my name, the license is missing now. I cannot swear but I am pretty sure that in the past the complete attribution was shown. I have written a friendly email to a website because he used my name only as attribution and he pointed me now to the wrong output of the gadget. Raymond 15:50, 30 April 2018 (UTC)

@Raymond: Hi, thanks for reporting. I've looked into it and don't see a change in behaviour. It seems the file specifies multiple values to consider (author, source, attribution, credit). And the strongest override is "credit". It is read from the result of $('#fileinfotpl_credit + td').text() which evaluates to an invisible field directly below your visible credit line and contains only "© Raimond Spekking / " (screenshot). I suspect there may be a problem in the template (User:Raymond/attribution or Template:Credit line) which is forgetting the license in the invisible/second row. Let me know if you need further help, but for now I'll leave it back to you. ----Krinkle 18:45, 30 April 2018 (UTC)
@Krinkle: Sorry, I forgot to say thank you. I will try to fix it. Raymond 20:17, 11 May 2018 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:32, 25 August 2023 (UTC)

nl translation error

On MediaWiki:Gadget-Stockphoto.js/nl, "on een wiki" should be "op een wiki". --bdijkstra (overleg) 08:11, 14 June 2019 (UTC)

✓ Done This was done. ~riley (talk) 08:36, 23 November 2019 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:33, 25 August 2023 (UTC)

Support Timeless Skin

{{Editprotected}} This gadget is working nicely on the mw:Skin:Timeless. Thus, please whitelist timeless:

  // Unsupported skin
- !/^(?:vector|monobook)$/.test(mw.config.get('skin'))
+ !/^(?:vector|monobook|timeless)$/.test(mw.config.get('skin'))

Thanks –Simon04 (talk) 13:07, 3 November 2019 (UTC)


@Simon04: Do you mean you are requesting the following? Old:

// Unsupported skin
!/^(?:vector|monobook)$/.test(mw.config.get('skin'))

New:

// Unsupported skin
+!/^(?:vector|monobook|timeless)$/.test(mw.config.get('skin'))

Please confirm, the way you have requested the change is out of the norm (putting new and old text alongside each other in <pre>). ~riley (talk) 19:32, 6 December 2019 (UTC)


@~riley: Please change lines 40–41 from (old) …

  // Unsupported skin
  || !/^(?:vector|monobook)$/.test(mw.config.get('skin'))

… to (new)

  // Unsupported skin
  || !/^(?:vector|monobook|timeless)$/.test(mw.config.get('skin'))

(Out of curiosity, is there a better/recommended/unambiguous/consice way to describe a desired change in a JavaScript code?) Thanks! –Simon04 (talk) 21:01, 6 December 2019 (UTC)

✓ Done No better way to do it, as long as you aren't putting old code alongside new code. :) Thank you! ~riley (talk) 21:11, 6 December 2019 (UTC)

Simon04, ~riley there is <syntaxhighlight lang="diff">:

@ref line
  unchanged text
- old text
+ new text

Although the colors might be hard to distinguish for some people. IMHO colors from MediaWiki's diff should be applied. -- Rillke(q?) 16:35, 8 December 2019 (UTC)

Did not know that was an option! Thank you Rillke, that is very distiguishable. ~riley (talk) 19:05, 8 December 2019 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:33, 25 August 2023 (UTC)

Only one author is credited

{{Edit request}} The File:Legal_status_of_bitcoin.png has been successively improved by different contributors. But the StockPhoto gadget only displays one author. I think the StockPhoto gadget should displays something like Wikimedia Commons contributors when multiple contributors worked on the file. --Oliver H (talk) 18:51, 29 January 2021 (UTC)

@Oliver H: The gadget looks at the author field of {{Information}}, and there’s currently only one author in the template on that file (permalink). I don’t know what the Commons policy is for whether that field should be updated when new versions are uploaded, but in any case I don’t think there’s anything that needs to be changed in this gadget. --Lucas Werkmeister (talk) 21:41, 14 February 2021 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:34, 25 August 2023 (UTC)

fix offset on video players

{{Editrequest}} Pleas apply this change to the gadget to fix the width calculation icw with the new audio/video player for anonymous users. —TheDJ (talkcontribs) 20:15, 24 April 2022 (UTC)

✓ Done 4nn1l2 (talk) 11:05, 8 May 2022 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:34, 25 August 2023 (UTC)

Get rid of a JS warning

{{Edit request}} Coud you please fix the JS warning Use of "mw.RegExp.escape" is deprecated. Use mw.util.escapeRegExp() instead. by changing what is mentioned in the warning? Thanks in advance, Arnd 🇺🇦 (talk) 14:49, 14 December 2022 (UTC)

✓ Done Thanks --Ruthven (msg) 09:28, 5 January 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:34, 25 August 2023 (UTC)