• I really like the NextGen Polaroid plugin, but since NextGen was upgraded to use SWFObject V2, it doesn’t work.

    So… after a bit of research, I’ve managed to fix it… hopefully Alex can update his website with this…

    You need to replace the nggShowPolaroid function in nggpolaroid.php with the following code:

    function nggShowPolaroid($galleryID,$irWidth,$irHeight) {
    
    	global $wpdb;
    	$ngg_options = get_option('ngg_options');
    	$obj = 'so' . $galleryID;
    
    	if (empty($irWidth) ) $irWidth = $ngg_options['irWidth'];
    	if (empty($irHeight)) $irHeight = $ngg_options['irHeight'];
    
    	$replace  = "\n".'<div class="polaroid" id="ngg_polaroid'.$galleryID.'">';
    	$replace .= '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..
    </div>';
            $replace .= "\n\t".'<script type="text/javascript" defer="defer">';
    	if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'<!--';
    	if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'//<![CDATA[';
    	$replace .="\n\t\t".'var '. $obj .' = {';
    	$replace .="\n\t\t\t".'params : {';
    	$replace .="\n\t\t\t\t".'wmode : "opaque",';
    	$replace .="\n\t\t\t\t".'allowFullScreen : "true"},';
    	$replace .="\n\t\t\t".'flashvars : {';
    	$replace .="\n\t\t\t\t".'xmlURL : "'.NGGPOLAROID_URLPATH.'nggpolaroidXML.php?gid='.$galleryID.'"},';
    	$replace .="\n\t\t\t".'attr : {},';
    	$replace .="\n\t\t\t".'start : function() {';
    	$replace .="\n\t\t\t\t".'swfobject.embedSWF("'.NGGPOLAROID_URLPATH.'polaroid.swf","ngg_polaroid'.$galleryID.'", "'.$irWidth.'", "'.$irHeight.'", "7.0.0", false, this.flashvars, this.params, this.attr );';
            $replace .="\n\t\t".'}';
            $replace .="\n".'}';
            $replace .="\n".$obj.'.start();';
    	if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'//]]>';
    	if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'-->';
    	$replace .= "\n\t".'</script>';
    
    	return $replace;
    }
    
    } else {
    	add_action('admin_notices', create_function('', 'echo \'<div id="message" class="error fade"><strong>' . __('Sorry, NextGEN Gallery Polaroid works only in Combination with NextGEN Gallery',"nggallery") . '</strong>
    </div>\';'));
    }// End Check

    You can see it working at https://ignacioandneil.com/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thank you for the fix… Works great under NextGen 99.1 and WP 2.6.2

    Just wanted to thank you as well. This fix works great.

    I am running WordPress 2.8.4. I have installed NextGEN V1.0.2 and NextGEN Gallery Polaroid v1.0. NextGEN is working fine with my test default gallery.

    I have a requirement to create something like this ( https://www.no3dfx.com/polaroid/ ). NextGEN Gallery Polaroid indicates it can do very much similar (this is other case that I have to still see any working example).

    First I face NextGEN Gallery Polaroid needs GenNEXT installed error which I resolved by changing “nggallery” to “nggLoader” as suggested by other users of plugin. after that I am getting this error (“The Flash Player and a browser with Javascript support are needed..
    “) . Then I landed here. even after using above function I am getting same error. Any solution plz? or any alternative? Is there any other plugin out there so I can achieve same result.

    I can use original script also but it uses flickr ID or XML and I need to upload photos and use them via standard wordpress inputs e.g. via posts.

    Thanks in advance ??

    OK got it. I sm newbie and thought plugin (NextGEN) will include all required files. But its not including swfobject. I included that file manually and its boom. thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] Fix for Polaroid plugin’ is closed to new replies.