Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Flexslider Module for ss3

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 2855 Views
  • vincent_vega
    Avatar
    Community Member
    14 Posts

    Re: Flexslider Module for ss3 Link to this post

    Wish i'd seen these posts before installing....however i did & thought i had done something wrong, so i went back & added my database name in the _config.php (was following http://www.netefx.de/Silverstripe-flexslider.php)

    I now have a white screen with "SilverStripe Framework requires a $databaseConfig defined."

    I uploading the original config again & dev/build but still doesn't work

    Any suggestions to get my site back up & running? (it's in development at the mo, so no url)

    Cheers

  • pepe
    Avatar
    Community Member
    1 Post

    Re: Flexslider Module for ss3 Link to this post

    Hello,

    If someone is using this module under SS3.0.5 version and it is not working, go to the web developer tool console tab and see the same error as the one I attached. To solve the problem, add " (function($) { })(jQuery); " in flexslider/javascript/flexslider.template.js.

    (function($) {

    $(document).ready(function() {
    $('.flexslider_$sliderID').flexslider({
    animation: "$settings_animationType",
    easing: "$settings_easing", // doesnt seem to make a difference
    direction: "$settings_direction",
    reverse: $settings_reverse,
    animationLoop: $settings_animationLoop,
    slideshow: $settings_doSlideshow,
    slideshowSpeed: "$settings_slideshowSpeed",
    animationSpeed: "$settings_animationSpeed",
    randomize: $settings_randomize,
    controlNav: $settings_showControlNav
    //before: FLXslideBeforeHandler
    });

    });

    FLXslideBeforeHandler = function() {
    //console.log("before!");
    //FLXaddContentToSlides();
    }

    //FLXaddContentToSlides = function() {}

    })(jQuery);

    Attached Files
  • StefanDpunkt
    Avatar
    Community Member
    14 Posts

    Re: Flexslider Module for ss3 Link to this post

    How do I set up the Flex Slider that even authors can exchange pictures?
    For me, it may just be the Admin

    Attached Files
  • arthurdent
    Avatar
    Community Member
    163 Posts

    Re: Flexslider Module for ss3 Link to this post

    I'm having a styling issue with FlexSlider.

    The default style comes with a big chunky 4px white border (with 5px rounded edges, no less). I've used module on sites which just happened to have a white background so I didn't even know border was there. And now, for the first time, I've struck it on a site with full colour background and full colour images. Better still, site is responsive, so on a smaller screen it just looks gross.

    I found the following line (line 41) in stylesheet flexslider1.8.css:

    .flexslider {background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; zoom: 1;}

    which would appear to be the culprit. I've made line thinner, changed the colour (black would work), even commented whole line out -- to no avail. I've done ?flush=1, ?flush=all and even dev/build/. The bloody line is still there!!

    Anybody know how to get rid of it??

  • arthurdent
    Avatar
    Community Member
    163 Posts

    Re: Flexslider Module for ss3 Link to this post

    HA! There's ANOTHER copy of flexslider.css under /Flexslider/ThirdParty! That's where the wee bastard was hiding!!

  • lx
    Avatar
    Community Member
    82 Posts

    Re: Flexslider Module for ss3 Link to this post

    If i remember right, flexslider will look for a flexslider.css in your theme directory.

    Flexslider.php (line 227)

    Requirements::css($this->ThemeDir().'/css/flexslider.css'); // look for a custom flexslider.css in the projects themes folder

    You can add style information for either .flexslider {....} or for .flexslider_1 {....} to your own flexslider.css.
    That should hopefully overwrite the css from the module.

  • codepattern
    Avatar
    Community Member
    8 Posts

    Re: Flexslider Module for ss3 Link to this post

    Hi, I been having a bit of trouble with displaying the slider with my own existing picture objects - feeling a bit confused at the moment. I current have a many to many relationship one TestimonialPage having several TestimonialPhotos

       private static $many_many = array (
          'TestimonialPhotos' => 'Image'
       );

    and a private function in the controller to get the pictures ..

       public function testimonialSlider() {
          $testimonialSlider = new FlexSlider();
          $testimonialSlider->ID = "allTestimonialImages";    
          //$testimonialSlider->setDatalist(TestimonialPhotos::get());
          //Debug::Show("Start");
          //Debug::Show(TestimonialPage::get()->filter('TestimonialPhotos.ID', '30'));
          $temp = TestimonialPage::get();
          $testimonialSlider->setDatalist = $temp;
          $testimonialSlider->setFieldMapping(array(
             "Picture" => "TestimonialPhotos", // Not sure what this needs to map to. Is this correct ???
             //"Title" => "Created",
             "Description" => "Name",
             "InternalLink" => "Filename" // Not sure what this needs to map to. Is this correct ???
          ));
          // optional
          $testimonialSlider->setImageWidth(119);
          // optional
          $testimonialSlider->setImageHeight(100);
          // optional
          $testimonialSlider->setOptions(array(
             "animation" => "slide",
             "easing" => "linear",
             "direction" => "horizontal",
             "reverse" => 0,
             "animationLoop" => 0,
             "slideshow" => 0,
             "slideshowSpeed" => 7000,
             "animationSpeed" => 400,
             "randomize" => 0,
             "showControlNav" => 1
          ));
          // optional
          $testimonialSlider->addExtraClass("employees");
          Debug::Show($testimonialSlider);      
          return $testimonialSlider;
       }

    Anyway, I placed the $testimonialSlider in my template and never seem to get any results. Could someone put me in the right direction?

    Thanks

    P.S. working with SS 3.1

  • gypsyman
    Avatar
    Community Member
    2 Posts

    Re: Flexslider Module for ss3 Link to this post

    hello folks,

    please could someone help me with flexslider?

    I followed exactly the installation instructions as described:

    http://netefx.de/module/silverstripe-flexslider/

    but when refreshing mysite after installation the following error ocurred:

    "Parse error: syntax error, unexpected ',' in /home/u5866/public_html/mysite/_config.php on line 27"

    line 27 of mysite _config.php says:

    "Object::add_extension('Page'), 'FlexSliderExtension');"

    so it is exactly like the instal guide ...

    thank you very much for any help you might return

    2855 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.