Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » smd_slimbox

#361 2008-01-20 15:09:56

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

Re: smd_slimbox

is there a way to download the image that is shown via lightbox? a link list at the bottom of the galery or a link to the image within the lightbox container?


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

visit me at visiongraphix

Offline

#362 2008-01-20 15:19:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

markusfalk wrote:

is there a way to download the image that is shown via lightbox? a link list at the bottom of the galery or a link to the image within the lightbox container?

Good question. I’ve not found a method other than right-clicking the lightboxed image, choosing View Background Image and then saving it. Or alt-clicking the thumbnail on a PC which, although it fires up the lightbox, will also trigger a download in FireFox. Nether are particularly obvious or user friendly.

Not sure of the best way forward for this one. If it’s useful to you I could add an option to put a download link under the thumbnail?

Alternatively, the next revision might (as mentioned in my post above yours) be able to use ThickBox to achieve something similar, I’m not sure yet. If you have any ideas on a direction, then let me know and I’ll see what I can do.

Last edited by Bloke (2008-01-20 15:20:46)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#363 2008-01-20 15:38:42

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

Re: smd_slimbox

Bloke schrieb:

If it’s useful to you I could add an option to put a download link under the thumbnail?

very :-) and thanks for supporting this quickly


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

visit me at visiongraphix

Offline

#364 2008-01-20 18:59:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

OK, updated to offer the two most recent requested features.

  1. new attribute thumbtextwrap to add/remove an (X)HTML tag to the thumbtext that will help jodeci. It defaults to span so there will be no difference as far as anyone else is concerned
  2. new option for the imagecaption and thumbtext attributes: You can now specify ?url as a valid replacement. This allows you to add the image URL to the output, anywhere you like near the image (see below for an example)
  3. fixed the annoying requirement to have spaces around ‘?’ codes in imagecaption and thumbtext. You are now freeeeee!

So, to add a link like Markus wants, say, under the image thumbnail:

<txp:smd_slimbox thumbtext="below:&lt;a href='?url' alt='?alt' title='Click to view full-size image'&gt;Fullsize&lt;/a&gt;" />

In other words, an anchor tag with the URL replaced with the current image URL added below each thumbnail. Sorry about the icky meta-characters but there’s no way round it as TXP converts angle brackets in tags. “Downloading” the image in the true sense is not easy because of the MIME types so that’s the best we can strive for. Hope it’s of use.

The changes to the whitespace restrictions mean you can now do:

<txp:smd_slimbox thumbtext="below:?caption by ?author (?widthx?heightpx), above:?alt" />

and have it render the alt text above the image and something like “A hungry tiger by Stef (600×800px)” below the image. It plucks valid codes from within the text string wherever they occur, whitespace or not.

See how you get on and shout if you have any issues with v0.212

Note that the full help is back in the plugin but if anyone has any problems uploading the plugin due to “badly formed or empty plugin” messages, use the compresed version in the archive (smd_slimbox_v0.212_zip.txt)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#365 2008-01-21 15:31:15

jodeci
Member
From: Taipei
Registered: 2008-01-13
Posts: 38
Website

Re: smd_slimbox

Hi Bloke,

Forget what I said about linking to an article. Turns out I didn’t set the css/js path correct and did not appreciate smd_slimbox’s full power until moments ago! I was wondering what the javascript was supposed to do…stupid me. I should re-do my site more often to catch up on these flashy gadgets.

Oh, and thumbtextwrap works beautifully too, thanks!

Offline

#366 2008-01-21 16:02:29

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: smd_slimbox

Hi, I think useful, would be also the small addition of a class attribute to the anchors of the images.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#367 2008-01-21 16:40:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

marios wrote:

Hi, I think useful, would be also the small addition of a class attribute to the anchors of the images.

cellclass should do this but, imo, you don’t really need it if you wrap the whole tag in a div with a class (e.g. class="slimbox"). Because you can then use:

