User:Joachim Köhler/Photo credit box1
Jump to navigation
Jump to search
A personal credit box template for the use with my (own) photographs. This template uses auto-categorization, adds the image file automatically to Category:Files by Joachim Köhler - photographs - by name, and, if the ID and/or date parameters are specified, also to Category:Files by Joachim Köhler - photographs - by ID and/or Category:Files by Joachim Köhler - photographs - by date, and to the matching ‘Photographs taken on ⟨date⟩’ category.
This template should be used directly below the general {{Information}} template, because it builds a special information box on its own; if we don’t add a blank line in between, the new box is visually merged with the {{Information}} box. Nice!
Some minor hints about the implementation[edit]
- Around the main table, I put (like in the code for the original {{Information}} template) this division:
<div class="hproduct commons-file-information-table"> ... </div>
. Using these classes allows merging with the main Information box, just as e.g. the {{Location}} templates use it. - Seems that for the
<table>
the singleclass="toccolours"
is sufficient. The {{Information}} template<table>
element usesclass="fileinfotpl-type-information toccolours vevent"
. - The other
style=*
attributes for the table<table>
element have been taken from the {{Information}} template. - The localization for the ‘Attribution’ field uses the same sub-templates as the {{Credit line}} template; so look out if any of them is updated/changed, because this may force us to update this template, too: {{Int:wm-license-cc-attribution}} and {{I18n/Credit line}}.
Template preview[edit]
Attribution (required by the license) | © User:Joachim Köhler / Wikimedia Commons / CC BY-SA 4.0 |
Using this image |
|