這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Fotorama

外掛說明

Fotorama is a simple, stunning, powerful jQuery gallery.

  • All Browsers. From IE 7 to Safari on iOS. Including Android and Windows Phone.
  • Neat and transparent. Looks great by default, even better with your settings.
  • Compact in-page and epic fullscreen mode.
  • Touch gestures. Fine response to drag and swipe.
  • Seamless responsive.
  • Fast CSS3 transitions.
  • Save Bandwidth. Fotorama lazy loads only one image ahead.
  • Let Fotorama play photos automatically. The show will stop on touch.
  • Thumbnails, shuffle, keyboard navigations, loop, and more…

Licensed under the MIT.

螢幕擷圖

  • Fotorama post with responsive “Twenty Thirteen” theme
  • Neat with “Twenty Twelve”
  • Seamless responsive
  • Looks well with every background

安裝方式

  1. Install Fotorama either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. After activating Fotorama your galleries turn into fotoramas.
  3. Say Hi to Fotorama!

Installation screencast

Customize

Control a single fotorama using standard gallery shortcode:

[gallery ids="1,2,3"]

Shortcode will take the following core attributes: ids, orderby, order, id, include, and exclude.

Disable fotorama and use standard gallery with fotorama="false":

[gallery ids="1,2,3" fotorama="false"]

Fotorama’s default settings are good, so there’s no need to mess with them. Still, you can fine-tune. Add any attributes that are listed in the original documentation, but without data- prefix.

Thumbnails

Change navigation style from iPhone-style dots to thumbnails by adding nav="thumbs":

[gallery ids="1,2,3" nav="thumbs"]

Fullscreen

Allow fotorama to enter fullscreen using allowfullscreen:

[gallery ids="1,2,3" allowfullscreen="true"]

Fit

There are 4 ways to fit an image into a fotorama: contain, cover, scaledown, and none. Choose one:

[gallery ids="1,2,3" fit="cover"]

Transition

Define which transition to use — slide or crossfade — using transition:

[gallery ids="1,2,3" transition="crossfade"]

Hash

Attribute hash="true" lets the page change its URL upon switching images. To send a link to a specific photo to a friend 🙂

[gallery ids="1,2,3" hash="true"]

Better be used with only one fotorama per page.

Loop

Loop the last and the first frame for seamless transition using loop="true":

[gallery ids="1,2,3" loop="true"]

Autoplay

Let Fotorama play photos automatically using autoplay="true". By default, a pause between images is 5 seconds. Set any interval in milliseconds, for example, 3 seconds:

[gallery ids="1,2,3" autoplay="3000"]

The show stops on touch. Change this with stopautoplayontouch="false".

Shuffle

Shuffle frames by adding shuffle="true":

[gallery ids="1,2,3" shuffle="true"]

Keyboard

Turn on keyboard navigation with the arrows by adding keyboard="true":

[gallery ids="1,2,3" keyboard="true"]

Works only for the first fotorama on page.

Arrows, click, swipe

Control the way your users interact with the fotorama with three attributes arrows, click, and swipe:

[gallery ids="1,2,3" arrows="true" click="true" swipe="false"]

Navigation position

To move dots or thumbs on top, use navposition="top":

[gallery ids="1,2,3" navposition="top"]

Hide navigation with nav="false".

常見問題集

Installation Instructions
  1. Install Fotorama either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. After activating Fotorama your galleries turn into fotoramas.
  3. Say Hi to Fotorama!

Installation screencast

Customize

Control a single fotorama using standard gallery shortcode:

[gallery ids="1,2,3"]

Shortcode will take the following core attributes: ids, orderby, order, id, include, and exclude.

Disable fotorama and use standard gallery with fotorama="false":

[gallery ids="1,2,3" fotorama="false"]

Fotorama’s default settings are good, so there’s no need to mess with them. Still, you can fine-tune. Add any attributes that are listed in the original documentation, but without data- prefix.

Thumbnails

Change navigation style from iPhone-style dots to thumbnails by adding nav="thumbs":

[gallery ids="1,2,3" nav="thumbs"]

Fullscreen

Allow fotorama to enter fullscreen using allowfullscreen:

[gallery ids="1,2,3" allowfullscreen="true"]

Fit

There are 4 ways to fit an image into a fotorama: contain, cover, scaledown, and none. Choose one:

[gallery ids="1,2,3" fit="cover"]

Transition

Define which transition to use — slide or crossfade — using transition:

[gallery ids="1,2,3" transition="crossfade"]

Hash

Attribute hash="true" lets the page change its URL upon switching images. To send a link to a specific photo to a friend 🙂

[gallery ids="1,2,3" hash="true"]

Better be used with only one fotorama per page.

Loop

Loop the last and the first frame for seamless transition using loop="true":

[gallery ids="1,2,3" loop="true"]

Autoplay

Let Fotorama play photos automatically using autoplay="true". By default, a pause between images is 5 seconds. Set any interval in milliseconds, for example, 3 seconds:

[gallery ids="1,2,3" autoplay="3000"]

The show stops on touch. Change this with stopautoplayontouch="false".

Shuffle

