since we got ourselves an updated lightbox plugin I took the time to check for compatibility with shadowbox.
"Why another ABC123...box ?"
jquery Lightbox doesn't support videos.
Also it seems to add another layer on top of the image so users can't "Save as", which is a showstopper for me. (might be configurable via an option, didn't find anything via Google though)
Inline changes are bold, you'll get the position of the bigger block once you looked at the code in serendipity_event_lightbox.php.
$propbag->add('select_values', array('colorbox' => 'ColorBox', 'lightbox2jq' => 'Lightbox 2 jQuery', 'magnific' => 'Magnific-Popup', 'prettyPhoto' => 'prettyPhoto', 'shadowbox' => 'shadowbox'));
if ($type == 'lightbox2jq' || $type == 'shadowbox') {
// shadowbox code - http://www.shadowbox-js.com/usage.html - http://www.shadowbox-js.com/options.html
elseif ($type == 'shadowbox') {
echo ' <link rel="stylesheet" type="text/css" href="' . $pluginDir . '/shadowbox/shadowbox.css" />' . "\n";
if (!class_exists('serendipity_event_jquery') && !$serendipity['capabilities']['jquery']) {
echo ' <script type="text/javascript" src="' . $pluginDir . '/jquery-1.11.1.min.js" charset="utf-8"></script>' . "\n";
}
echo ' <script type="text/javascript" src="' . $pluginDir . '/shadowbox/shadowbox.js" charset="utf-8"></script>' . "\n";
echo ' <script type="text/javascript" charset="utf-8">Shadowbox.init({autoplayMovies: "false", continuous: true, counterType: "skip", handleOversize: "resize", overlayOpacity: "0.66"});</script>' . "\n";
}
###if ($type == 'lightbox2jq' || $type == 'shadowbox') {
is working because shadowbox has a compatibility check which makes it work just fine with "rel=lightbox" as it would with "rel=shadowbox".if ($type == 'lightbox2jq' || $type == 'shadowbox') {
Greetings
Oliver
PS: "Why didn't you simply do this via git ?"
The shadowbox license says I am not allowed to redistribute the code.