Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Flexslider Module for ss3


Go to End


22 Posts   10541 Views

Avatar
vincent_vega

Community Member, 14 Posts

26 February 2013 at 9:32am

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

Avatar
pepe

Community Member, 1 Post

27 August 2013 at 8:27pm

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
Avatar
StefanDpunkt

Community Member, 14 Posts

19 February 2014 at 10:03pm

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

Attached Files
Avatar
mhdesign

Community Member, 216 Posts

13 March 2014 at 9:06pm

Edited: 13/03/2014 9:12pm

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??

Avatar
mhdesign

Community Member, 216 Posts

14 March 2014 at 11:32am

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

Avatar
lx

Community Member, 83 Posts

14 March 2014 at 9:14pm

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

Avatar
codepattern

Community Member, 11 Posts

29 April 2014 at 4:48pm

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

Avatar
gypsyman

Community Member, 2 Posts

23 June 2014 at 2:09am

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