WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Gallery] to Include YouTube Video

[Resolved] [Plugin: Gallery] to Include YouTube Video

  • Andrew Nevins
    Forum moderator

    @anevins

    Hello,

    I want the Gallery to include YouTube Videos.

    Gallery items to include another field, ‘video url’ (for each gallery item).
    When this field is entered, it should replace the anchor tag ‘href’ value with the ‘video url’.

    For FancyBox to respond accordingly, a new jQuery selector be required to switch ‘type’ to ‘swf’. A class for the anchor tag, of maybe ‘video’, should be used as the selector for this new jQuery.

    The jQuery for FancyBox video should have all the default settings of the FancyBox image gallery, but added ‘href’ for youtube urls, ‘type’ and ‘swf’.

    $(".video-or-something").click(function() {
    	$.fancybox({
    
    			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
    			'type'			: 'swf',
    			'swf'			: {
    				 'wmode'		: 'transparent',
    				'allowfullscreen'	: 'true'
    			}
    		});
    
    	return false;
    });

    I just need this add-on for complete satisfaction of this almost excellent plug-in.

    Would this be feasible?

    http://wordpress.org/extend/plugins/gallery-plugin/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Gallery] to Include YouTube Video’ is closed to new replies.