admin/setting/blocksettingslideshow

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.7. Up-to-date documentation for the latest stable version of Moodle may be available here: admin/setting/blocksettingslideshow.

An add-on block that inserts a slideshow in the header of the front page or course page.

This is a new block which creates a slideshow in the header of a site or course page. It uses jquery/cycle to handle the image transitions. Jquery is also used to manipulate the DOM to reposition the block's node into the heading div of the page.

Since this is dependent on using moodle's built in jquery functions, it is not available for versions prior to 2.5.

Moodle themes

It works with all core Moodle 2.x Themes except "Clean" due to an issue with the theme's ability to load Jquery correctly (MDL-41516). This block will work with the Clean theme on Moodle version 2.5.2 where MDL-41516 has been fixed.

Tested with:

  • Afterburner
  • Anomaly
  • Arialist
  • Binarius
  • Boxxie
  • Brick
  • Formal White
  • FormFactor
  • Fusion
  • Leatherbound
  • Magazine
  • Nimble
  • Nonzero
  • Overlay
  • Serenity
  • Sky High
  • Splash

Note: it may work with some third party themes, but most likely not with any bootstrap based theme due to MDL-41516. If you have a third party theme and it doesn't work, send me a link to your site and I will update the code.

Features

  • customizable background colors,
  • transition types,
  • speeds, and
  • size.

Download

This add-on is available from the Moodle Database.

Global Settings

These settings apply to the teachers who will upload slides. Admins have no such limits.

  • Maximum slides: Maximum number of slides in the show.
  • Max file size: Select the largest file size that can be uploaded to the slideshow. Keep in mind that smaller sizes will restrict images to low quality, but larger sizes will affect page load time.

Instance Configuration

  • Title - Set title of slideshow (leave blank to hide block's heading)
  • Height - Sets height of slideshow and images **NOTE** this block will not rescale image files, it will only change the display size
  • Transition - Choose from various slide transitions (some are a bit clunky, but most work well)
  • Delay - Sets the time for which a single slide is displayed
  • Background color - Clicking in this textbox triggers a colorpicker
  • Transparent - Clicking this overrides the background color setting and makes the background transparent
  • Display as normal block - Checking this will cause the block to display in a side column as a regular block instead of being embedded in the header. It will have the appearance of a regular block as well.
  • Image selector - Will only accept gif, jpg, or png files

How to increase the maximum number of slides from 15 to 36

  • It's pretty easy.
  • Edit the file settings.php and change line 40 from
array(1=>'1',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9',10=>'10',11=>'11',12=>'12',13=>'13',14=>'14',15=>'15')
to
array(1=>'1',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9',10=>'10',11=>'11',12=>'12',13=>'13',14=>'14',15=>'15',36=>'36')
  • Just keep in mind that downloading 36 images in one shot may cause performance issues.

See also