Textpattern Forum

You are not logged in. Register | Login | Help

#461 2008-04-16 04:22:27

masa
Member
From: Reykjavik, Iceland
Registered: 2005-11-25
Posts: 1,079

Re: smd_slimbox

You’re using rel="lightbox-smd" – have you tried rel="lightbox" instead?

I’m not familiar with slimbox, but as far as I recall it’s a drop in replacement for the original lightbox script and doesn’t require you to change the rel attribute.

There also appears to be a slight glitch in your css, although I don’t think that would have any effect:

.img_gallery {
	padding: 5px px 0px 3px;
}

There’s a missing numeric value for the 2nd px.

Last edited by masa (2008-04-16 04:22:51)

Offline

#462 2008-04-16 07:59:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_slimbox

sign wrote:

the links generated by this plugin, must appear, always, as thumbnails, right?

Yes, that is correct, I’m afraid. I have not yet implemented the text link directly. It can be simulated with some trickery (i.e. making sure the first image in your gallery has no thumbnail, so the Alt Text will be displayed instead and using CSS to “hide” the remaining images). It’s not pretty but it will work.

Alternatively, try smd_gallery instead, since that can do it natively with the text and thumblimit options.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#463 2008-04-16 08:13:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_slimbox

johnnyxcocktail wrote:

I’ve been trying to run the plug in on my site, but for some reason the slimbox doesn’t work. It displays the thumbnails, but won’t go to lightbox/slimbox mode.

That is totally weird. The usual thing to happen when slimbox doesn’t fire is that all you get is just the full image displayed in the browser. But you’re not getting anything at all; it’s like something on your page is “ignoring” the image anchor tags. Surreal.

As you say, everything’s linked fine (you are aware you’re using an old version of slimbox, yes? He’s up to 1.4.1 now) and I assume you have the latest mootools installed with all the required modules, as detailed on Christophe’s page there. The generated HTML looks fine to me [btw, masa, the -smd on the end won’t affect the plugin operation. It is the default indicator that can be changed if you want to “group” lightboxed images. Christophe uses square brackets but the validator complains so I changed it to a hyphen].

I’m really stumped with this one. Try commenting out the javascript calls (<txp:hide> is just brilliant!) and see what happens when you then click a thumbnail. If it appears on its own in the page then something in the plugin is causing your anchors to be ignored. I can’t see anything else on the page hijacking the anchors.

Then check the mootools modules and that you have the latest versions of the scripts (including slimbox v0.3 and smd_lib v0.32) and use that. If that doesn’t work, ummm, shout again with your findigns and I’ll see if we can figure out what’s going on.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#464 2008-04-16 11:23:43

johnnyxcocktail
New Member
Registered: 2008-04-15
Posts: 3

Re: smd_slimbox

Already thanks for the info… Great!

I didn’t have the right mootools modules installed, but still it’s not working. What I did find out is that it’s not the plug in or links that cause the mistake, but that something else on the page has to keep this from working.

If you see this page, where I inserted the line of code with a more basic page setup… it does what it’s supposed to do.
http://www.zendermusic.be/_index.php?s=Live
Yet on the other page lay out, it doesn’t
http://www.zendermusic.be/_index.php

I’m still looking and I will try to see if I can do that txp:hide thing.

Offline

#465 2008-04-16 11:39:19

johnnyxcocktail
New Member
Registered: 2008-04-15
Posts: 3

Re: smd_slimbox

Well,

I found the problem!!! Looks like it worked after all, but you just couldn’t see it was working because the lightbox was appearing under mij background div.
I’ve set the Z-index of my content layers and background to 0, so now it works.

Another mystery solved!
Adding to this… is there a place where you can change the Z-index of the lightbox?

Offline

#466 2008-04-16 11:54:13

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: smd_slimbox

have a look at the link of the mootools JS file. the version number changed. maybe this solves the problem

whoops … caching problem … problem already solved :)

Last edited by markusfalk (2008-04-16 11:57:31)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#467 2008-04-16 13:00:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_slimbox

johnnyxcocktail wrote:

you just couldn’t see it was working because the lightbox was appearing under mij background div.

D’oh! Well spotted. Glad it’s working now.

is there a place where you can change the Z-index of the lightbox?

Try editing slimbox.css and adding a higher z-index to the first two rules, namely #lbOverlay and #lbCenter, #lbBottomContainer. That’s worked for me in the past.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#468 2008-04-16 13:27:06

sign
New Member
Registered: 2008-03-11
Posts: 2

Re: smd_slimbox

Thanks Bloke for the answer, but… I think I’m not looking in the right place for my problem.

I read about smd_gallery, but that plugin does much more that I want and need for now… I’ll use it when I build my gallery.

But, for now, all I want is a plugin that generates this:

<a href=“image url” rel=“lightbox”>some text</a>

And, when clicked, uses lightbox to display the image;

Maybe based on something like: <txp:plugin imageid=“number” text=“some text”/> or <txp:plugin imageid=“number” rel=“lightbox”>some text</txp:plugin>

I dont know if this the right place to put the question, but, does anyone know how to do this easily?

Thanks all.
André

Last edited by sign (2008-04-16 13:36:05)

Offline

#469 2008-04-16 13:46:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_slimbox

sign wrote:

for now, all I want is a plugin that generates this: <a href=“image url” rel=“lightbox”>some text</a> And, when clicked, uses lightbox to display the image

You are right that smd_slimbox and smd_gallery tend to only be of use if you are building galleries with more than one image. If you are requiring something that simple with only one image, you may not even need a plugin at all.

Imagine you had an Article Image associated with an Article and you wanted it to be viewed in a slimbox effect. In a form (or even in the article itself) you can put something like:

bc. <a rel=“lightbox” href=”<txp:article_image />”>Some text</a>

I’ve not tested it but that should work as long as you include the required lightbox javascript/css on your page. If you want to use a fixed image id, then use <txp:image id="number" /> in place of the article_image above.

If those examples don’t help, you could try looking at the upm_image plugin; that may well do what you want.

EDIT: d’oh, forget that stuff about txp:article_image and txp:image; they output full <img src="image.jpg"> tags. I thought they could be told to just output a raw URL like the txp:css tag can. Sorry. Looks like upm_image is the way to go.

Last edited by Bloke (2008-04-16 13:51:48)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#470 2008-04-16 17:43:16

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: smd_slimbox

sign wrote:

But, for now, all I want is a plugin that generates this:

<a href=“image url” rel=“lightbox”>some text</a>

And, when clicked, uses lightbox to display the image;

I’ve done precisely that by applying this fairly straightforward code hack and then (using standard Textile link syntax plus the extra attribute in square brackets provided by the hack):

"This is a great picture[lightbox]":http://farm4.static.flickr.com/agreatpicture.jpg

instead of:

"This is a great picture[external]":http://farm4.static.flickr.com/agreatpicture.jpg (which would generate the separate new browser window).

Couldn’t somebody turn the hack into a plugin, please???

Last edited by keith (2008-04-16 17:46:21)


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

Board footer

Powered by FluxBB