Your Moodle version

Blocks: Slideshow

block_slideshow
Maintained by My Hero Paul P.
A block that inserts a slideshow in the header of the front page or course page. Features include customizable background colors, transition types, speeds, and size.

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.

It works with all core Moodle Themes except "Clean" due to an issue with the theme's ability to load Jquery correctly (MDL-41516)

Update: 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
  • Standard


(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.)

Installation:
Download, extract, and upload the "Slideshow" folder into moodle/blocks

Global Configuration:

  • Set maximum number of slides in a slideshow
  • Set maximum file size of slides


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
  • Display as normal block - Selecting this will have the block appear in a side column instead of being embedded in the header
  • Transparent - Clicking this overrides the background color setting and makes the background transparent
  • Image selector - Will only accept gif, jpg, or png files

Screenshots

Screenshot
Screenshot
Screenshot

Contributors

My Hero
Paul P. (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • My Hero
    Thu, Sep 19, 2013, 8:06 AM
    Hi Chris,

    Since your theme is modified, I am a bit reluctant to include the fix in the block. However, I think you can easily modify it yourself.

    Try putting the following two lines of code:

    #contentwrapper { top: 0 !important; }
    .block.block_slideshow { margin-top: 46px !important; }

    at the very top of the style.css file that is in the slideshow block's directory (i.e. slideshow/style.css)

    Don't forget to purge your caches to see the effect.

    Let me know how it turns out.

    Paul
  • Picture of Nadav Kavalerchik
    Sun, Sep 22, 2013, 10:23 PM
    Thanks Paul (for the Normal block feature)
  • Picture of Guilherme Alves
    Wed, Oct 2, 2013, 3:42 AM
    Hi, Paul.
    Nice job!
    I sent you a e-mail asking for a code update.
    I'm waiting your reply.
  • Picture of Guilherme Alves
    Wed, Oct 9, 2013, 10:45 PM
    Hi Paul,
    Would you mind make it compatible with this theme?
    https://moodle.org/plugins/view.php?plugin=theme_darkb
    Thanks!
  • My Hero
    Sun, Oct 13, 2013, 11:46 AM
    Hi Guilherme,

    I just tested the block with dark blue and it seems to be working properly without modifications. Can you tell me:
    a) what version of moodle are you using and
    b) what problem you are experiencing?

    Thanks.
  • Picture of Guilherme Alves
    Wed, Oct 16, 2013, 10:42 PM
    Hi Paul,
    I'm using the version 2.5.
    The problem I'm experiencing is about the logo. The slideshow pull it down and create a large space. Take a look.


    I'll really appreciate your help to make something like this:


    or like this:


    Thanks, have a nice day.
  • My Hero
    Thu, Oct 17, 2013, 8:13 AM
    Okay, thank you - I see the issue. Give me a few days and I will upload and update containing the fix.

    If you don't want to wait and instead fix it yourself, you will need to edit two files:

    First, in block_slideshow.php, find this section around line 174:

    case 'splash':
    $node = 'page-header-wrapper';
    break;

    and add the following right after it:

    case 'darkb';
    $node = 'headerwrap';
    break;

    so in the end it looks like this:

    case 'splash':
    $node = 'page-header-wrapper';
    break;
    case 'darkb';
    $node = 'headerwrap';
    break;

    Second, in styles.php, insert the following at the beginning of the first line (be sure to include the comma):

    #headerwrap,

    So that the first line looks like this:

    #headerwrap, #newheader {height: auto !important;} /* Fix for Overlay and DarkB theme*/

    Don't forget to purge your caches!
  • Picture of Javier Ruiz
    Fri, Nov 15, 2013, 12:04 AM
    First of all thank you for the plugin! Great and useful job!
    It works great bit I have an small problem. I see the images with diferent sizes depending on the computer. Maybe it´s not plugin´s faul and it´s some other configuration but may you have some clue?
    thanks in advance,
    Javi
  • Picture of Javier Ruiz
    Fri, Nov 15, 2013, 12:04 AM
    First of all thank you for the plugin! Great and useful job!
    It works great bit I have an small problem. I see the images with diferent sizes depending on the computer. Maybe it´s not plugin´s fault and it´s some other configuration but may you have some clue?
    thanks in advance,
    Javi
  • My Hero
    Fri, Nov 15, 2013, 6:54 AM
    Hi Javier,

    I'm not sure what would cause that, but perhaps you can send me the url of the website?

    Also, were your images originally the same or different sizes? I find that if the images are edited first to be the same size, there are fewer issues.
  • Picture of Bernard Vuilleumier
    Sun, Dec 8, 2013, 1:14 AM
    Hello Paul
    Thank you for this beautifull plugin. I use it on Moodle 2.6. It works fine:

    http://www.i-les.ch/moodle/

    Do you think if it will be possible in the future to associate url with the images?
    I use this with a slider in a CMS:

    http://www.owl-spip.ch

    With a click on an image we can reach another page.
    Best Regards.
  • Picture of Zhu XJ
    Tue, Feb 4, 2014, 6:56 PM
    Hi, Paul,
    The Moodle version is 2.6, but fail to install slideshow:

    Validation failed!Help with Validation failed!
    Status Message Info
    OK Name of the add-on to be installedHelp with Name of the add-on to be installed
    slideshow
    OK Add-on version
    2013091800
    OK Required Moodle version
    2013040500
    Warning Declared maturity levelHelp with Declared maturity level
    MATURITY_BETA
    OK Add-on release
    0.5.0
    -------------------------------------------
    Error English language file name mismatch The given add-on type is missing the expected English language file slideshow.php.

    ------------------------------------

    Any advice?
  • Picture of Bruce Nguyen
    Wed, Jun 4, 2014, 4:06 PM
    Wed, 4 Jun 2014, 4:05 PM

    Hi,

    I cannot run with moodle 2.6.2. Not show up add picture button (just see waiting cursor).

    Can you please help me.

    Thank you so much.
    Bruce
  • My Hero
    Mon, Jun 30, 2014, 2:09 AM
    Hi Bruce,

    Sorry for the late reply.

    I just tested this in 2.6.2 and it is working for me. Can you give me more details regarding your installation? I.e. are you trying to include this into the frontpage, a course page? What theme are you using?

    Also, turn debugging on and see if there are any error messages.

    Paul
  • My Hero
    Mon, Jun 30, 2014, 2:15 AM
    Hi Zhu,

    Sorry for the late reply.

    I'm not sure what would cause that issue, since the plugin works in versions 2.5, 2.6, and 2.7, however it sounds like you are trying to install it from the admin interface.

    A couple of things to try:
    1) make sure your permissions of the directory are correct (see https://moodle.org/mod/forum/discuss.php?d=242687)
    2) see if the issue is with php's max_execution_time (see https://moodle.org/mod/forum/discuss.php?d=257500)

    I hope this helps,
    Paul
1 2
Please login to post comments