Recent Topics

1 Aug 11, 2008 07:33    

This plugin deserves it's own thread ;)


I upgraded the plugin to the most recent revision 801 and it doesn't work. The plugin is enabled and I see the code in head section, but images don't open in lightbox.
Avatars or other jQuery plugins ain't installed.

The latest working revision for me is 719

2 Aug 11, 2008 15:02

Correct, that's why the latest version isn't released (yet).
I want to group every image in a post to be shown in a slideshow. At the moment every image shows as a single entity.
With the 801 version I had some troubles at the debugging stage. The problem was it didn't run as well in every skin. In fact it only worked on the Simple Zen skin and with a few adjustments on some more skins.
See the multiple image slideshow in action in [url=]this page in my dev blog[/url] that has both posts with one and with more than one image.

Good luck

3 Aug 11, 2008 15:44

The problem lies in the DOM for each post. Your skin (top of each post) looks like:

            <div class="block_item_wrap">
              <div id="item_19" class="bPost bPostpublished" lang="en-US">
                                <div class="fieldset_title">
                  <div class="fieldset_title_right">
                    <div class="fieldset_title_bg">

                      <h3 class="bTitle">

The Simple Zen looks like:

		<div class="post postpublished" lang="en-UK">

		<a id="item_225"></a>				<h2 class="evo_post_title"><a href="">Google Earth 4.3</a></h2>
<div class="bText">

When I started this idea it seemed logical to use the id="item_xx" to be added as unique ID to the lightbox. I reasoned it possible to get to it, but as you can see there isn't an element (tag) equal to get started.
I decided to start with the title. There must be a h1 or h2 block in every post. I discarded h3 because a) I should start using h3 inside a post if I needed a subheader and b) the sidebar is full of h3's.
But the 801 version should work if you add the tag of your title in the starting query at line 103:

