Расширение:ImageCompare
This extension is incompatible with MediaWiki 1.38 or any later release! You are advised against using this extension on a live site. Volunteer developers are invited to pledge their efforts to updating this extension to make it compatible with MediaWiki 1.39 by replacing the {{Incompatible }} template with {{Incompatible |version=1.38|pledge=~~~~}} . |
Автор этого расширения больше не занимается его поддержкой! Хотя оно все еще может работать, любые сообщения об ошибках или запросы на совершенствовании, скорее всего, будут проигнорированы. Если вы заинтересованы в том, чтобы взять на себя задачу разработки и поддержки этого расширения, вы можете запросить право собственности на репозиторий. As a courtesy, you may want to contact the author. Вы также должны будете удалить этот шаблон и указать себя как поддерживающего это расширение в инфобоксе {{extension}}. |
![]() Статус релиза: не поддерживается |
|
---|---|
![]() |
|
Реализация | Тег |
Описание | Adds a tag to interactively compare two images using a slider |
Автор(ы) | Leduyquang03обсуждение |
Последняя версия | 0.0.3 (2018-12-11) |
MediaWiki | 1.29+ |
PHP | Any |
Изменения в БД | Нет |
Лицензия | MIT License |
Скачать | |
imgcomp |
|
Quarterly downloads | 3 (Ranked 175th) |
Переведите расширение ImageCompare, если оно доступно на translatewiki.net | |
Проблемы | Открытые задачи · Сообщить об ошибке |
This extension adds the <imgcomp>
tag which displays an interactive slider for comparing two images side by side.
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
ImageCompare
в вашей папкеextensions/
. - Добавьте следующий код внизу вашего
LocalSettings.php
:wfLoadExtension( 'ImageCompare' );
- Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Использование
To add two images to compare, use the <imgcomp>
tag with these attributes (bold ones are required):
- img1: The title of the image to the left ("before").
- img2: The title of the image to the right ("after").
- width: A number specifying the width for compared images in pixels.
By default, images are added with their highest resolution.
- mobilewidth: A number specifying the width of the images for the mobile version, also in pixels. If not specified, it will be 320 or the specified width if it is smaller.
The titles must not have the File: namespace. The inner content of the tag will be ignored.
Ideally, the two images should have the same width and height.
- Примеры
To compare JPEG example.jpg with PNG example.png:
<imgcomp img1='JPEG example.jpg' img2='PNG example.png' />
To compare Draft.png and Colored.png, with each image having the width of 400px:
<imgcomp img1='Draft.png' img2='Colored.png' width=400 />