Vanilla 2
Discussions
Activity
Sign In
WP-prettyphoto support
Fix for loading SWF in lightbox without width and height parameters in href
constantijn
February 2010
Here is the changed code to insert flash files without giving the extra href parameters.
filename: jquery.prettyPhoto.js v2.5.6a, linenr. 269
case 'flash':
correctSizes = _fitToViewport(movie_width,movie_height); // Fit item to viewport
flash_vars = images[setPosition];
flash_vars = flash_vars.substring(images[setPosition].indexOf('flashvars') + 10,images[setPosition].length);
filename = images[setPosition];
/**
* WarmStal 11-02-2009: fix for missing width/height (missing?)
*/
pos = filename.indexOf('?');
if(pos != -1){
filename = filename.substring(0,pos);
}
toInject = settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
break;
seamonsta
March 2010
I spent about 5 hours banging my head on the wall. The flash kept loading with a question mark and half of the file path. Your code fixed it.
Thank you thank you thank you!
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
2,645
General
305
Showoff your stuff!
8
prettyComments support
7
prettySociable support
43
WP-prettyphoto support
180
prettyCheckboxes support
40
prettyGallery support
74
prettyMobile support
34
prettyPhoto support
1,937
prettyLoader support
12
INK - Support forum
5
Powered by Vanilla