Suggestion (more a plea..) for the Lightbox plugin
Suggestion (more a plea..) for the Lightbox plugin
Hey guys,
I'm using the Lightbox plugin to post some images in a Gallery-like manner and I'm starting to miss the rel='lightbox[groupname]' feature.
I've tried adding that bit by hand, and it's grouping the images, but it still spits out a second rel='lightbox' which probably will break something somewhere at some point.
Would it be easy to edit the plugin to have it add [groupname] automatically? I tried adding that in a single-image entry and the arrows wouldn't appear, so that would work fine for me.
And a following question, could I somehow use the name of the entry as the group (or something equally diversing)? So that they don't 'all' group together, only from the same entry.
I tried editing serendipity_event_lightbox.php, but realised, as it's .php, that I couldn't just insert the smarty tags to include the entry title.
Any help would be appreciated. (And rewarded with e-cookies!)
I'm using the Lightbox plugin to post some images in a Gallery-like manner and I'm starting to miss the rel='lightbox[groupname]' feature.
I've tried adding that bit by hand, and it's grouping the images, but it still spits out a second rel='lightbox' which probably will break something somewhere at some point.
Would it be easy to edit the plugin to have it add [groupname] automatically? I tried adding that in a single-image entry and the arrows wouldn't appear, so that would work fine for me.
And a following question, could I somehow use the name of the entry as the group (or something equally diversing)? So that they don't 'all' group together, only from the same entry.
I tried editing serendipity_event_lightbox.php, but realised, as it's .php, that I couldn't just insert the smarty tags to include the entry title.
Any help would be appreciated. (And rewarded with e-cookies!)
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Usually, $eventData should be available within the entry plugin hook to be used in PHP code...
Regards,
Garvin
Usually, $eventData should be available within the entry plugin hook to be used in PHP code...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Thanks for the reply Garvin! unfortunately I don't know where to begin, or what to do.
I did a search, and found this function in the above mentioned file:and below that This is where I'm stuck. I don't know what to add to rel=$3lightbox$3 to group it individually for entries, as smarty won't work. My PHP skills don't go much further than your average 'Hello World'...
I did a search, and found this function in the above mentioned file:
Code: Select all
function event_hook($event, &$bag, &$eventData) {
Code: Select all
if ($regex == null) {
if ($type == 'lightbox' || $type == 'lightbox_plus' || $type == 'lightbox2') {
$regex = '/<a([^>]+)(href=(["\'])[^"\']*\.(jpe?g|gif|png)["\'])/i';
$sub = '<a $1 rel=$3lightbox$3 $2';
} elseif ($type == 'thickbox') {
~ code stripped ~
}
}
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Sadly I don't use the lightbox plugin, so I am also not familiar with the code, and currently have no time to look into this.
Best regards,
Garvin
Sadly I don't use the lightbox plugin, so I am also not familiar with the code, and currently have no time to look into this.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hm I don't see that. I'm using an older version of the plugin (had some troubles with the recent one). I'll see about fixing an updated version.DwB wrote:Mangek: try using "Gallery with photos of the entry" in the configuration of the plugin.
If I can do it from within the plugin that would be great.
Yep, encountering the same problem I had last time I tried the recent version. Take a look here. The script breaks, for some reason.
Edit: I want to use Lightbox 2, but that's what breaks. Lightbox 1 and Greybox won't load at all. Lightbox Plus and Thickbox both run, but they look ugly.. Could this be a setting on my host's end?
Edit: I want to use Lightbox 2, but that's what breaks. Lightbox 1 and Greybox won't load at all. Lightbox Plus and Thickbox both run, but they look ugly.. Could this be a setting on my host's end?
Ok, with a bit of hacking the versions together (adding the new serendipity_event_lightbox.php to the old install) I finally got it to work properly.
Don't know what's causing it not to work with a proper fresh install, but this will do.
Thanks for the help and suggestions, Garvin and DwB. Sent me on the right way.
Don't know what's causing it not to work with a proper fresh install, but this will do.
Thanks for the help and suggestions, Garvin and DwB. Sent me on the right way.
Re: Suggestion (more a plea..) for the Lightbox plugin
Anyone have new words on how to get lightbox2 to work? It sounds from what is written above I should try to get an earlier version of lightbox and then just add the serendipity_event_lightbox.php to it?
If this is the case, where would I find the earlier version of lightbox plugin?
I had a server error 500 yesterday and had to do a reinstall, lightbox2 now doesn't work. I have deleted and reinstalled twice.
Any help will be wonderful. Thanks.
The best,
~Ed587
If this is the case, where would I find the earlier version of lightbox plugin?
I had a server error 500 yesterday and had to do a reinstall, lightbox2 now doesn't work. I have deleted and reinstalled twice.
Any help will be wonderful. Thanks.
The best,
~Ed587
The best,
~Ed
~Ed
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Suggestion (more a plea..) for the Lightbox plugin
Hi ed587!
What's your URL of an entry that should contain a lightbox image?
Regards,
Garvin
What's your URL of an entry that should contain a lightbox image?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Suggestion (more a plea..) for the Lightbox plugin
Hello Garvin,garvinhicking wrote:Hi ed587!
What's your URL of an entry that should contain a lightbox image?
Regards,
Garvin
The first entry of the first page is one. http://www.neterm.net/serendipity
~Ed587
The best,
~Ed
~Ed
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Suggestion (more a plea..) for the Lightbox plugin
Hi!
When I call http://www.neterm.net/serendipity/plugi ... ototype.js I get a permission denied error. Is the path right? Check the file/directory permissions?!
Regards,
Garvin
When I call http://www.neterm.net/serendipity/plugi ... ototype.js I get a permission denied error. Is the path right? Check the file/directory permissions?!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/