Changing Lightbox Color

Creating and modifying plugins.
Post Reply
Icenor
Regular
Posts: 15
Joined: Wed Dec 06, 2006 7:42 am

Changing Lightbox Color

Post 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:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing Lightbox Color

Post 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
# 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/
Post Reply