Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#61 2007-03-06 10:10:26

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: smd_slimbox

Bloke wrote:

Do you think adding a classname to the first image of a category is enough or would you prefer the option of wrapping each category in its own <div class="given_class_name">? Can you think of any other ways the plugin can group images that might benefit from this approach? I’m struggling to think of any; apart from author (and maybe ext?!), category seems to be the only obvious choice as all the other “orderby” options are somewhat linear in nature.

Thanks for your reply Stef.

I suppose my ideal solution would be if each image category automatically wrapped in a class/div that creates a distinct break. If it was possible to incorporate the category title/label that would be damn near perfect (for me anyway, I can’t speak for the thousands of other TXPers).

I think adding separate classes might make the plug-in unnessarily complex – sometimes too many options can be as bad as too little.

Last edited by decoderltd (2007-03-06 10:10:55)

Offline

#62 2007-03-06 12:13:01

joel
Member
Registered: 2004-11-26
Posts: 162

Re: smd_slimbox

I’ve another problem as well.

I’m using the slimbox to display article images. My problem is that it shows all the images from the given category. Even if I only assign one ID in the article image field.

The code I’m using for my static article form is:
<h2><txp:title /></h2>
<txp:chh_if_data>
<div class="lightbox_artikelbild">
<txp:smd_slimbox imageid="?article_image" category="artikelbild" showpagelinks="0" />
</div>
</txp:chh_if_data>
<txp:body />
<br style="clear:both;" />

Last edited by joel (2007-03-06 12:15:56)

Offline

#63 2007-03-06 13:02:57

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

Re: smd_slimbox

joel wrote:

I’m using the slimbox to display article images. My problem is that it shows all the images from the given category. Even if I only assign one ID in the article image field. <txp:smd_slimbox imageid="?article_image" category="artikelbild" showpagelinks="0" />

It will. It combines the category and imageid options and pulls all the images from them both. If you only want to see the sole article image, use imageid="?article_image" and drop the category attribute. Maybe I should make that clearer in the docs, it’s a little misleading! (sorry)

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.

Hope that helps. Shout if not or I’ve misunderstood.

Last edited by Bloke (2007-03-06 13:22:44)


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

#64 2007-03-06 13:20:59

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

Re: smd_slimbox

decoderltd wrote:

I suppose my ideal solution would be if each image category automatically wrapped in a class/div that creates a distinct break. If it was possible to incorporate the category title/label that would be damn near perfect.

Duly noted. I’ll see what I can do. Good call about the category name… damn, that might have to be another option unless I can find a way round it. Thinking cap * on *….

I think adding separate classes might make the plug-in unnessarily complex

Yeah, it’s already bursting at the seams! In the process of taking it to the next level I tried to find a way to consolidate the options; particularly the class options which seem to be crying out for rationalisation. I think I’ve found a way to handle what tollady wanted (with less options than originally planned) and add in some awesome power at little(ish) cost to complexity in the process. But that means leaving the class options as they are and adding one more: groupclass. It’s a tricky balance between fewer options and the power to make the output malleable enough to cope with umpteen uses!

I’d love for the class attributes to be consolidated somehow, but with the new syntax for specifying which cells / categories you want styling with which classes it’d make the class string far too difficult to read :-(

I’m still in the dev phase for that though, so I may have a brainwave (or someone else might!)

There’ll be an interim release going up as a stepping stone towards v0.3-with-mega-classes. In the process of looking at zem’s very cool ‘nth’ class I realised there was a quick win to be had with specifying imageids in a range (5-15, 36, 23, 29-32…) and it works like a charm. I’m just adding one more nicety to justify a release (if I can debug it in time!) and fix a couple of minor issues with 0.23, so watch this space…


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

#65 2007-03-06 14:46:19

joel
Member
Registered: 2004-11-26
Posts: 162

Re: smd_slimbox

Thanks! That surley did the job! :)

