本文介绍了在MediaWiki中,有没有一种方法可以将[[Image:< name>]]样式大小调整应用到外部图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MediaWiki具有精巧的内置方式,可以使图像显示更加精美,例如来自 http://www.mediawiki.org/wiki/Help:Images :

MediaWiki has a great built-in way for finessing the display of images, e.g. from http://www.mediawiki.org/wiki/Help:Images :

[[File:MediaWiki:Image sample|thumb|50px]]
[[File:MediaWiki:Image sample|border|50px]]

但是,不幸的是,我必须使用的MediaWiki存储库已禁用图像上传.

However, unfortunately, the MediaWiki repository I have to work with has disabled image uploads.

我想知道是否可以将上述便捷快捷方式应用于外部托管的图片网址,例如理想的是:

I'm wondering if there's a way I can apply the above convenience shortcuts to an externally hosted image URL, e.g. ideal would be:

 [[File:http://somewhere.com/image.jpg|thumb|50px]]

我要做的是不可能的吗?

Is what I'm trying to do impossible?

推荐答案

是的,无法完成.摘自 MediaWiki手册:

Yes, can't be done. From the MediaWiki manual:

要调整MediaWiki中图像的大小,它们需要在数据库的图像表中包含一行,其中包含图像的尺寸和其他信息,因此您无法调整外部图像的大小.

For resizing images in mediawiki they need to have a row in image table of database containing dimensions and other information of image so you can't resize external images.

如果这些图像已上传到另一个mediawiki中,或者它们位于您网站的某个位置,并且您想让mediawiki对其进行缩略图显示,则可以将$ wgUseSharedUploads设置为true并将$ wgSharedUploadPath和$ wgSharedUploadDBname设置为启用外部图像.

If those images have been uploaded in another mediawiki or if they are somewhere in your site and you want to let mediawiki make thumbnail of them you can set $wgUseSharedUploads to true and set $wgSharedUploadPath and $wgSharedUploadDBname instead of enabling external images.

这篇关于在MediaWiki中,有没有一种方法可以将[[Image:< name>]]样式大小调整应用到外部图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 23:50