DefProc
Forum Replies Created
-
Forum: Plugins
In reply to: [add-rel-lightbox] This plugun doesn't workThis plugin will only add rel=”lightbox” to images from your media library. If you add it manually, it will not change those links.
If you have added rel=”lightbox” to an image link, but there’s no popup when you click it, do you have a lightbox/slimbox plugin installed on your site? This plugin only automates adding the effect, but doesn’t add the lightbox javascript — you’ll need to do that separately.
Forum: Plugins
In reply to: [add-rel-lightbox] Multiple imagesOn the main page of the site you link, add-rel-lightbox is doing what I’d expect. If I click on any of the images, there’s a “prev”/”next” overlay when you move the mouse to the left or right side of an image respectively.
It’s not possible to automatically show the images simultaneously in add-rel-lightbox, you’d have to create a composite image or a page and add
rel=lightbox
as a link attribute.Are you thinking of having a set of images pop up in the lightbox like is shown on the main page so you can click each one to make it larger again? It’s not normally best practice to show pages inside pages on websites, it makes them more difficult to navigate (as a link doesn’t change the page) and makes them less readable and searchable by hiding content.
Does that help?
Forum: Plugins
In reply to: [add-rel-lightbox] Multiple imagesAssuming all the images have been uploaded and selected usign the add media dialog; all of the images that are visible in each post are automatically assigned to the same gallery. You can go through the gallery by clicking the forward and backward buttons in slimbox.
Is this what you mean?
Forum: Plugins
In reply to: [add-rel-lightbox] slimbox2 featured image supportThe usual reasons for lightbox failing are :
1. Malformed html on the page. Lightbox will need a link wrapped image with an image target (add-rel-lightbox checks for the file suffix) to work as expected.
2. The lightbox attribute is not correctly applied.
3. Lightbox is not loaded on the page.From a quick look at the_post_thumbnail page you could add the lightbox attribute in post.php (and add-rel-lightbox will ignore this link when it parses):
<?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" rel="lightbox" >'; the_post_thumbnail('thumbnail'); echo '</a>'; } ?>
Does that help?
Forum: Plugins
In reply to: [add-rel-lightbox] slimbox2 featured image supportIt adds rel=”lightbox” when the page is rendered, so it should be one of the last things to happen.
Do you have an example page or some code that I could see so I understand what you’re attempting? (email [email protected] if you’d rather it be private)
Forum: Plugins
In reply to: [add-rel-lightbox] Not working in v3.5?@drain0: what form of the gallery shortcode are you using? If you use
[gallery]
then add-rel-lightbox won’t do anything because this returns a page address. Using[gallery link=file]
will ensure it gives the file address.For my installation, I’ve been using the Slimbox Plugin as all it really does is add the script tags to the page header (adding these to the theme is the best solution). Unfortunately it also contains the following lines that conflict with add-rel-lightbox, so I’m running a customised version without them.
function slimbox_create($content){ return preg_replace('/<a(.*?)href=(.*?) (jpg|jpeg|png|gif|bmp|ico)"(.*?)>/i', '<a$1href=$2.$3" $4 rel="lightbox[roadtrip]">', $content); } add_filter('the_content', 'slimbox_create', 12);
Forum: Plugins
In reply to: [add-rel-lightbox] Not working in v3.5?Thanks very much. Glad I could help. ??
Forum: Plugins
In reply to: [add-rel-lightbox] Not working in v3.5?I’ve tried adding images as normal from the media interface in WP3.5 — both singly and in galleries — and it’s all working for me. The plugin only changes the post/page content when the page is rendered for the visitor, no changes are made to the stored version of the post/page.
Do you still have a problem of the links not appearing as expected if add-rel-lightbox is disabled?
Do you have any other plugins that operate on the images? For instance, the Slimbox Plugin that I use has a basic
preg_replace()
for images that I have manually disabled to stop it interfering with add-rel-lightbox.Or do you have a page online that I can see the problem you’re having and see if I can see the fault? email to contact [at] def-proc.co.uk if you’d don’t want to post the link in this forum.
Does that help?
Forum: Plugins
In reply to: [add-rel-lightbox] Not working in v3.5?I hadn’t noticed the problem, as haven’t created any posts with images in 3.5 yet. It’s quite possible that the image attributes have been changed when the image is inserted (which won’t affect earlier posts) so I’ll have a look and see if I can see what’s happening.
Forum: Plugins
In reply to: [TweetUpdater] TweetUpdater and Forum RepliesAre you using something like bbPress? I haven’t used tweetupdater with any of the forum plugins, so I’ve no idea how they behave.
However, you can limit the types of posts that are in a certain category, or have a specific custom field/value pair.
From the TweetUpdater Options page, check “Limit Twitter updates using the rules below?” and select either:
- all of the categories that don’t relate to forum posts,
- or set a “Custom Field Title (key)” (i.e. “TweetIt”) and include that in any new post that you make to have it tweeted.
Does that help?
Ah that explains the problems I’ve been seeing with multiline code&pre tags being concatenated to one line!
Turns out it’s the Simple DOM Parser again. It defaults to auto-closing tags and will collapse multiline tags to do it. I’ve changed this behaviour for version 0.4.1 and that sorts it for me.
Does that help?
If you’ve got a
[gallery]
shortcode outside ofthe_content
, then you’ll need to add a filter to the plugin’s code that to pass it the page at the correct time. I don’t know which filter you’ll need (there’s a Filter reference in the codex) however, if you’re just coding it in one place, it might be easier to just embed the code from my plugin straight into your theme.Forum: Plugins
In reply to: [add-rel-lightbox] [Plugin: add-rel-lightbox] Warning preg_replaceYep, from a quick look, my best guess is that it’s the lack of the precision in the gallery regex. I can’t be sure without seeing the page content without add-rel-lightbox activated, to see if it has changed anything, but the gallery regex *shouldn’t* match for this page.
I think that instead of matching:
<a […]><img […]></a>
it’s actually matching:
<a […]></a> […] <img […]> […] <a […]></a>
and because the extra content has some unescaped
/
s in it, it’s breaking the/(pattern)/i
and adding a/c
inside the pattern. This is an example of why regexes are bad for parsing HTML and why the plugin hasn’t reached version 1 yet.I’ve changed to DOM parsing in version 0.4, so the see if an upgrade sorts it out.
Forum: Plugins
In reply to: [add-rel-lightbox] [Plugin: add-rel-lightbox] Disable GroupsAh, I see, from the instructions on the plugin page, lightbox plus works the opposite way to the ones I’ve seen so far. It seems to need the unique id to *stop* the grouping:
rel="lightbox[uniqueID|filename]"
how about
rel="lightbox[wp-image-' . $val[5] . ']"
in line 41 to use the image post id?Forum: Plugins
In reply to: [add-rel-lightbox] [Plugin: add-rel-lightbox] Disable GroupsThat seems less than ideal, what lightbox clone are you using? Some allow the gallery mode to set as default instead of the single mode.