User:Joachim Köhler/Photo credit box1

From Wikimedia Commons, the free media repository
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 single class="toccolours" is sufficient. The {{Information}} template <table> element uses class="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]

(required by the license)
© User:Joachim Köhler / Wikimedia Commons / CC BY-SA 4.0
Using this image new.svgCc-sa.svg
  • You can use this image file free of charge under the terms of the free license CC BY-SA 4.0. In particular, this means:
  • You should include the credit line (Attribution) given above in an appropriate place (next to the image, or in your list of image sources, etc.), to establish a clear and reasonable link between the image and the credit line. Please quote the credit line (Attribution) completely.
  • If you use this image in projects not related to Wikimedia/Wikipedia (e.g., in a book, or on your website), please send me an Mail-closed.svg e-mail or leave me a message.
  • If you use this image in printed media (e.g., in a book, for a postcard, etc.), please send me a sample copy. Thank you very much!
  • Mail-closed.svg Contact me if you need a special version of this image, more information or any special permission.