Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#553 2008-08-16 07:55:38

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: smd_slimbox

Hi Stef,

First of all a big THANKS for a great plugin. I’ve used it in a couple of my TXP sites and now started palying around with more ideas for it. What I want achieve is simple (I think), all I am after is a link below the picture to other websites, to explain it’s a portfolio I am trying to do. So far I can see I could use alt or caption but they don’t seem to be able to copy with html code.

The main reason for my post is to fund out if it is time to ‘upgrade’ from slimbox to gallery or if there is a way I can use slimbox to create a portfolio listing with lightbox effect.

Best regards
Peter

Offline

#554 2008-08-16 08:35:10

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

Re: smd_slimbox

Exiladler wrote:

a link below the picture to other websites

I think you are out of luck with smd_slimbox in this situation because its thumbs are simply just thumbs with an optional title/alt. Unless you want to hardcode the URLs into one of those fields of course :-)

Since smd_gallery uses a form, you can put anything you like in it so you could read the URL from any image field — or perhaps from a custom field if you wanted a gallery per article where every picture linked to the same author’s site — and put that near the thumbs. Plus it has better paging support per gallery and is better implemented overall (the benefit of hindsight!). I’d definitely suggest giving smd_gallery a spin in this case.


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

#555 2008-08-16 08:40:42

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

Re: smd_slimbox

Follow-up:

Under TXP 4.0.7, you could set a bunch of variables like this in a form; one per image author in your portfolio:

<txp:variable name="peter" value="http://peter.com/" />
<txp:variable name="stef" value="http://stefdawson.com/" />
...

And then in your gallery form, read the author field of your image and make a link to the author’s site by retrieving the URL from the relevant txp:variable.


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

#556 2008-08-16 08:51:39

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: smd_slimbox

Thanks for the very fast feedback, I have found a ‘workaround’ of sorts with which I am currently struggling. I saw another lightbox user use the following in their Alt tag :
“Name of Website &lt;a href=&quot;http://www.domain.com&quot;target=&quot;blank&quot;&gt;(View website)&lt;/a&gt;” which more or less what would resolve my problem.

Somehow it seems to work in FF 3 but creates different results in FF 2 and IE7, well I guess some more tweaking and I get there in the end.

Thanks and regards
Peter

Offline

#557 2008-08-16 09:00:07

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: smd_slimbox

follow up:

now I made it look the same, it was the thumbtextwrap=”“ that created the different results, at least now they are consistently screwed up. I am sure it is just a mixture of css and parameters of the slimbox.

Not sure if anyone else has discovered a ‘minor’ issue with TXP, anyway here it goes, I am now including the links in the Alt and Caption, which works but only once as TXP will at the next time of displaying, show the actual character and when saving after another update, it stores ‘<’ instead of &lt; etc thus misforming the code. Since discovering this little flaw, I have almost conceded, all that needs doing is some css tweaking.

Last edited by Exiladler (2008-08-16 10:48:14)

Offline

#558 2008-08-22 11:14:00

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: smd_slimbox

Hello!
Is it possible to change the anchor’s title? Like <a title=“Filename.jpg” href=”#”> Now this title is generated depending on imagecaption attribute right? What I need is when you put the pointer over thumbnail it shows the filename instead of Caption. But the problem is I want imagecaption, thumbtext and this anchor title to be all different.
Thank you.

Offline

#559 2008-08-22 11:53:17

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

Re: smd_slimbox

xzamen wrote:

Is it possible to change the anchor’s title?

Yes and no! As you found, imagecaption is the way to change it to show filename, but there is no provision in the plugin for adding a title to the img itself (the ‘title’ attribute is only on the surrounding href link). You can use smd_gallery for this task because it’s more flexible, but I don’t know how much mileage you’d get since browsers vary in what they offer as balloon text when you hover over something.

IE (6 at least) gets it horribly wrong. In other browsers, I’m not sure what would happen if you had:

<a href="fullsize-pic" alt="alt text" title="anchor title">
  <img src="pic.jpg" title="image title" />
</a>