var postDiv = jQuery(\'h2.evo_post_title, h1.evo_post_title, h3.bTitle, h2, h1\').parent(\'div\').attr(\'class\');

I'm still thinking of a clever way to get around this.

Good luck

Still doesn't work with the B2evo_ru skin. Something like this should:

var postDiv = 'bPost bPostpublished'


4 Aug 11, 2008 15:51

It sounds easy, let me try you suggestion...


5 Aug 11, 2008 15:58

I think I need to get started with the lang attribute. The existence of that one is the only item I can be reasonable certain of. This is a flaw in the skinning system.

6 Aug 11, 2008 16:09

I'll better wait for the next release :)

Thanks again

7 Aug 11, 2008 18:19

Afwas wrote:

I think I need to get started with the lang attribute. The existence of that one is the only item I can be reasonable certain of. This is a flaw in the skinning system.

Um... nope on both counts. Not all skins had and will have the lang attribute, though there is no reason to not have it. Also this is NOT a flaw in the skinning system. It is something you've not found a way to work with, but FLEXIBILITY is NOT a flaw.

8 Aug 11, 2008 18:34

Flexibility *is* a flaw if it prevents me from doing something cross-skin. This is not about flexibility but about convention. Do you need to call that div 'bPost' in stead of 'post' or vice versa for *any* reason? In fact everything you code / change in a skin is a convention.
Marking the start of a post would in *no way whatsoever - ever* limit your creativity.

I have two skins lying around gathering dust because I don't know what to do with them. Being very smart I adopted the skintags from the original WP skin and changed the _main.index.php file accordingly. Those skins are horror to everybody who would like to change something. Do you find this 'flexible' and therefore 'allowed practice'?


9 Aug 11, 2008 19:13

Looking at it from another angle this line shoiuld work. At least it does in both Simple Zen and in B2evo_ru:

103  var postDiv = jQuery(\'.image_block\').parents(\'div\').find(\'*[@class*="ostpublished"]\').attr(\'class\');

Lovely phpBB discards the backslash (\) before the first single quote (') so think about that.
It looks for 'ostpublished' finding both 'postpublished' and 'bPostpublished'.

11 Aug 11, 2008 19:53

Hi ¥åßßå

I'd love to see something like that a post wrapper, like .bPost at the very start of every individual post.
If .bText is added by the core (and I believe it is) and for that matter is available in all skins it would suit my needs.


12 Aug 11, 2008 22:28

"Convention" is fine until someone selects or creates a perfectly suitable and workable skin, uses a plugin that depends on this 'convention', then wonders what's wrong.

inc/items/views/_item_list_full.view.php forces <div class="bText"> into each post, but I think that is only for back office viewing. I'm pretty sure you can't bet on that bit being in every public-side skin though.

13 Aug 11, 2008 22:41

bText is in one of the skin templates that seldom gets altered.

14 Aug 13, 2008 15:48

Ideally the syntax for grouping images would be the same as the original lightbox 2. i.e. <a href="http://image/url" rel="lightbox[groupname]">...</a>

15 Aug 14, 2008 02:59

Hi IanLewis:

That's an easy change. The output is now:

<div class="image_block"><a class="external" target="_blank" rel="lightbox[item_228]" href="" title=""><img src="" alt="" title="" width="466" height="300"></a></div>

Where item_228 is still related to the post.

Committed to SVN as #806 at
Will release shortly but first I'll have a go at the Balupton Lightbox part of it.

16 Aug 14, 2008 04:45

As long as the <div class="image_block"> isn't necessary and the jQuery selector modifies or matches a simple <a href="img.url" rel="lightbox[group]">...</a> anchor I'll be happy.

The point of this was to be able to match

<div class="image_block"><img src="..."/></div>

for images from the media dir added by the files dialog


<a href="img.url" rel="lightbox[group]"><img src="..."/></a>

for legacy lightbox_plugin images

I'm guessing based on the code and your reply that it does some DOM modification (replacing rel attributes) before it does the matching to see which images to show with lightbox? I'm not sure why adding the rel is necessary as it will already be there for users switching from the lightbox_plugin with legacy posts. Am I missing how it's working? I have to admit I haven't tried it out yet.

17 Aug 14, 2008 04:57

Hi Ian,

Thanks for the explanation. Makes some sense now. What you are suggesting is -also- easy. I'll make it check for the existance of a rel="lightbox[lightbox]" before adding one. Needs some more alterations and it's getting late so expect a reply tomorrow.

Have fun

19 Aug 14, 2008 08:04

I'll test it out tonight. Thanks,

20 Aug 14, 2008 19:17

For whatever reason I couldn't get the plugin to work. I pulled the latest version from SVN and none of the images I tried worked. I even tried images I included from the media dir like <div class="image_block"><img src="..."/></div> but no links were created and no lightbox. I tried a couple skins including Simple Zen which I'm using on my own website.

21 Aug 27, 2008 03:04

Hi Ian,

Sorry but I forgot to reply to your post.
I'd need to see a blog with the plugin enabled to see what goes wrong. I've got some Console debug (BugZilla) that may help me point the problem.

Can you enable the plugin for me at a time I can have a look atit?

Good luck

22 Aug 27, 2008 03:44


I was testing it on a local install of b2evolution. I try not to update my server with stuff like that. I'll try to take a look at it with Firebug myself when I get a chance.


23 Nov 14, 2008 14:31

Is the 807 version on sourceforge still the most recent one? I'm running 2.4.5 and have found that it only works in browsers based on WebKit. It seems like the onLoad javascript call that goes around and sets up the lightboxes only fires when Safari, OmniWeb, etc. render the page.

Here is a link to my site: That has a bunch of other plugins installed as well; just to elminate them as a source of error, I set up a fresh install of b2 on my local machine with only one additional plugin - jQuery lightbox. Still, I receive the same results; lightbox only renders in webkit browsers.


24 Feb 25, 2009 05:01

tselliott wrote:

I'm running 2.4.5 and have found that it only works in browsers based on WebKit. It seems like the onLoad javascript call that goes around and sets up the lightboxes only fires when Safari, OmniWeb, etc. render the page.

Well, time has passed and I finally figured this out. I had given up on it initially, then just today when I was testing some recent changes I made in Internet Explorer, I noticed the little icon in the lower right telling me I had an error. Feeling adventurous, I clicked on it. Following are the changes I made as a result of that tell-tale error:

Note, these changes were all made to the 807 version of the lightbox plugin in the _jquery_lightbox.plugin.php file.

1- At the end of line 138, there is an extra comma. Remove it.
2- Lines 149 and 150 are duplicates. Remove one of them.
3- Search throughout the entire file for the term console. Comment or delete every line that has something to do with this term. For me, that was lines: 104-110, 115, 121, 132, 133.

With these changes in place, the jquery lightbox plugin will work as expected in all major browsers. Hurray, now non-WebKit folk can view pictures of my kid too.

As far as I understand it, the extra comma (note 1) and the duplicate line (note 2) are bugs. The console (note 3) would be a non-issue if firebug were available. For the majority of visitors, though, this is likely to not be the case.

Thanks for such a great plugin [url=] Afwas[/url]!

25 Mar 03, 2009 15:04

Hi tselliott,

Thanks for the help.
Unfortunately there are more bugs. Notably:
jQuery Documentation wrote:

Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.

That will affect one line in th Balupton edition.

For one reason or another the standard edition refused to work under jQuery 1.3.1. Haven't found a cure for that one yet. I did find a third lightbox that seems to be maintained more carefully. When I have that one integrated I will release a bugfree version. Hopefully around this weekend.

26 Mar 04, 2009 06:51

Thanks. Can't wait to get my hands on it.

If you're looking at the code anyway, can I throw in a feature request?

Right now you take the title attribute of an image and use that for the lightbox caption. I've taken to using character entity &#13 ; to fake a line break for those browsers that make tooltips out of an image's title. Would it be possible for you to check for the presence of &#13 ; and change it into <br /> or something similar to preserve the line break in the lightbox caption?

Note: I put a space between &#13 and the ; because phpBB kept putting in a linebreak character.

27 Sep 21, 2009 20:52

Hi Afwas, Did you succeed? i'm curious ;-)

28 Oct 17, 2009 16:01

I could not find a lightbox plugin that worked with gallery 2 images, so I wrote one. It only displays one image at a time, but it is a start and works on Firefox 3 and IE 6. All I need for the time being is something that works. I will be using it on my own sites and updating it as I go along.
If you want to try it out, here it is.

Form is loading...