Textpattern Forum

You are not logged in. Register | Login | Help

#101 2007-03-21 19:21:01

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,050
Website

Re: smd_slimbox

ooh, ooh… pick me.

I found an obscure bug. hyphenated categories make this mad, mad (in a good way) plugin puke. Just helped someone fix a broken site.

Offline

#102 2007-03-21 20:28:04

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

Re: smd_slimbox

mrdale wrote:

hyphenated categories make this mad, mad (in a good way) plugin puke.

Damn, you’re right. That was me trying to be too clever with a RegEx. The plugin is actually fine, it’s the library at fault. smd_lib v0.21a fixes it.

Sorry about that. Good find, thanks.

As Yoda might say: “shoddy testing make not a good coder…”

Last edited by Bloke (2007-03-21 20:29:17)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#103 2007-04-02 21:52:06

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: smd_slimbox

Ace work.. easy to install, easy to use. Cheers.

Now then, not sure if this is a bug or a feature (as you say), but I can’t get this article form to output the article images if the article is a sticky…
<txp:smd_slimbox imageid="?article_image" showcaption="1" wraptag="li" captionclass="caption" />

If I flip the article to live status it’s fine… Do i win a prize – or just public humiliation? ;)

Meanwhile…

Bloke wrote:

Be aware that there’s a potential issue here: if your article does not contain an article image, the plugin will unfortunately fall back to showing all images in the database. I’ll try and work in a fix for that in the next rev (probably tonight, it’s going well…) but until then, to be on the safe side, use category="this_is_not_a_category" or something (any category that doesn’t really exist) and then you will get only the article image.

Alternatively, you could wrap it in tcm_if_article_image

Offline

#104 2007-04-02 22:40:55

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

Re: smd_slimbox

pieman wrote:

I can’t get this article form to output the article images if the article is a sticky… Do i win a prize

Confirmed bug, so you qualify for a “Stef’ll fix it” badge :-p

The reason: sticky articles transcend normal articles and display article list characteristics (i.e. showing up on article list pages), hence my fugly hack for determining if you are in an article list or an article fails. It’s smd_lib at fault: bad library. Bad library.

It only affects ?fieldname or !fieldname type queries and could be considered a good thing if you didn’t really want sticky articles to show slimbox thumbs. Sadly, this obviously flawed interpretation belongs solely to me so I’ll mend the code to match the expectation of everyone else on the planet. Sorry, but thanks for the catch.

me: if your article does not contain an article image, the plugin will unfortunately fall back to showing all images * snip * pieman: Alternatively, you could wrap it in tcm_if_article_image

Correct, that’s a solution if you’re using ?article_image and already have/don’t mind installing that plugin. Shouldn’t be an issue with v0.24 though as I’ve fixed it.

EDIT: OK, try v0.21b instead.

Last edited by Bloke (2007-04-02 23:25:18)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#105 2007-04-10 16:52:37

DigitalRealm
Member
From: Greenville, SC
Registered: 2006-07-22
Posts: 139
Website

Re: smd_slimbox

Just to relay some input….

I am using this plugin along with the slideshow V2 plugin and both are working perfectly. I did have to go and download a complete version of MooTools for it to work however. I download the entire library and uploaded it and now both plugins work perfectly. Just a heads up for those having trouble with it, they will work together.

Offline

#106 2007-04-12 12:56:28

mbalson
New Member
Registered: 2007-04-12
Posts: 2

Re: smd_slimbox

I’ve looked around a bit and I don’t see anyone else having the same problem, so here goes.
This is probably my implementation, but Slimbox is displaying all of my images in one large series. ie all of the images on the page using categories. I was using bas_lightbox before switching and it would maintain my category groupings within the lightbox.
Any ideas?
hxxp://www.markbalson.com

Offline

#107 2007-04-13 05:05:53

progre55
Member
Registered: 2006-05-02
Posts: 642

Re: smd_slimbox

Bloke:

I must comment again on how GREAT your plug in is …. but what would make it even greater (how do you like the sucking up) would be the capability to launch it from a single image or text. Not sure if there is any possibility in getting that into the next version.

I have read your work arounds, but this is a little tough when in a production enviroment controled by the client. It also puts constraints on the design. again, not complaining if this is not possible.

Thanks again for the excellent plug in.

progre55

Offline

#108 2007-04-13 14:16:43

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

Re: smd_slimbox

mbalson wrote:

Slimbox is displaying all of my images in one large series. ie all of the images on the page using categories.

If you are using a series of categories it will indeed (unfortunately) smoosh them all into one lump for you. Even though the default is to use orderby="category" it only puts them in order and doesn’t split into logical category groups. Oversight on my part when designing it. v0.3 will fix that (and then some!) when I’ve got my head round it.

You can currently make a half-kludge in one of two ways:

  1. use groupname="?c" which will stop the slimbox next/prev links from straying outside a category (not terribly useful in your case, but if you’re a whizz with CSS you may be able to use some clever CSS selectors to make the ‘rel’ attribute split at category – I’ve never managed it though)
  2. use more than one slimbox tag per page, each with a single category in it. Not pretty, but it will do what you want for now until I find some time to enhance it.

Sorry it’s not quite the all-singing, all dancing ballerina that it should be. If I get some spare time next week I’ll carry on trying to kick v0.3 into a releasable shape.

EDIT: D’oh! Having just looked at your web site, it appears groupname="?c" is exactly what you want. If each logical ‘group’ of images on your page is sourced from a different image category, put groupname="?c" in each slimbox tag and it’ll constrain the links to that group only.

If your images aren’t in easily identifiable categories but are made up of lists of IDs or something, just add a fixed (unique) string in the groupname attribute of each tag. e.g. the first tag might be groupname="grp1", the second groupname="grp2" and so on. That should get it doing what you want.

Last edited by Bloke (2007-04-13 20:45:53)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#109 2007-04-13 14:58:47

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

Re: smd_slimbox

progre55 wrote:

…what would make it even greater… would be the capability to launch it from a single image or text. Not sure if there is any possibility in getting that into the next version.

Hey progre55, glad the plugin’s (mostly) useful. Did we talk about this a few pages back? My memory’s shot. Have a read through this post and, if I’ve misunderstood how you intend it to work, let me know (with some mock examples?) and I’ll see what I can do.

Since it was written as a “do-it-all” plugin I didn’t add in the ability to handle forms or take a list of thumbs from some other source. Shame really because the output of wet_for_each_image for example would be quite useful for the folk who don’t need all the stupid array of options that are available in smd_slimbox. mrdale’s also been strutting his stuff making a very cool mashup of various plugins. He does a lot of this, so he may have some insight into a workaround that’ll get you going in the meantime.

The original intention was to show a list of thumbs and allow someone to dive into any one of them and then navigate from there. If your intention is to show some (possibly unrelated) image/text link which will somehow launch a full-scale image gallery lightbox, starting at image 1 in the list I assume(?), then it’ll take some thinking.

Although this plugin is called smd_slimbox it’s really smd_generate_a_list_of_thumbs_and_show_them; the clever bit is done by Christophe’s slimbox code. Once the list of thumbs is on the page, Christophe’s slimbox just “knows” how to iterate through them because of the ‘rel’ attribute in the HTML. In order to do what you want I think I’d have to either:

  1. defer generating the list of thumbs untll the image/text link is clicked, somehow passing them to slimbox. This might require an smd_slimbox_prepare or some plugin option.
  2. generate the list of thumbs so they are ‘on the page’ but not show any of the actual thumbnail pics. So in effect, all the links are in the HTML code but are “hidden” from the viewing public. Then, using the technique detailed on Christophe’s page about calling the lightbox directly we could add an onclick to any element on the page which may (or may not; I haven’t tested it) “start” the lightbox gallery.

Both options are utter theory right now. The second also has an accessibility side-effect because the links are all still navigable by screen readers and from the ‘tab’ key; you just won’t be able to see/have info about what your cursor is selecting.

I really don’t know if either will work or can be hacked to work but I’m willing to try in the name of science. If anyone has any experience in doing this kind of thing or can either tell us to give up because it’s not possible/available in another plugin, or drop some hints as to an easier way of doing it, both me and, I’m sure, progre55 are all ears.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#110 2007-04-15 22:03:15

mbalson
New Member
Registered: 2007-04-12
Posts: 2

Re: smd_slimbox

Bloke wrote:
EDIT: D’oh! Having just looked at your web site, it appears groupname="?c" is exactly what you want. If each logical ‘group’ of images on your page is sourced from a different image category, put groupname="?c" in each slimbox tag and it’ll constrain the links to that group only.

Wicked. This makes it work exactly how I want. Thanks!

Offline

Board footer

Powered by FluxBB