Textpattern Forum

You are not logged in. Register | Login | Help

#581 2009-02-22 07:55:13

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Hello, I’m having the hardest time implementing thickbox into smd_slimbox.

The slimbox works, just fine as it pulls my imageid from textpattern and displays the thumbnail but I have no idea what to do to get it to fire inside of thickbox.

When I use thickbox outside of smd_slimbox, it works just fine.
I’m just messing around with my latest post at www.omgchris.com. If you’ll notice, the first 2 images are called on using smd_slimbox but they open in the browser. At the very bottom of that first post is a <a> tag that tells that particular image to open in thickbox, which it does perfectly.

What bit of code am I missing from slimbox to get it to open my images in thickbox? I’m read through this entire thread and tried what seemed relevant to my situation but I’m still getting no luck :(

Offline

#582 2009-02-22 12:34:24

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

Re: smd_slimbox

Well I noticed this at the top of your home page, Chris:

tag_error <txp:smd_slimbox imageid="412" class=“thickbox”/> ->  Textpattern Notice: Unknown tag attribute: class  on line 605

“Class” isn’t a supported attribute in smd_slimbox.

Stef’s help files that come with his plugins are really exemplary, so I would suggest checking those out and maybe starting by using some of the examples he kindly provides.

Conversely, just try:

<txp:smd_slimbox imageid="412" />

Last edited by keith (2009-02-22 12:36:26)


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#583 2009-02-22 17:02:58

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Yeah, I was a bit confused with the class tag. I have removed it but still nothing. No Tag Error but also no thickbox.

Are you speaking of the help files on his site? Like this here?

I did look through that but I’ll scour it even more closely and try and see if I can come across anything. I’m just confused as how to tell smd_slimbox to use thickbox

I think is is where I got confused with the class tag
Some libraries (e.g. Thickbox) simply require an additional class to be set on the image tags.

Last edited by OMGChris (2009-02-22 17:20:28)

Offline

#584 2009-02-22 17:41:26

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

Re: smd_slimbox

OMGChris wrote:

with the class tag. I have removed it but still nothing. No Tag Error but also no thickbox.

My help info isn’t too clear about how to employ thickbox. Try imgclass="thickbox" or linkclass="thickbox" (I forget where thickbox requires the class to be applied; either in the image tag or the anchor —- the thickbox docs tell you). One of those two attributes will set the class= HTML attribute in the correct place so thickbox will see the images.

Last edited by Bloke (2009-02-22 17:43:29)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#585 2009-02-22 18:13:30

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Bloke wrote:

Try imgclass="thickbox" or linkclass="thickbox" (I forget where thickbox requires the class to be applied; either in the image tag or the anchor —- the thickbox docs tell you). One of those two attributes will set the class= HTML attribute in the correct place so thickbox will see the images.

Sorry I’m so clueless, Bloke, but I’m still confused. I used to just use the default slimbox lightbox but just recently I needed a lightbox that could display iframed content (hence thickbox)

Where exactly does imglcass= "thickbox" or linkclass="thickbox" need to be placed?

would I need to edit all of my existing posts containing <txp:smd_slimbox imageid= "xxx"/> or does the linkclass/imgclass go somewhere in slimbox’s or thickbox’s JScript?

Sorry if I’m making this harder than it needs to be :|

Last edited by OMGChris (2009-02-22 18:16:08)

Offline

#586 2009-02-22 18:17:58

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

Re: smd_slimbox

OMGChris wrote:

would I need to edit all of my existing posts containing <txp:smd_slimbox imageid= "xxx"/>

Yes, it’s an attribute to the smd_slimbox tag. Try it on one tag first to find which attribute works :-)

BTW, I think I sent you mail earlier.

Last edited by Bloke (2009-02-22 18:18:27)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#587 2009-02-22 18:52:42

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Yes, you did send me mail earlier. I have been messing with different lightboxes pretty much the whole weekend.

I am, however, one step closer, thanks to you. If I do my tag like this: <txp:smd_slimbox imageid="412" linkclass= "thickbox"/>

It tries to fire the image in thickbox. I get the loading bar but nothing else happens after that. The activity in my browser says “done”

Offline

#588 2009-02-22 19:14:16

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

Re: smd_slimbox

OMGChris wrote:

<txp:smd_slimbox imageid="412" linkclass= "thickbox"/> … I get the loading bar but nothing else happens after that.

Freaky. Works for me on my test server but clearly not on your site. According to Firebug the thickbox script is not trying to GET image 412.jpg from the server. It just shows the loading bar and then goes no further. Looking at the HTML source code, the plugin appears to be doing everything that thickbox asks, i.e:

  • Create a link element (<a href>)
  • Give the link a class attribute with a value of “thickbox” (class=“thickbox”)
  • Provide a path in the href attribute to an image file (.jpg .jpeg .png .gif .bmp)

So quite why it is not doing the next bit is a mystery. You are including thickbox.js and jquery.js twice on the page, but I doubt that’s it. Hmmmmmmm.

Last edited by Bloke (2009-02-22 19:14:42)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#589 2009-02-22 19:27:08

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Just for good measure, I removed the double instances of the thickbox and jquery jscript files (didn’t realize that I has called on them twice) but, as you predicted, that’s not it.

The image all the way at the bottom of the post (300.jpg) still works no problem but that’s still just using a <a> instead of a <txp:smd_slimbox />

you said using this method worked fine on your test server?

Offline

#590 2009-02-22 19:31:15

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

Re: smd_slimbox

OMGChris wrote:

The image all the way at the bottom of the post (300.jpg) still works no problem but that’s still just using a <a> instead of a <txp:smd_slimbox />

Ah, hover over the two links. See the difference? The Nu image is www.omgchris.com and the one generated by Slimbox is omgchris.com (which is taken from your Admin->Preferences->Site URL). I bet thickbox is borking because it thinks the domain is different. Change your site pref to www.omgchris.com and try again.

Last edited by Bloke (2009-02-22 19:31:39)


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

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB