MediaWiki talk:Gadget-Stockphoto.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Namespace-mediawiki.svgMediaWiki:Gadget-Stockphoto.js forms part of the MediaWiki interface and can only be edited by administrators.
To request a change to MediaWiki:Gadget-Stockphoto.js, add {{Edit request}} to this talk page, followed by a description of your request.
This interface message or skin may be documented on MediaWiki.org or TranslateWiki.
When editing this script please adhere to the Commons:JavaScript styleguide.
Filing cabinet icon.svg
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 3 days.

Videos in BB Code[edit]

{{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, 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)

shortened attribution[edit]

@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)