Jump to content

Template talk:Commons-inline

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Palosirkka (talk | contribs) at 10:09, 21 June 2022 (| short =: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Documentation

Usage

{{Commons-inline|Wikisource work}}

This template creates an inline link to the Wikicommons in list format.

Examples

Normal

{{Commons-inline|Work}}

Media related to Work at Wikimedia Commons

Text override

{{Commons-inline|Work|Puffle}}

Media related to Puffle at Wikimedia Commons

{{Commons-inline|links=[[commons:Foo|]] and [[commons:Bar|]]}}

Media related to Foo and Bar at Wikimedia Commons

List format

{{Commons-inline|list=
** [[commons:Foo|]]
** [[commons:Bar|]]
}}

Related media at Wikimedia Commons:

Changed 'at' to 'on'

I changed the word 'at' to 'on' to better clarify that the media is about x topic. I understand that the original meaning indicated that the items could be found in (or at) x category or x article but I think that the text change more clearly describes that more info on x topic can be found on the Wikimedia Commons site.

--Epolk 23:20, 26 July 2006 (UTC)[reply]

Question with regards to this template and the non-inline template

According to MoS on Wikimedia sister projects, "common interproject link targets have standardized templates which allow them to be easily distinguished from normal external links, and these templates should generally be used". However, when I randomly pick articles that use this template, they appear on external links area and looks too similar that unless you really look for them, you thought it is an external link. Doesn't this template violate MoS then? Honestly, the box design looks much more distinct and comprehensible than inline, and the box design has been there long before inline was created. OhanaUnitedTalk page 15:09, 23 September 2008 (UTC)[reply]

Deletion ?!?

Are you joking ? This template is necessary for alignment in some pages... And WHY don't you create the section (for articles) OTHER PROJECTS for other wikimedia projects ? Could be they considered simply as "external links" ? I don't think so, they are part of the body of Wikimedia, not simply external (external) links as official sites, touristic sites, myspace, spam... External ? Internal ! Please, reform these policy instead to delete this template. —Preceding unsigned comment added by 87.17.247.60 (talk) 16:56, 10 October 2008 (UTC)[reply]

Template without the word "Media" ?

Is there a related inline template (or workaround) ? -- πϵρήλιο 11:08, 11 October 2012 (UTC)[reply]

Explanatory note needed at the top.

This should be a version of the one at the other template: "This template is part of Wikipedia's sister projects. This template links an article to a page on Wikimedia Commons, containing a gallery of related media. Note that it does not link to a Commons category, which will give a larger selection of media; for that use Template:Commons category." Also we should have the bit with a usage figure. Johnbod (talk) 13:08, 13 April 2018 (UTC)[reply]

Improving the "no parameter" case

Right now, when this template is called with no parameters, it defaults to using the title of the page as a search at Commons. The old behavior of search at Commons would take the reader directly to a gallery or category if the search string matched the name. However, in the last year or so, the search has become more conservative, and our readers are taken to a crowded and possibly confusing search results page.

Instead, I propose that we use Wikidata to restore the old behavior for no parameters, when possible. The code in the sandbox does this. When there are no parameters, it calls Module:Commons link to first look for a Commons gallery associated with the article. If no such gallery is found, it looks for Commons category associated with the article. If neither is found, then it defaults back to the current behavior of searching Commons with the article title.

A few things to note about Module:Commons link:

  • It has been used at {{commons and category}} and {{commons and category-inline}} for a month now, with no complaints or negative feedback.
  • There are multiple entries in Wikidata that represent associated Commons galleries or categories. Module:Commons link checks all of them, and only uses them if they all agree. Otherwise, it defaults back to the current search behavior. This will protect against vandalism and false positives. If there is any inconsistency, the Lua code places the article in one of two tracking categories: 1 or 2, so we can fix it.

Note that this change only affects the "no parameter" case (see test cases). All other behaviors remain the same:

  • If a single parameter is provided, the link is directly to that page in Commons
  • The second parameter is still used as linktext.
  • The named arguments still work as before: |short=, |list=, |links=, |extratext=.

Any questions or comments before I turn this on? — hike395 (talk) 06:45, 16 March 2020 (UTC)[reply]

| short =

What's that? --Palosirkka (talk) 10:09, 21 June 2022 (UTC)[reply]