|
|
(未显示同一用户的6个中间版本) |
第1行: |
第1行: |
| <languages/>
| | == 用法 == |
| {{ReadingWebExtension}}
| | 有几种不同的方法可以在页面上设置横幅图像: |
| {{Extension
| |
| |status = stable
| |
| |type1 = Parser Function
| |
| |type2 =
| |
| |username = Sumit
| |
| |author = (under the mentorship of [[User:Jdlrobson]] and [[User:Syced]]).
| |
| |description = <translate><!--T:1--> Adds pagewide banners at the top of pages in specified namespaces</translate>
| |
| |image = banner_ex.png
| |
| |imagesize = 350px
| |
| |version preview =
| |
| |update preview =
| |
| |mediawiki =
| |
| |php = 5.4+
| |
| |composer =
| |
| |table1 =
| |
| |table2 =
| |
| |download = {{WikimediaDownload}}
| |
| |readme = {{git file|project=mediawiki/extensions/WikidataPageBanner|branch=HEAD|file=README|text=README}}
| |
| |changelog =
| |
| |example =
| |
| |namespace =
| |
| |tags = pagebanner
| |
| |compatibility =
| |
| |phabricator = wikidata-page-banner
| |
| }}
| |
| <translate>
| |
| <!--T:2-->
| |
| The <tvar name=1>'''WikidataPageBanner'''</tvar> extension adds pagewide banners on every page of specified namespaces of the wiki.
| |
| </translate>
| |
|
| |
|
| <translate><!--T:3--> Pagewide banners are extensively used on Wikivoyage projects.</translate> | | 要<code>File:Image_name.jpg</code>用作自定义横幅图像,请将其设置在页面上:<nowiki>{{PAGEBANNER:Image_name.jpg}}</nowiki> |
| <translate><!--T:4--> This extension is majorly inspired by [[voy:Template:Pagebanner|Wikivoyage's Template:pagebanner]].</translate>
| | 该扩展可以自动将相同的横幅图像添加到指定命名空间的所有页面,通过设置 $wgWPBImage |
| | 如果维基连接到维基数据,它还可以从那里获取每个页面的横幅。 |
|
| |
|
| <translate>
| | === Required Template === |
| ==Installation== <!--T:5-->
| |
| </translate>
| |
| {{ExtensionInstall|WikidataPageBanner|registration=required}}
| |
| | |
| <translate>
| |
| ==Usage== <!--T:6-->
| |
| </translate>
| |
| There are a few different ways to set a banner image on a page:
| |
| | |
| # <translate><!--T:8--> To use <tvar|1><code>File:Image_name.jpg</code></> as a custom banner image, set it on the page:</translate> <code><nowiki>{{PAGEBANNER:Image_name.jpg}}</nowiki></code>
| |
| # <translate><!--T:7--> The extension can automatically add the same banner image to all pages of specified namespaces, set via the <tvar|1><code>$wgWPBImage</code></> [[<tvar|2>#config</>|configuration variable]].</translate>
| |
| # <translate><!--T:9-->
| |
| If the wiki is connected to Wikidata, it can also fetch each page's banner from there.
| |
| | |
| === Required Template === <!--T:10--> | |
| </translate> | | </translate> |
| <translate><!--T:11--> Template:PAGEBANNER must exist.</translate> | | <translate><!--T:11--> Template:PAGEBANNER must exist.</translate> |