Btw. I found a strange bug in 0.22 and 0.23. The article image doesn’t show in article-list-mode. It’s only visible in individual-article-mode.

Thought you might wanna know…

Offline

#66 2007-03-06 15:02:45

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

Re: smd_slimbox

joel wrote:

Btw. I found a strange bug in 0.22 and 0.23. The article image doesn’t show in article-list-mode. It’s only visible in individual-article-mode.

Hehehe, in the words of Micro$oft “It’s not a bug, it’s a feature” :-)

In article list mode, there’s no article loaded so the article_image field isn’t available. Same goes for keywords, body, excerpt, etc… the only really useful options are ?s and ?c.


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

#67 2007-03-06 16:30:40

joel
Member
Registered: 2004-11-26
Posts: 162

Re: smd_slimbox

Haha… I need a pair of thick silver glasses I believe… :)

Offline

#68 2007-03-06 19:19:22

BrotherKane
New Member
From: Toronto, Canada
Registered: 2007-03-06
Posts: 5

Re: smd_slimbox

Hi there. Great plugin!

I’m having a bit of trouble implementing it, though. Everything appears as it should except the bottom bar which shows up halfway off the left side of the screen. I suspect this is a conflict between the CSS for my layout and the slimbox, but my troubleshooting abilities are limited in this area. I’d appreciate any advice on how to fix this or to point out where the conflict is. Thanks!

Take a look at my Gallery to see what I’m working with. Here is the CSS for my page.

Last edited by BrotherKane (2007-03-06 19:44:57)

Offline

#69 2007-03-06 21:29:21

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: smd_slimbox

Hi! Thanks for this great piece of code. Very usefull!

One thing: using wraptag=“br” generates </br>. Shouldn’t be <br />?

Edit ///

Ah, ok:

“Tag to wrap each ‘cell’ with. Do not specify the < or > characters. For a valid page, the only useful options are “div”, “li” or “p”. Default: empty (i.e. no tag)”

Sorry.

Last edited by ultramega (2007-03-06 21:31:52)

Offline

#70 2007-03-06 21:29:44

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

Re: smd_slimbox

BrotherKane wrote:

I’m having a bit of trouble implementing it, though. Everything appears as it should except the bottom bar

Do you mean the Next/Prev thing under the thumbnails or the bottom bar of slimbox where the caption shows up? Both appear to be working on your page in Firefox 2, although I notice you have the same thing that Joel has in IE with the black background only appearing a few pixels high at the top of the screen. Wish I knew why Slimbox did that.

If it’s the Next/Prev navigation bar under the thumbs, can you add showpagelinks="1" to the slimbox tag and/or set the limit option to something small so the bar shows up? I can then maybe see what you mean. Thanks.


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

#71 2007-03-06 21:46:45

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

Re: smd_slimbox

ultramega wrote:

One thing: using wraptag=“br” generates </br>. Shouldn’t be <br />? Edit /// Ah, ok…

Yeah, wraptag is a bit dim and just assumes the tag you’re going to wrap all the thumbs in is a standard tag pair; like div or ul. Maybe dl would work too, not tried it. A break will, umm, break it :-\

BTW, I’ve resisted the urge to implement the ubiquitous break attribute so far; maybe a slight oversight on my part, but I’m not a fan of it for positioning and, with the up-and-coming class options revamp, shouldn’t be necessary (he says, hopefully…)

Of course, if there’s overwhelming backlash I may add break for completeness.


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

#72 2007-03-06 21:59:50

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: smd_slimbox

Actually, I don’t need it either, was just testing and noticed that.

BTW, what is the best way to use custom field with this? I mean, I’m planning to import series of images for articles and get them categorized automagigally by fpx_image_import. So I’d like to drop that cat name in one custom field. So far what I have tested, if the field is empty, it’s adding all images, right? Was it possible to restrict by some tag?

Offline

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

Board footer

Powered by FluxBB