I have rel="lightbox[post-123]". How to customize fluidbox-custom.js?
I don't know how to also include the post-id after "lightbox".. Could you help me out here?
On the post edit page, part of the URL will be "post=xxx", where xxx is the post ID. Alternatively, you don't have to include the post ID at all. simply having rel=lightbox will work, too.
I understand that i only would need rel=lightbox.
But i have a plugin that adds 'rel=lightbox[post-xxx]'. They say it's to navigate thru all images of the post. I also understand that.
Just to get this right, fluidbox can navigate thru all images with just having rel=lightbox? Than, it seems like i don't need the plugin to add the post-id.
But than i don't know how to add the rel=lightbox (without id). Thats why i thought to maybe let the fluidbox-custom.js search for the [id] too.
Hope i'm not bothering you too much. Really appreciate that you're taking the time!
Added this to my functions.php:
add_filter('the_content', 'addlightboxrel', 12); add_filter('get_comment_text', 'addlightboxrel'); function addlightboxrel ($content) { global $post; $pattern = "/<a(.*?)href=('|\")([^>]*).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>(.*?)<\/a>/i"; $replacement = '<a$1href=$2$3.$4$5 rel="lightbox"$6>$7</a>'; $content = preg_replace($pattern, $replacement, $content); return $content; }
That adds just a rel=lightbox as you can see here:

fluidbox-custom.php looks like this:
jQuery(document).ready(function(){ jQuery('a[rel^="lightbox"]').fluidbox(); });
But still doesn't show up. I still get linked to the image in a new tab.