.slimbox img {// some CSS }

or

.slimbox a {// some CSS }

to get at what you want. Unless there’s something I’ve missed?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#368 2008-01-23 00:48:26

amoxycillin
New Member
From: australia
Registered: 2008-01-23
Posts: 2
Website

Re: smd_slimbox

This script seems so good, but i’m having trouble implementing it! (I’ve read the great majority of the 37 pages, so apologies in advance if something i’m doing wrong has already been pointed out :p )

As far as I can tell, it can find the javascript and css files, and i’ve installed the smd_lib plugin also (and obviously the smd_slimbox plugin) and the gallery is loading in the page correctly (grabbing the right images) but the lightbox doesn’t seem to be working.

I know it’s going to be something really stupid that i’ve missed… :p

anyway, here is the page antipopstars.com/botm/killstar

maybe another plugin is messing with it??

Offline

#369 2008-01-23 01:03:18

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: smd_slimbox

amoxycillin, where are the images that should use the plugin? As I can’t find any images that are linked to slimbox…

Cheers!

Offline

#370 2008-01-23 01:16:37

amoxycillin
New Member
From: australia
Registered: 2008-01-23
Posts: 2
Website

Re: smd_slimbox

ok. so herein must lie the problem…
you don’t see any images under the “Images” heading? (its almost all the way down the bottom of the page..)
hrm. weird how its displaying the correct pics for me… i might just do a fresh install of the plugin and try again.

Offline

#371 2008-01-23 01:34:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

amoxycillin wrote:

As far as I can tell, it can find the javascript and css files… I know it’s going to be something really stupid that i’ve missed… :p

Hello! Well the good news is that if you’ve missed something, I certainly can’t spot it. How very bizarre. Like you say, it finds all the js and the css fine but it just refuses to lightbox the thumbnails.

The plugin (well, slimbox.js really) is complaining that it can’t find any images with a rel= attribute in the title. Buit if you View Source they are blatantly there at the bottom.

It doesn’t look like you’re using any other js libraries like jQuery or prototype so my first port of call was wondering if the images were loaded in a different frame to the source code, or some trickery like that. I think the slimbox.js has to be on the same page/frame as the images you want to lightbox but I’m not 100% certain on that. But it looks like you have them all one page so I’ve discounted that avenue.

The only other thing I can think of — and this is a long shot — is some weird random path issue to do with the two sets of stuff (the images and the js code) being in different path spaces. i.e. your images are in /images but the js is in _images/lightbox. Or maybe it’s that underscore…

Can you do me a favour and rule that out by shifting your js temporarily to another directory — without an underscore at the start of the path. Easiest way is probably to tell smd_slimbox_inc to skip="3" and manually hard-code the new paths to the js and css files in your <head> section (the sooner I can get rid of smd_slimbox_inc the better imo!)

Past that I’m a bit stumped right now. What other plugins do you have installed? I really can’t see it being a plugin clash but this is so odd I’m open to any ideas at the mo. Sorry for the false start.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#372 2008-01-23 19:49:09

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: smd_slimbox

Bloke wrote:

marios wrote:

Hi, I think useful, would be also the small addition of a class attribute to the anchors of the images.

cellclass should do this but, imo, you don’t really need it if you wrap the whole tag in a div with a class (e.g. class="slimbox"). Because you can then use:

.slimbox img {// some CSS }

or

.slimbox a {// some CSS }

to get at what you want. Unless there’s something I’ve missed?

I am using the plugin inside the body of the article.
What I want, is

  • A class, on the anchor, so I can apply styles independently from other instances
  • A class on the span, that appears beneath the thumbnail anchor, so I can put the display to none.

(Otherwise all the acronyms would just disappear from the page)

Not possible AFAIK to target cross browser otherwise.

May be I’m not using this right ?

To recap, I’ve got some extra text in the caption field. That is supposed to show only on the slim_box popup,
not underneath. So in other words, I want to get rid of the span.

Here is the output that I would need:

<a class=“smd” href=“http://alistaport.org/images/40.jpg” rel=“lightbox-smd” title=“0”><img src=“http://alistaport.org/images/40t.jpg” alt=“Press Conference. Well, you can read it in the Washington Times tomorrow” /><span class=“getridofme”>Press Conference. Well, you can read it in the Washington Times tomorrow</span></a>

regards, marios

Last edited by marios (2008-01-23 19:53:54)


⌃ ⇧ < ⌃ ⇧ >

Offline

  1. Index
  2. » Plugin support
  3. » smd_slimbox

Board footer

Powered by FluxBB