Shuffle frames by adding shuffle="true":

[gallery ids="1,2,3" shuffle="true"]

Keyboard

Turn on keyboard navigation with the arrows by adding keyboard="true":

[gallery ids="1,2,3" keyboard="true"]

Works only for the first fotorama on page.

Arrows, click, swipe

Control the way your users interact with the fotorama with three attributes arrows, click, and swipe:

[gallery ids="1,2,3" arrows="true" click="true" swipe="false"]

Navigation position

To move dots or thumbs on top, use navposition="top":

[gallery ids="1,2,3" navposition="top"]

Hide navigation with nav="false".

How not to repeat the same attributes in each [gallery]? Is it possible to override the defaults?

Yes, there is a hack for that. Create file fotoramaDefaults.js in the /wp-content/plugins/ directory and list your options like so:

fotoramaDefaults = {
  nav: 'thumbs',
  allowfullscreen: 'native',
  transition: 'crossfade',
  loop: true,
  keyboard: true
}

Fotorama will try to fetch the options from the /wp-content/plugins/fotoramaDefaults.js.

使用者評論

2019 年 7 月 24 日
Выражаю благодарность разработчику, который сделал этот плагин. Очень рад найти его в репозитории WordPress. Счастья, здоровья и долголетия вас за ваш труд. Столкнулся только с проблемой, что fotorama не хочет выводить атрибуты alt и title Чтобы скрипт не удалял у картинок теги alt и title можно подправить файл fotorama.js. Для этого потребуется в fotorama.js найти следующую строку Код: frameData.state = ''; и сразу после нее добавить Код: if ( frameData.data.hasOwnProperty('alt') ) { img.alt= frameData.data.alt; } if ( frameData.data.hasOwnProperty('title') ) { img.title= frameData.data.title; } Потом в fotorama.js найти и удалить следующую строку Код: height = numberFromMeasure(imgData.height || $img.attr('height')); на место удаленной строки добавить Код: height = numberFromMeasure(imgData.height || $img.attr('height')), alt = $img.attr('alt'), title = $img.attr('title'); if (alt){ $.extend(imgData, { alt: alt }); } if (title){ $.extend(imgData, { title: title }); } Alt и title начинают нормально отображаться:
2019 年 7 月 2 日 1 則留言
There are simply no words - what a wonderful plugin - and everything is still working !!! Thanks to the author !!! Remaining, I found it - spent 2 days. The most usual thing was needed - product placement as everywhere else - the main large photo - miniatures under it. I was already in despair - a bunch of galleries - that closed this function into paid functions! Why such a rating for a plugin? That no one would know? How I found this plugin - on the New Auction site - looked at what the product photos were inserted - and found the magic word fotorama. Well, is this normal? Why is this plugin impossible to find in the WP directory? I guess, of course. This is just an eternal classic gallery with thumbnails !!! There is autoscrolling (if needed), on click - a large window opens. And nothing more is needed! And for free! Artem Polikarpov - You are a genius !!! ))) Thank you so much! ------------------- Просто нет слов - какой чудесный плагин - и все до сих пор работает!!! Автору огромнейшее спасибо!!! Покая я его нашла - потратила 2 дня. Нужна была самая обычна вещь - размещение товара как везде - главное крупное фото - под ним миниатюры. Я уже отчаилась - куча галерей - которые позакрывали эту функцию в платные функции! Почему такой рейтинг у плагина? Чтобы никто не знал? Как я нашла этот плагин - на сайте Ньюаукциона - глянула чем же вставлены фото товаров - и нашла волшебное слово fotorama. Ну это нормально? Почему этот плагин невозможно найти в каталоге WP? Дагадываюсь, конечно. Это просто вечная классика галереи с миниатюрами!!! Автопрокрутка есть (если нужно), по клику - открывается большое окно. А больше ничего и не нужно! И бесплатно! Артем Поликарпов - Вы гений!!! ))) Огромное спасибо!
2019 年 4 月 20 日
Excellent gallery plugin. Would actually only rate with one star, because it is more than four years old and obviously not developed anymore. Would like to use it, but fear that it might stop working with a future WordPress update. Shame. However, this is really great, because it is lightweight, easy to customise and it has many features that make sense. To my mind it is by far better than all the other, more popular slider plugins available. Let's hope the developer has not completely abandoned it.
2017 年 6 月 27 日
Hi, came across this plugin and would like to use it. But there's no activity anymore on support or development. Is it safe to use this or is there anybody that build a similair plugin?
2020 年 3 月 4 日 1 則留言
Отличная надстройка над галереей. Только не хватает режима при котором fullscreen ограничен размерами картинки. Прошло 4 года, а плагин не потерял актуальности. Работает без проблем на любой версии Wordpress. Понадобилось, чтобы растягивалось по ширине страницы - добавил $atts['width'] = '100%'; в fotorama.php, настроил параметры в fotoramaDefaults.js. Для встроенной галереи поддерживает Lazyload. При ручной настройке вместо <img src= используем <a href= ...
閱讀全部 24 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Fotorama〉的開發相關工作。

參與者

將〈Fotorama〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