This is the
talk page for discussing improvements to the
Commons-inline template. |
|
Archives:
1Auto-archiving period: 365 days
![]() |
![]() | This template was nominated for deletion on October 8, 2008. The result of the discussion was Keep. |
{{Commons-inline|Wikisource work}}
This template creates an inline link to the Wikicommons in list format.
{{Commons-inline|Work}}
Media related to
Work at Wikimedia Commons
{{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
{{Commons-inline|list= ** [[commons:Foo|]] ** [[commons:Bar|]] }}
Related media at Wikimedia Commons:
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:
Note that this change only affects the "no parameter" case (see test cases). All other behaviors remain the same:
|short=
, |list=
, |links=
, |extratext=
.Any questions or comments before I turn this on? — hike395 ( talk) 06:45, 16 March 2020 (UTC)
What's that? -- Palosirkka ( talk) 10:09, 21 June 2022 (UTC)
This is the
talk page for discussing improvements to the
Commons-inline template. |
|
Archives:
1Auto-archiving period: 365 days
![]() |
![]() | This template was nominated for deletion on October 8, 2008. The result of the discussion was Keep. |
{{Commons-inline|Wikisource work}}
This template creates an inline link to the Wikicommons in list format.
{{Commons-inline|Work}}
Media related to
Work at Wikimedia Commons
{{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
{{Commons-inline|list= ** [[commons:Foo|]] ** [[commons:Bar|]] }}
Related media at Wikimedia Commons:
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:
Note that this change only affects the "no parameter" case (see test cases). All other behaviors remain the same:
|short=
, |list=
, |links=
, |extratext=
.Any questions or comments before I turn this on? — hike395 ( talk) 06:45, 16 March 2020 (UTC)
What's that? -- Palosirkka ( talk) 10:09, 21 June 2022 (UTC)