• Resolved phycel

    (@phycel)


    I absolutely love this plugin and use it on almost all of my blogs/websites… but now I am running into a problem with the most recent version.

    When I upgrade to NextGen v. 0.99.1, my slideshows that I code in manually will no longer work. What I mean by this is, I use a javascript code to put a slideshow either in the header or manually within a page template.

    Here is the code I use to do this:

    <div class="slideshow" id="ngg_slideshowHeader">
    <p>The <a href="https://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="https://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..</p></div>
    <script type="text/javascript" defer="defer">
    	var soHeader = new SWFObject("<?php bloginfo('url'); ?>/wp-content/plugins/nextgen-gallery/imagerotator.swf", "ngg_slideshowHeader", "552", "263", "0", "#FFFFFF");
    	soHeader.addParam("wmode", "opaque");
    	soHeader.addVariable("file", "<?php bloginfo('url'); ?>/wp-content/plugins/nextgen-gallery/nggextractXML.php?gid=1");
    	soHeader.addVariable("linkfromdisplay", "false");
    	soHeader.addVariable("overstretch", "fit");
    	soHeader.addVariable("backcolor", "0xFFFFFF");
    	soHeader.addVariable("frontcolor", "0xFFFFFF");
    	soHeader.addVariable("lightcolor", "0xFFFFFF");
    	soHeader.addVariable("rotatetime", "5");
    	soHeader.addVariable("transition", "slowfade");
    	soHeader.addVariable("width", "552");
    	soHeader.addVariable("height", "263");
    	soHeader.write("ngg_slideshowHeader");
    </script>

    Here is a site I am currently working on using this type of setup. https://execstrat.clientpod.com/ If anyone has an idea of why the most recent version of NextGen will no longer work with this setup, do share!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Alex Rabe

    (@alexrabe)

    It’s because the swfobject code changed in version 2.1. See here for more : https://code.google.com/p/swfobject/

    But the changes are not so big, have a look at the source of the new way and you will quickly understand what do you need to change in your manually added code…

    Thread Starter phycel

    (@phycel)

    THANK YOU! Just so everyone can benefit from this, here is the code to get these updates to work properly:

    <div class="ngg-widget-slideshow" id="sbsl3_1" style="width:552px; height:263px; background-color:#FFFFFF;">
    <a href="https://get.adobe.com/flashplayer/">Get the Flash Player</a> and <a href="https://www.mozilla.com/firefox/">a browser with Javascript support</a> to see the slideshow.
    </div>
    
    <script type="text/javascript" defer="defer">
    <!--
    //<![CDATA[
    var sbsl3_1 = {
    	params : {
    		wmode : "opaque"},
    	flashvars : {
    		file : "<?php bloginfo('url'); ?>/wp-content/plugins/nextgen-gallery/nggextractXML.php?gid=1",
    		shownavigation : "false",
    		rotatetime : "5",
    		overstretch : "fit",
    		transition : "slowfade",
    		shuffle : "0",
    		backcolor : "0xFFFFFF",
    		frontcolor : "0xFFFFFF",
    		lightcolor : "0xFFFFFF",
    		screencolor : "0xFFFFFF",
    		width : "552",
    		height : "263"},
    	attr : {},
    	start : function() {
    		swfobject.embedSWF("<?php bloginfo('url'); ?>/wp-content/plugins/nextgen-gallery/imagerotator.swf", "sbsl3_1", "552", "263", "7.0.0", false, this.flashvars, this.params , this.attr );
    	}
    }
    sbsl3_1.start();
    //]]>
    -->
    </script>

    Of course, all the variables can be set accordingly to achieve different things… but this basically sums it up and works perfectly in the most recent published versions of WordPress (2.6.3) and NextGen (0.99.1).

    Thanks again for a quick reply and a great plugin Alex! Maybe this code snippet can be put on your sample pages. Have a great week.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: NextGEN Gallery] Manually coded slideshow not working upon upgrade’ is closed to new replies.