WordPress.org

Ready to get started?Download WordPress

Forums

Youtube with Style
Using The Gallery (4 posts)

  1. Marcus L. Howard
    Member
    Posted 3 years ago #

    Ok...I've honestly been trying to figure this out for a while and can't get it.
    The gallery feature means you can have multiple videos in a set similar to a playlist on your site.

    If that is the case, how do I go about setting that up. I've searched just about everywhere and can't find instructions :-(

  2. lchopkins1
    Member
    Posted 2 years ago #

    I have been trying to figure out how to set up the gallery also. I wish someone would reply to this post.

  3. joshuabremer
    Member
    Posted 2 years ago #

    Got it. First step, create a page with something like the following:

    [youtubegallery]
    B1Px0THhbb0
    idK6WfJ6AF8
    r1Xq0eNtUJo
    [/youtubegallery]

    Next step is all in the init.php file. Go to the following link:

    http://domain/wp-admin/plugin-editor.php?file=youtube-with-style/inc/init.php

    Here is what I changed:

    //Commented out by Josh to solve gallery problem
       		//if(is_active_widget('youtube_widget')) {
    			wp_register_style('highslide', YT_URL . 'highslide/highslide.css');
    			wp_enqueue_style('highslide');
    			wp_register_script('highslide', YT_URL . 'highslide/highslide-with-html.packed.js', false);
    			wp_enqueue_script('highslide');
    		//}
    function youtube_add_highslide() {
    
    	//Removed the active widget condition because I'm using a shortcode
    	if( /*(is_active_widget('youtube_widget')) && */ (!is_admin())) {
    	echo '
    	<script type="text/javascript">
    		hs.graphicsDir = "'.YT_URL.'highslide/graphics/";
    		hs.outlineType = "rounded-white";
    		hs.outlineWhileAnimating = true;
    		hs.showCredits = false;
    		hs.wrapperClassName = "draggable-header no-footer";
    		hs.allowSizeReduction = false;
    		hs.preserveContent = false;
    	</script>
    	';
    	}
    }

    Basically, because it isn't in the widget, it doesn't load the highslide javascript include. Therefore the gallery doesn't work. Do this at your own risk. Maybe leaving the highslide javascript function on all the time is bad, but I'm having a hard time finding out whether a shortcode is used in a page. Enjoy and good luck.

  4. Chris McCoy
    Member
    Plugin Author

    Posted 2 years ago #

    i will be going through the code this weekend to fix any issues, i have a big list on what to fix.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic