Putting js before </body> is more of a recommendation. To patch up the plugin like this might IMHO not be necessary, we could simply add it here:
Code: Select all
// prettyPhoto code
elseif ($type == 'prettyPhoto') {
echo '<script type="text/javascript">var prettyphoto_path = "' . $pluginDir . '/prettyphoto";</script>' . "\n";
echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery-1.4.4.min.js"></script>' . "\n";
echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery.prettyPhoto.js"></script>' . "\n";
echo '<link rel="stylesheet" type="text/css" href="' . $pluginDir. '/prettyphoto/css/prettyPhoto.css" />' . "\n";
echo '<script type="text/javascript" charset="utf-8">$(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto();});</script>' . "\n";
Now you mentioned files were missing frmo the lightbox-prettyphoto thing. Which ones exactly? Then we can put all of this in a new version of the plugin.
Regards,
Garvin