Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Unislash

    (@unislash)

    Sweet! Great job 🙂

    Looking forward to your next updates. Hopefully you can get to captions and transition effects!

    Cheers,
    Unislash

    Thread Starter Unislash

    (@unislash)

    Thank you for making it 🙂

    Glad to hear you’ll take a look at the changing slides business. For my uses, I’m more concerned with the captions not able to be turned off.. is the toggle working for you through the wordpress plugin?

    Lastly, a thing on my wishlist for Wunderslider would be to allow the transitions to apply when manually changing slides. That would be a nice feature 🙂

    Thread Starter Unislash

    (@unislash)

    Hmm, looks like I went at this the hard way. I was attempting to use wunderslider without the actual plugin. No wonder I was having trouble… that’s what you get when you don’t read much of the about page :-p

    I’m still having issues turning captions off even though I have set the wunderslider gallery plugin to do so. Also, when two sliders are on a page, only one automatically changes slides. 🙁

    Other than that, the plugin itself works quite well, good job!

    Thread Starter Unislash

    (@unislash)

    Here’s a bit of an update. For those wanting to get this to work with the visual editor, there’s more to do. First, the plugin from http://www.binh.name doesn’t solve the html stripping problems (you don’t need to use it). If you want to solve it, you’re going to have to go deeper. Please note that you can mess things up here, as you’re editing things akin to wordpress source files. Anyway, pull up /wp-includes/kses.php and add this in the $allowedPostTags variable:

    'wunderslider' => array(
    	'mode' => true,
    	'display' => true,
    	'autoAdjust' => true,
    	'useCaption' => true,
    	'useSelectors' => true,
    	'useNav' => true,
    	'useThrobber' => true,
    	'useFlick' => true,
    	'mouseOverPause' => true,
    	'effect' => true,
    	'effects' => true,
    	'animateInterval' => true,
    	'overlay' => true,
    	'duration' => true,
    	'zIndex' => true,
    	'width' => true,
    	'height' => true,
    ),

    Then pull up /wp-includes/class-wp-editor.php and search for ‘article[*]’. Add an entry for wunderslider like so:

    'extended_valid_elements' => 'wunderslider[*],image[*],article[*],

    This will clear the wunderslider xml element from wordpress’ filters. Unfortunately, there is something trickier to tweak to allow the <image> element to be skipped, as wordpress loves to change it to <img alt=””>. Thanks wordpress!

    To get around that, I have just coded a shortcode. So far I have never needed to make a slider with anything but all my images for a post, so I just made a shortcode that grabs them and formats them correctly:

    //[postimages]
    function sc_postimages($atts, $content = null) {
    	extract(shortcode_atts(array(
    		"size" => 'large',
    		"link_to" => ''
    	), $atts));
    	$images =& get_children( 'post_type=attachment&post_mime_type=image&post_parent='.get_the_id().'&orderby=menu_order&order=ASC' );
    	$imageSources = array();
    	$output = '';
    	foreach( $images as $imageID => $imagePost ) {
    		$imagedata = wp_get_attachment_image_src($imageID, $size, false);
    		$output .= '<image url="'.$imagedata[0].'" linkUrl="'.
    			($link_to == '' ? $imagedata[0] : $link_to)
    			.'" />
    			';
    	}
    	return $output;
    }
    add_shortcode( 'postimages', 'sc_postimages' );

    The last thing you need to do is, unfortunately, change some of wunderslider’s source code. For some reason, wunderslider’s parameters are case-sensitive, and wordpress turns them all to lowercase during the filter. This shouldn’t happen, but it’s convention to code in a way that user input, options, and parameters are not case sensitive. Allowing this would be one nice layer of polish that takes all of 5 minutes to do with find & replace. Edit /lib/core/class-wunderslider-xml-parser.php and add $attribute = strtolower($attribute); on line 345 before the switch statement, and then manually lowercase all cases in the following switch statement. Then, edit /js/wunderslider-min.js to find and replace the parameters you’re using and change them to all lower case.

    @WunderSlider it’s a good start, but you’ve got a lot ahead of you to make this plugin an option for most wordpress users. I would highly advise you to implement the case-insensitive bit, as well as use valid html elements. You can do it!

Viewing 4 replies - 1 through 4 (of 4 total)