• Resolved pako69

    (@pako69)


    Hello
    I was searching a solution for make it works with https://www.ads-software.com/extend/plugins/jquery-colorbox/

    jquery colorbox, need a full url to the image to open his box.

    Well, ok, i can enter an url for an image with your plugin.

    The problem is i need the url of the full image to make jquery colorbox to work..

    I have trick you code and it work, but i really don’t like what i have done because in case of update of you plugin, i’ll lose my tricks…

    Do you have any proper solutions to simply add the full url on an image into you backoffice plugin ?

    Thanks

    here is my changes in metaslide.image.class.php :

    /* OLD CODE
    		$anchor_attributes = apply_filters('metaslider_nivo_slider_anchor_attributes', array(
    		    'href' => $slide['url'],
                'target' => $slide['target']
            ), $slide, $this->slider->ID);
    		*/
    
    		/* BEGIN : CUSTOM CODE */
    		$image_full = substr($slide['src'],0,strlen($slide['src'])-12).'.'.substr($slide['src'],-3);
    
    		if ($slide['url'])
    		{
    		$anchor_attributes = apply_filters('metaslider_nivo_slider_anchor_attributes', array(
    		    'href' => $slide['url'],
                'target' => $slide['target']
            ), $slide, $this->slider->ID);
    		} else {
    		$anchor_attributes = apply_filters('metaslider_nivo_slider_anchor_attributes', array(
    		    'href' => $image_full,
                'target' => $slide['target']
            ), $slide, $this->slider->ID);
    		}
    		/* END : CUSTOM CODE */

    https://www.ads-software.com/plugins/ml-slider/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter pako69

    (@pako69)

    hi…
    Realy nothing ? /-)
    Thanks

    Here you go, add this to your functions.php file ??

    function metaslider_add_full_url_to_slides($attributes, $slide, $slider_id) {
    	if (!strlen($attributes['href'])) {
    		$attributes['href'] = wp_get_attachment_url($slide['id']);
    	}
    	return $attributes;
    }
    add_filter('metaslider_flex_slider_anchor_attributes', 'metaslider_add_full_url_to_slides', 10, 3);
    add_filter('metaslider_nivo_slider_anchor_attributes', 'metaslider_add_full_url_to_slides', 10, 3);
    add_filter('metaslider_responsive_slider_anchor_attributes', 'metaslider_add_full_url_to_slides', 10, 3);
    add_filter('metaslider_coin_slider_anchor_attributes', 'metaslider_add_full_url_to_slides', 10, 3);

    (Make sure the single quotes don’t get converted to curly ones when you paste the code from here into the functions.php file, otherwise it will not work)

    Regards,
    Tom.

    Thread Starter pako69

    (@pako69)

    Okey, thanks i’ll try ??

    Thread Starter pako69

    (@pako69)

    won-der-full !
    ??
    Thanks
    can you integrate this into a future release as an option for people using jquery colorbox plugin ?

    Hi pako69,

    Quite possibly… we may hold it back for Meta Slider Pro. But there’s an equal chance we’ll put it into free. We’d want to do it properly which would take some time.

    Putting it into free also complicates the interface a bit. I like that Meta Slider Free is so basic looking, I think that’s one of its main features (i.e, one of it’s main features is that it hasn’t got a tonne of extra features – if that makes sense!).

    But then.. adding lightbox integration to the free version might help position Meta Slider as the go to image slider.

    What do you reckon we should do? ??

    Regards,
    Tom.

    Thread Starter pako69

    (@pako69)

    adding lightbox integration to the free version might help position Meta Slider as the go to image slider.
    Absolutly right ! I’v been searching a long time to find a free, responsive, versatil and easy to use gallery.
    Never i found one with likebox integration, so its the reason why i asked you that.
    My opinion is that, i’m not the only one who wants to have a lightbox effect on a image with a nice slider behind.
    But then, to be free or not… i can’t tell you what you have to do ??

    Hmm, cool. Thanks for the feedback ??

    At the moment I am sort of heading in the direction of “Try and make Meta Slider (free) the best image slideshow”, and leave everything else – videos, post feeds etc – to Pro. That’s worked ok for us so far, and lightbox integration comes up again and again. I’m not sure if it really belongs in Pro.

    The other part of me tells me that we need to make sales (the sad truth) . That’s what lets me dedicate 100% of my time Meta Slider.

    Decisions decisions..

    In summary though, Lightbox integration will definitely be in Meta Slider or Meta Slider Pro (one day). I’m not sure which yet, but it will definitely happen ??

    Thread Starter pako69

    (@pako69)

    Lightbox integration will definitely be in Meta Slider or Meta Slider Pro
    Lol, but good decision!
    I must admit that it will not easy to deal with all the lightbox (Colorbox, Lightbox, etc.) Some requires an href, somme requires an rel=, etc.
    it will take you time to develop all those stuff, and time is… money, so, perharps you could give one or two lightbox possibility in the free version and all the others in the paid version?

    Adding new tabs (properly) will require a bit of up front refactoring – which needs to be done anyway.
    Adding the rels or hrefs to the slides isn’t too complex really, just time consuming to work out what goes where for each plugin (you can already do it with filters as you’ve seen).
    Detecting the plugins is OK.

    On going support is where the time gets eaten up ??

    Would be a cool feature though and I’m sure lots of people would like it. I’m leaning towards putting in into the free version. I could even release it as a separate plugin (or someone else could, if they wanted to take it on!)

    Thread Starter pako69

    (@pako69)

    i will contact you and mail you via https://www.metaslider.com/: i’ve have some questions about the pro version for our MU Wordress websites… see u soon ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Make it works with jquery color box’ is closed to new replies.