跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
工场FAQ
工场大事记
工场文化
工场设备
正版软件
工场云服务
及时更新我
最近更改
如何使用Wiki?
工场百科
搜索
搜索
登录
个人工具
登录
查看“Test”的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
←
Test
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
<languages/> {{shortcut|MV}} {{TNT|Extension|templatemode = |name = MultimediaViewer |status = stable |type1 = interface |type2 = ajax |hook1 = GetBetaFeaturePreferences |hook2 = BeforePageDisplay |hook3 = CategoryPageView |hook4 = ResourceLoaderGetConfigVars |author = [[User:MarkTraceur|Mark Holmquist]], [[User:Tgr (WMF)|Gergő Tisza]], [[User:GDubuc (WMF)|Gilles Dubuc]] |description = <translate><!--T:1--> Provides a better experience to users when they click on thumbnails in a page</translate> |image = Screenshot of MultimediaViewer extension 2014-04-21.png |imagesize = 300 |version = 0.3.0 |update = 2014-03-28 |mediawiki = <translate><!--T:33--> 1.23+</translate> |php = <translate><!--T:34--> 5.3+</translate> |license = GPL-2.0+ |download = {{WikimediaDownload}} |readme = |changelog = |namespace = main |parameters = * $wgEnableMediaViewerForLoggedInUsersOnly * $wgMediaViewerIsInBeta |tags = |rights = |example = <translate><!--T:35--> [<tvar|filemw>https://www.mediawiki.org/wiki/Extension:MultimediaViewer#mediaviewer/File:Screenshot_of_MultimediaViewer_extension_2014-04-21.png</> MediaWiki.org]</translate> |needs-updatephp = No |compatibility = |bugzilla = MultimediaViewer }} <translate> <!--T:2--> The '''MultimediaViewer''' extension gives the user of a wiki a different interface for viewing full-size, or nearly full-size, images in their browser without extraneous page loads or confusing interstitial pages. == Installation == <!--T:3--> <!--T:4--> '''Option A''': use Vagrant. See the [[MediaWiki-Vagrant]] page for instructions to get a MediaWiki installation going with a Vagrant virtual machine system. <!--T:5--> Then do <code>vagrant enable-role multimediaviewer</code> and then <code>vagrant provision</code>. <!--T:6--> '''Option B''': install manually. <!--T:7--> First, consider installing [[Extension:BetaFeatures]]. It may be helpful to hide the media viewer feature behind a preference. If you don't install this, it will be enabled everywhere. MultimediaViewer uses [[Manual:Hooks/GetBetaFeaturePreferences|the GetBetaFeaturePreferences hook]], which is created and run from BetaFeatures, to register this preference. <!--T:8--> You'll also likely want to download [[Extension:CommonsMetadata]] - it's not a hard requirement, but without it you won't get very much information in your lightboxes. </translate> {{ {{TNTN|ExtensionInstall}} |repo-name=MultimediaViewer }} <translate> == Configuration == <!--T:9--> <!--T:10--> * <code>$wgMediaViewerIsInBeta</code> will register a preference with [[<tvar|ext-betafeatures>Extension:BetaFeatures</>|BetaFeatures]] if set to "true"</translate> <translate> <!--T:29--> * <code>$wgMediaViewerEnableByDefault</code> and <code>$wgMediaViewerEnableByDefaultForAnonymous</code> will determine whether MMV is enabled by default for everyone and for anonymous users, respectively. They both default to true.</translate> <translate> <!--T:22--> * <code>$wgMediaViewerUseThumbnailGuessing</code> will improve performance when enabled, but can be fragile depending on how the wiki is set up (it will probably work fine if you use a [[<tvar|thumb>Manual:thumb.php</>|404 handler]]).</translate> <translate> <!--T:23--> If neither <code>$wgMediaViewerIsInBeta</code> nor <code>$wgEnableMediaViewerForLoggedInUsersOnly</code> are set, MMV will be turned on for '''all users'''! <!--T:24--> ;Forced download</translate> <translate> <!--T:25--> To ensure files are offered for download and not viewed in the user's browser following a click on the ''Download …'' button, the server has to be configured, except when using vagrant: <!--T:26--> If the requested URL to an image directory contains the <code>download</code> query parameter, the <code>Content-Disposition</code>-header must be set to <code>attachment</code>.</translate> <translate> <!--T:27--> This can be achieved in Apache and compatible servers [<tvar|dl-apache-sample>https://gerrit.wikimedia.org/r/#/c/120614/3/puppet/templates/content_disposition_attachment.conf.erb</> using mod_rewrite and mod_headers in a <code>.htaccess</code> file].</translate> <translate> <!--T:28--> Varnish configuration can look [<tvar|dl-varnish-sample>https://gerrit.wikimedia.org/r/#/c/120617/7/templates/varnish/upload-frontend.inc.vcl.erb</> like this]. == Using the extension == <!--T:11--> <!--T:12--> First thing, before testing, is to make sure you're logged in and you have the preference enabled: Log in to the wiki and go to Special:Preferences, then visit the "Beta features" tab and check the appropriate box. <!--T:13--> Next, go to a page that has a thumbnail on it. Try clicking on the image or on the "expand" icon near it. The lightbox should pop up and give you a bigger view of the image. <!--T:14--> If you'd prefer, there's an [[<tvar|test>Extension:MultimediaViewer/Exported test wiki</>|exported test environment]] that you can use via Special:Import to quickly set up a suitable testing environment. == Extending with user scripts == <!--T:15--> <!--T:16--> If you want to add functionality, you'll have to dig around in the classes and change the functionality pretty manually. We'll work on making this a nicer experience, but given the class and method hierarchy we've built, we think it's not terribly difficult right now. <!--T:17--> '''HOWEVER''', you should avoid doing this too much. If things change internally, then your code might break in unexpected ways, and you (and your users) will be surprised. Don't let that happen, and wait for a more stable way to extend the product. <!--T:18--> See [[<tvar|metadata>Extension:MultimediaViewer/Extension:Metadata</>|/Extension:Metadata]] for an example. == Templates == <!--T:30--> <!--T:31--> Multimedia Viewer and [[UploadWizard|Upload Wizard]] needs several templates to show data of photos.</translate> <translate> <!--T:32--> Just save this [[<tvar|exported>Extension:MultimediaViewer/Exported test wiki</>|code]] in a xml file and import it in your wiki. == See also == <!--T:19--> <!--T:20--> * [[Special:MyLanguage/Multimedia|Multimedia]] </translate> * {{ll|Multimedia/Media Viewer}} ; Similar extension(s): * [[Extension:FancyBoxThumbs|FancyBoxThumbs]] extension {{TNT|onWikimedia}} [[Category:Image extensions{{translation}}]]
返回
Test
。
开关有限宽度模式