Page 1 of 1

Changing Lightbox Color

Posted: Sun Apr 01, 2007 6:49 pm
by Icenor
Im currently useing Lightbox v2.02 to display images in my articles. But at some point something happend to the color of the thumbpicture's frame and now its barely visible.

If you look at this article, you can almost make it out:
http://www.gopilot.org/index.php?/archi ... eg-na.html

What do I need to edit to change the color back this the grayish it used to be?

My second problem is the Lightbox v2.02's linking pictures/image set function.

If you look at this page and press one of the Image Set pictures, you'll see that you can look through the 4 images in the same frame.
http://www.huddletogether.com/projects/lightbox2/

I'w tried to add rel="lightbox[SOMETHING]" to the images codes, but it dosn't work.

Any help would be greatly appreciated :wink:

Re: Changing Lightbox Color

Posted: Mon Apr 02, 2007 9:52 am
by garvinhicking
Hi!

About the border color, I can't really see what you mean. All borders look properly to me in both Firefox 1.5.0.10 and IE7...?

Your second problem about rel="lightbox[something]" is a bit more complicated.

The lightbox event plugin makes sure that every <img> element inside an <a href></a> automatically gets a "rel=lightbox" added to it. This is made so that novice users do not need to manually add it to their links.

Now since you are an advanced user, this automatic "rel=lightbox" disturbts your advanced functionality. The first 'rel=lightbox' overrides your custom "rel=lightbox[something]" line, because it comes first in the element. check your HTML source and you'll see two rel=lightbox lines there, and the browser ignores any second declaration of it.

Now there are two options you can choose to fix that behaviour:

1. You configure the lightbox plugin to NOT do any automatic replacement anymore. In its configuration just set all markup transformation sources (Body, comment, ...) to "NO". Of course this also means you will need to add "rel='lightbox'" manually to every image/link, since the plugin will no longer make that automatically.

Pro: You can do it easily
Con: You loose automatic addition

2. You upgrade the lightbox plugin's used regular expression codes and tweak them in a way, that automatic addition is only done if no 'rel=lightbox' already exists inside the HTML element

Pro: Most flexible, you have automatic and manual control
Con: You need to know regular expressions and PHP to edit the plugin

Sadly this regular expression thing is currently a bit outside of my scope, so I can't really offer free help on this, as it gets a bit complicated, and the plugins goal was more to deliver automatic addition than to offer manual editing. :(

HTH,
Garvin