There is a function to show a galleria in lightbox so far.
Could you provide a function for http://drupal.org/project/shadowbox , too?
I tried to adapt this by hand with no success. the link is not displayed.
in function galleria_theme() I added:
'galleria_shadowbox_link' => array(
'arguments' => array('nid' => NULL),
),
and added this function:
function theme_galleria_shadowbox_link($nid, $width, $height, $text) {
if (!is_numeric($nid) || !is_numeric($width) || !is_numeric($height)) {
drupal_set_message(t('Invalid arguments passed to theme_galleria_shadowbox_link.'), 'error');
return;
}
if (!module_exists('shadowbox')) {
drupal_set_message(t('Please install the shadowbox module to enable this functionality'), 'error');
return;
}
$attribs = array(
'rel' => 'shadowbox',
);
return l($text, "galleria/$nid", array('attributes' => $attribs, 'html' => TRUE));
}
what did I miss?
Comments
Comment #1
maulwuff commentedsorry, these changes DO work. The link is shown now. Must have been a caching thing.
clicking the link creates the pure galleria, but shadowbox is not triggered, yet. I hope to get this working, too
Comment #2
maulwuff commentedfinally I got it working.
the function call should be:
it is important to add player=iframe to the rel attribute.
find a patch attached with all necessary changes
to create the link use the analogon to the lightbox one:
see an example for usage in #352081: Where to include theme function for lightbox #3
Comment #3
maulwuff commenteddrupal dropped the patch.
the patch is based on 6.x-1.0-beta1
Comment #4
Mark Theunissen commentedHi maulwuff
Thanks for the patch. Sorry to do this to you, but I have dropped iFrame support because it was the wrong, slow, bad way to get the galleria into a lightbox... :(
As of Beta 2 the galleria is returned as HTML and embedded in the lightbox. This is now really stable! :)
Could you have a look at Beta 2 and re-roll your patch please? I don't think anything will change except the parameters you pass to shadowbox (i.e. the player=iframe bit).
That's if you're still interested in incorporating this functionality in by default.
Comment #5
maulwuff commentedhi, yes i'll have a look at it
Comment #6
maulwuff commenteddoes lightbox work for you? it puts the thumbs to the lightbox and prints the big image to the normal page. but not visible as long as the lightbox is active.
with shadowbox I get a ul-list of images.
Comment #7
Mark Theunissen commentedAnything further on this patch? Lightbox works well in my testing.
Comment #8
maulwuff commentedsorry, got no clue what may be wrong
Comment #9
Mark Theunissen commented