Which title would the browser show? Would browsers differ? (probably!)

Last edited by Bloke (2008-08-22 11:55:41)


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

#560 2008-08-24 00:03:45

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: smd_slimbox

Bloke,
Thank you for pointing out the issue with browsers. I think I’ll leave everything as it is now. Seems to be working fine.

Offline

#561 2008-08-26 00:36:09

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: smd_slimbox

Can I do this?

I want my article image loaded in my article, as normal (reduced in size using a php script – taken care of already)

Then if a user clicks on an anchor to trigger the lighbox action the article image in original large size will pop up lighbox style. I don’t need to navigate to the next or previous. I just want the user to be able to see the large version isolated.

Not sure how I could achieve this.


Art Rogue – Fine Art Photography

Offline

#562 2008-08-26 07:47:55

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

Re: smd_slimbox

mattmikulla wrote:

if a user clicks on an anchor to trigger the lighbox action the article image in original large size will pop up lighbox style.

It’s sort of possible in smd_slimbox but requires some kludging and CSS trickery, since it is only designed to have thumbnails clickable. You might be better off with upm_image but it’s slightly messy since I don’t think it can be used as a container tag. I have no idea if this’ll work but in my head I can see something like:

<txp:article_image /> // as normal
<txp:upm_article_image form="artimg" />

And in form artimg:

<a rel="lightbox-<txp:upm_img_id />" href="<txp:upm_img_full_url />">Click to see the image</a>

The ‘rel’ instructs the slimbox/lighbox script to do its stuff and it has the image ID added to it so it will only show that image in case there are more on one page (think article_list). If your article image and clickable link were close together on the page there’s no reason you couldn’t combine the two and use upm_image to display the thumbnail inside the artimg form as well, which saves you a call to TXP’s article_image tag.

smd_gallery can also do it if you happen to have that installed with the advantage that it’s a container tag BUT there’s no simple way of getting at the article_image’s URL so you’d probably have to use a bit of PHP to pull the URL out of the database: yuk!

I’d be tempted to just stick the lightbox scripts on the page and mess around with upm_image since you’re not really using smd_slimbox as a ‘gallery’ per se, so it’s overkill. Does that help at all?


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

#563 2008-08-27 16:46:39

MrLongbaugh
Member
From: Hamburg - Germany
Registered: 2004-10-11
Posts: 116

Re: smd_slimbox

Hey,

I would like to give the thumbnail an text with an a tag.
The thumbnail itself should have a link to the main image – as usual.

How can I make the plugin not to use the title in the a Tag of the Thumb? Or to use the alternate text as title?

This is the form:

<txp:asy_wondertag>
<txp:smd_slimbox imageid="<txp:custom_field name="Fotos" />" thumb="0:1" thumbtext="above:?caption" wraptag="li" sort="fixed" />
</txp:asy_wondertag>

Offline

#564 2008-09-12 17:29:18

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: smd_slimbox

There is only one thumbnail in the article, which is correct. Clicking on it shows all images (after eachother!) of a specific category in a slimbox, the cat is named ‘schilderijen’. Everything is going fine except the images in the show are not the three images of the cat specified … !?

I did check the images and their cat in TXP several times but I don’t understand why smd_slimbox doesn’t work as supposed.

code > <txp:smd_slimbox category="schilderijen" limit="1" showpagelinks="0" />
url > http://www.claraelders.nl/txp/kunst?98cb=2 under ‘Schilderijen…’!

Thanks for any help.

[edit]
I’ve now skipped the limit attribute … so there are three (3) thumbnails. But the show (slimbox) gives two more images … !?
And there are only three (3) images with the cat ‘schilderijen’. I don’t get it!

[edit]
Solved (more or less!). I’ve skipped the two images that didn’t belong to the cat from the TXP database … and yes, the slimbox is setup properly … :)

[edit]
Oops … I didn’t read the plugin help good enough. With ‘groupname=‘schilderijen’ into the tag everything is working as it should … :)

Last edited by RedFox (2008-09-15 10:29:38)

Offline

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

Board footer

Powered by FluxBB