Giter Site home page Giter Site logo

slideshow_xh's Introduction

Slideshow_XH

Slideshow_XH facilitates to display all images in a given folder as a slideshow. The slideshows do not support any interaction of the visitor. Multiple slideshows with different effects and timings are possible.

Requirements

Slideshow_XH is a plugin for CMSimple_XH ≥ 1.7.0. It requires PHP ≥ 5.4.0.

Download

The lastest release is available for download on Github.

Installation

The installation is done as with many other CMSimple_XH plugins.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory slideshow/ to your server into the plugins/ directory of CMSimple_XH.
  4. Set write permissions for the subdirectories config/ and languages/.
  5. Navigate to PluginsSlideshow in the back-end to check if all requirements are fulfilled.

Settings

The configuration of the plugin is done as with many other CMSimple_XH plugins in the back-end of the Website. Go to PluginsSlideshow.

You can change the default settings of Slideshow_XH under Config. Hints for the options will be displayed when hovering over the help icon with your mouse.

Localization is done under Language. You can translate the character strings to your own language, if there is no appropriate language file available, or customize them according to your needs.

Usage

To show a slideshow on all pages insert into the template:

<?=slideshow('FOLDER', 'OPTIONS')?>

To show a slideshow on a single page or in a newsbox insert into the page:

{{{slideshow('FOLDER', 'OPTIONS')}}}

The parameters have the following meaning:

  • FOLDER: The path of a folder relative to the image folder of CMSimple_XH. All JPEG, PNG and GIF images inside this folder will be used for the slideshow; there must be at least two images inside this folder. If there are also *.webp images with the same basename as a recognized image, this are used instead, if WebP is supported by the browser. All images should have the same aspect ratio.
  • OPTIONS: Any given option will override the respective value in the Default section of the plugin configuration. The format of this parameter is the same as a “query string” (see the examples below). The options can be given in any order. If you want to stick with the defaults, you can omit this parameter. The following options are available:
    • order: The order of the images: fixed (alphabetically ordered; start with first image), sorted (alphabetically sorted; start with randomly chosen image) or random (randomly ordered).
    • effect: The kind of transition: fade, slide, curtain or random.
    • easing: The acceleration effect: linear, easeIn, easeOut or easeInOut.
    • delay: The initial delay in milliseconds until the slideshow starts.
    • pause: The duration of the pause between the transitions in milliseconds.
    • duration: The duration of the transition effect in milliseconds.

Examples

To show the images inside of userfiles/images/banners/ with the default settings on every page:

<?=slideshow('banners')?>

To show images in a treatmill fashion:

{{{slideshow('slides/run/', 'effect=slide&amp;pause=0&amp;duration=2000')}}}

To show images as calm, slowly cross-fading slideshow:

{{{slideshow('slides/slow/', 'effect=fade&amp;pause=5000&amp;duration=100')}}}

To show appropriate images in a flip-book style:

{{{slideshow('slides/flip/', 'order=fixed&amp;effect=fade&amp;pause=100&amp;duration=100')}}}

Limitations

The slideshows can only be played, when JS is enabled in the browser of the visitors, and they are using contemporary browsers, Otherwise only the first image will be shown. The transition effects are CPU-intensive, particularly for large images, so you should restrain yourself to only a few slideshows with small or medium-sized images on the same page, to avoid stuttering slideshows for visitors with little processing power.

Troubleshooting

Report bugs and ask for support either on Github or in the CMSimple_XH Forum.

License

Slideshow_XH is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Slideshow_XH is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantibility or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Slideshow_XH. If not, see https://www.gnu.org/licenses/.

Copyright 2012-2021 Christoph M. Becker

Danish translation © 2012 Jens Maegard
Czech translation © 2012-2013 Josef Němec
Slovak translation © 2013 Dr. Martin Sereday
French translation © 2014 Patrick Varlet

Credits

Slideshow_XH was inspired by Joe.

The plugin icon is designed by Mischa McLachlan. Many thanks for publishing this icon under a liberal license.

Many thanks to the community at the CMSimple_XH Forum for tips, suggestions and testing. Particularly, many thanks to Caravaner for the prompt reporting of bugs, and olape for suggesting the progressive WebP enhancement.

And last but not least many thanks to Peter Harteg, the “father” of CMSimple, and all developers of CMSimple_XH without whom this amazing CMS would not exist.

slideshow_xh's People

Contributors

cmb69 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

slideshow_xh's Issues

Add image descriptions

These should probably be hard-coded into the images, and also used as alt attribute values. It's not clear, however, where to store this meta information – perhaps as Exif data.

Empty options are 1

If the $options argument has an option with an empty value, the value is handled as "1", while it actually should be the configured default value.

Add plugin stylesheet

Although not really necessary, some empty rules which hint at possibly useful selectors would be nice.

Single image shows error

More precisely: a Type error occurs. The obvious solution is to require at least two images for the slide show.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.