扩展:LogoFunctions

From mediawiki.org
This page is a translated version of the page Extension:LogoFunctions and the translation is 73% complete.
Outdated translations are marked like this.
MediaWiki扩展手册
LogoFunctions
发行状态: 稳定版
实现 解析器函数
描述 为维基Logo增加了一个解析器函数
作者 JuneHyeon Bae (*devunt留言)
最新版本 2.0 (2019-09-15)
MediaWiki 1.31+
PHP 7.0+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
  • $wgNamespaceLogos
季度下載量 6 (Ranked 143rd)
前往translatewiki.net翻譯LogoFunctions扩展
問題 开启的任务 · 报告错误

LogoFunctions扩展添加了解析器功能,以覆盖或添加标记到维基徽标。

用途

#setlogo
{{#setlogo:ExampleLogo.png}}

这会将标志设置为[[File:ExampleLogo.png]]

#stamplogo
{{#stamplogo:Featured.png|190px|top|-1em|-1em}}

向 Logo 添加一个印章 ([[File:Featured.png]]),190像素宽,从左-1em,从上-1em,就像英文伪基百科首页一样。

topbottom参数可以用于添加最多两个印章。

安裝

该扩展曾失效多年。请安装主分支,或适配 MediaWiki 1.34 及以上的发布版。
  • 下载文件,并将其放置在您extensions/文件夹中的LogoFunctions目录内。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LogoFunctions
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'LogoFunctions' );
    
  • 按需求配置。
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

配置

This extension can be used to set per-namespace logos via configuration by mapping a namespace number to a file available on the wiki:

$wgNamespaceLogos = [
	6 => 'Uncyclomedia Commons.png',
	7 => 'Uncyclomedia Commons.png',
];

The above code added to your "LocalSettings.php" file will set the specified files as logos for the "File" and "File talk" namespace. For these in particular, do remember to protect the files and also to mark them as used to prevent them from being deleted.

请勿使用名字空间常量,因为它不起作用。详见工單T232952