Forum Replies Created

Viewing 1 replies (of 1 total)
  • 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:

    https://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.

Viewing 1 replies (of 1 total)