From d19f7b8c50345a80c8a8bff94fc49599def7923a Mon Sep 17 00:00:00 2001 From: Peter Vavro Date: Sun, 22 Nov 2015 20:47:33 -0500 Subject: [PATCH] Code Update + Option to carousel element id added - strange code removed - code for "Slide Caption Class" added - input for "Slide Caption Class" moved - Option to change carousel element id added --- mod_carousel.php | 15 +++++----- mod_carousel.xml | 18 ++++++++---- tmpl/default.php | 75 +++++++++++++++++++++++++++++------------------- 3 files changed, 64 insertions(+), 44 deletions(-) diff --git a/mod_carousel.php b/mod_carousel.php index 81a0934..930eb41 100644 --- a/mod_carousel.php +++ b/mod_carousel.php @@ -16,12 +16,13 @@ //store params as object that we can loop through in tmpl/default.php $slideritems = new stdClass; -<<<<<<< HEAD -for ($i=1; $i <= 3; $i++) { - $slideritems->$i = new stdClass; -======= +$carousel_id = $params->get('carousel_id', 'myCarousel'); + + +for ($i=1; $i <= 6; $i++) $slideritems->$i = new stdClass; + for ($i=1; $i <= 6; $i++) { ->>>>>>> 6248772a906d6369fc6cafe301b56bd883689c50 + $slideritems->$i->heading = $params->get("slide".$i."_heading"); $slideritems->$i->text = $params->get("slide".$i."_text"); $slideritems->$i->background_image = $params->get("slide".$i."_background_image"); @@ -29,13 +30,11 @@ $slideritems->$i->button_text = $params->get("slide".$i."_button_text"); $slideritems->$i->button_link = $params->get("slide".$i."_button_link"); $slideritems->$i->show_read_more = $params->get("slide".$i."_show_read_more"); + $slideritems->$i->caption_class = $params->get("slide".$i."_caption_class"); } //more options $custom_style = $params->get('custom_style'); -$slide1_caption_class = $params->get('slide1_caption_class'); -$slide2_caption_class = $params->get('slide2_caption_class'); -$slide3_caption_class = $params->get('slide3_caption_class'); // Include the syndicate functions only once require_once dirname(__FILE__).'/helper.php'; diff --git a/mod_carousel.xml b/mod_carousel.xml index 1ad4bcd..9d8d42c 100644 --- a/mod_carousel.xml +++ b/mod_carousel.xml @@ -27,7 +27,9 @@ label="Module Class Suffix" description="tag on a css class to the module wrap"> - + + + @@ -38,6 +40,7 @@ + @@ -49,6 +52,7 @@ + @@ -59,7 +63,8 @@ - + + @@ -71,6 +76,7 @@ + @@ -82,6 +88,7 @@ + @@ -92,14 +99,13 @@ - + +
- - - +
diff --git a/tmpl/default.php b/tmpl/default.php index c6de64d..b5bd9e7 100644 --- a/tmpl/default.php +++ b/tmpl/default.php @@ -13,48 +13,63 @@ - ->>>>>>> 6248772a906d6369fc6cafe301b56bd883689c50