Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Extension:CommonsMetadata/info template for 3rd-party wikis

From mediawiki.org
<Extension:CommonsMetadata

CommonsMetadata is written to parse the highly complex information templates used on Wikimedia Commons. If you want to use it on a non-Wikimedia wiki for local files, here is a simple template that should be compatible:

<tableclass="toccolours vevent mw-content-en"style="width: 100%; direction: ltr;"cellpadding="4"><!-- Description -->{{#if:{{{description|{{{Description|}}}}}}|<trstyle="vertical-align: top"><tdid="fileinfotpl_desc"class="fileinfo-paramfield">Description<spanclass="summary fn"style="display:none">{{PAGENAME}}</span><!-- required for hCalendar and hProduct microformat; though hMedia would be more appropriate --></td><tdclass="description">{{{description|{{{Description|}}}}}}</td></tr>}}<!-- Date -->{{#if:{{{date|{{{Date|}}}}}}|<trstyle="vertical-align: top"><tdid="fileinfotpl_date"class="fileinfo-paramfield">Date</td><td>{{{date|{{{Date|}}}}}}</td></tr>}}<!-- Source -->{{#if:{{{source|{{{Source|}}}}}}|<trstyle="vertical-align: top"><tdid="fileinfotpl_src"class="fileinfo-paramfield">Source</td><td>{{{source|{{{Source|}}}}}}</td></tr>}}<!-- Author -->{{#if:{{{author|{{{Author|}}}}}}|<trstyle="vertical-align: top"><tdid="fileinfotpl_aut"class="fileinfo-paramfield">Author</td><td>{{{author|{{{Author|}}}}}}</td></tr>}}<!-- License -->{{#if:{{{license|{{{License|}}}}}}|<trstyle="vertical-align: top"><tdclass="fileinfo-paramfield">License</td><td><spanclass="licensetpl"><spanclass="licensetpl_short>{{{license|{{{License|}}}}}}</span></span></td></tr>}}</table>

Save it to the "Template:Information" page and use it like this:

{{Information|description= ... image description ...|author= ... author name ...|source= ... source ...|date= ... date of creation ...|license= ... short name of license (e.g. "CC-BY-SA-3.0") ...}}

All fields are optional.

Note that the template's name does not matter. What matters are the classes used in the table elements. For this to work, you must useExtension:CommonsMetadata.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Extension:CommonsMetadata/info_template_for_3rd-party_wikis&oldid=7617282"

[8]ページ先頭

©2009-2025 Movatter.jp