Extension:JavascriptSlideshow/ru
Автор этого расширения больше не занимается его поддержкой! Хотя оно все еще может работать, любые сообщения об ошибках или запросы на совершенствовании, скорее всего, будут проигнорированы. |
![]() Статус релиза: не поддерживается |
|
---|---|
Реализация | Тег , Функция парсера |
Описание | Create a slideshow (using JavaScript) from multiple included div elements |
Автор(ы) | Chris Reigrut, Yaron Koren, DaSch, Alexia E. Smith, Nick White |
Последняя версия | 2.0.0 (2019-02-19) |
MediaWiki | 1.29+ |
PHP | 5.6+ |
Изменения в БД | Нет |
Лицензия | GNU General Public License 3.0 или позднее |
Скачать | GitLab: Note: |
Пример | wiki.comakingspace.de |
<slideshow> |
|
The JavaScriptSlideshow extension creates a slideshow which can:
- Create a "rotating" slideshow (i.e. one that changes from one picture to another)
- Create stop-action animation from multiple images or multiple pieces of text
Установка
- Download, extract и распакуйте файл(ы) в папку с названием
JavascriptSlideshow
в вашей папкеextensions/
. - Добавьте следующий код в конце вашего файла LocalSettings.php :
wfLoadExtension( 'JavascriptSlideshow' );
$wgHtml5= true; // when using MW 1.33 or earlier
- Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Для использующих MediaWiki 1.32 или более ранние версии:
В приведенных выше инструкциях описывается новый способ установки этого расширения с использованием wfLoadExtension()
.
Если вам нужно установить это расширение на более ранние версии (MediaWiki 1.32 и более ранние), вместо wfLoadExtension( 'JavascriptSlideshow' );
, вам необходимо использовать:
require_once "$IP/extensions/JavascriptSlideshow/JavascriptSlideshow.php";
Options / attributes
- id
- The id to be given to the div containing the content. This allows you to pre-specify the id for styling purposes. If none is specified, the id will be a randomly generated number starting with 'slideshow_' (e.g. slideshow_12345).
- refresh
- The time, in milliseconds, between transitions. The default is 1000 milliseconds (one second).
- sequence
- The sequence in which to display the content. Must be one of the following values:
- forward: This is the default.
- backward
- random
- transition
- How to transition (change) between content. Must be one of the following values:
- cut: A straight cut from the current content to the new content. This is the default.
- fade: A one-second fade between the current content and the new content.
- blindDown: The new content "rolls down" over the existing content.
- transitiontime
- The time, in milliseconds, that transitions take to complete. The default is 400 milliseconds. Increase it to make transitions slower.
- center
- if 'true', center the slideshow (only works for a slideshow of images, not text).
Примеры
Тег
<slideshow sequence="random" transition="fade" refresh="10000"> <div>[[Image:Image1.jpg|thumb|right|128px|Caption 1]]</div> <div>[[Image:Image2.jpg|thumb|right|128px|Caption 2]]</div> <div>[[Image:Image3.jpg|thumb|right|128px|Caption 3]]</div> </slideshow>
This results in a div (with a randomly generated id) that randomly changed every 10 seconds between the three images specified (which happen to be wiki images).
Функция парсера
{{#slideshow: <div>Tick</div><div>Tock</div> |id=bar refresh=1000 }}
would result in a div (with an id of bar) that changed every second between the words Tick and Tock.
См. также
Это расширение включено в следующие вики-фермы/хостинги и/или пакеты: Это не исчерпывающий список. Некоторые вики-фермы/хостинги и/или пакеты могут содержать это расширение, даже если они не перечислены здесь. Всегда сверяйтесь со своими вики-фермами/хостингами или комплектами/бандлами для подтверждения. |