Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#505 2009-07-08 22:42:20

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_gallery: super-flexible gallery generator

Damn… I am stuck again… and can’t figure it out… not sure if this is a smd_if problem, or a smd_gallery problem…

This is my form:

{grouptagstart}
<a rel="shadowbox[{category}];options={counterType:'skip',continuous:true,animate:false,animSequence:'sync'}"  href="{url}">{object}
</a>{grouptagend}<br /><em>{onchange:category}</em>

This is how I am calling the smc_gallery

<txp:smd_gallery category="corporate" sublevel="all" form="trt-gallery" thumblimit="1" onchange="category" wraptag="ul" break="li" class="trtgallery" />

But when I style it – my li style is applying to all the li tags (obvioulsy) – so I have one thumb for the start of the gallery, then lots of spaces, then another for the next gallery and so on… what is the way around this?

I’ve been using this – but am not sure where to put it as it always just leaves one image :(

<txp:smd_if field="{counter}" operator="eq" value="1"></txp:smd_if>

All help appreciated :)

Offline

#506 2009-07-09 05:24:29

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_gallery: super-flexible gallery generator

Cancel that… homer moment… I seem to be having a few recently :(

I changed my styling to a div instead :)

Offline

#507 2009-07-13 01:35:51

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_gallery: super-flexible gallery generator

Just asking for clarification here… is it possible to use the thumblimit=1 and a css list (without showing the empty li’s)?

Offline

#508 2009-07-13 10:55:33

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

Re: smd_gallery: super-flexible gallery generator

tye wrote:

Just asking for clarification here… is it possible to use the thumblimit=1 and a css list (without showing the empty li’s)?

Hmm, I think I get where you’re coming from. If you use thumblimit and put the {object} replacement tag in your form, it’ll show empty li’s if wraptag="li" or they are hard-coded in your form. I don’t think objectform helps in this situation but I’ve not thought it through.

If you’re finding it tricky to style because of the left over li’s you have a couple of options:

  1. Don’t use them ;-)
  2. Cheat. Use countform="1:first_image" and make first_image hold the linked {object} tag. Then in your standard form/container just present the links with nothing inside the anchors, e.g. <a href="{url}"></a>, thus your lightbox effect will still work, your thumbnail will be shown but nobody will know about the rest of the anchors

Does that help or have I misunderstood?


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

#509 2009-07-13 15:49:00

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

Re: smd_gallery: super-flexible gallery generator

Is it possible with smd_gallery to show a gallery of 1 image (fancybox!) via a thumb although there are more images in that same (none)category? I know I can exclude other images (!ID), but is there another way? See this page > http://www.waterlijf.nl/txp/ with 2 articles (excerpts!) and one thumb per article both with the same cat. The gallery shows both enlargements (of course!) …

Last edited by RedFox (2009-07-13 15:49:43)

Offline

#510 2009-07-14 01:40:00

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_gallery: super-flexible gallery generator

Running into a small bug that I can’t quite figure out. Here is my form:

<ul class=“productshowcase”>
<txp:smd_gallery category=“wxvision” form=“product.gallery.image” wraptag=”“ limit=“4” offset=“1” class=”“ sort=“Name desc” />
<txp:smd_gallery category=“wxvision” form=“product.gallery.image.hidden” wraptag=”“ offset=“5” class=”“ sort=“Name desc” />
</ul>

However, no matter what value I try for sort, the images always appear by ID. I have renamed them all like this:

wxvision_01.jpg
wxvision_02.jpg
wxvision_03.jpg
etc …

Any ideas? (reference page)


Kevin
(graphicpush)

Offline

#511 2009-07-14 01:47:04

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: smd_gallery: super-flexible gallery generator

I’m not an smd_gallery user myself, but I’d start by trying sort="name desc". MySQL identifiers are (usually) case sensitive.


Code is topiary

Offline

#512 2009-07-14 01:50:36

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_gallery: super-flexible gallery generator

jsoo wrote:

I’m not an smd_gallery user myself, but I’d start by trying sort="name desc". MySQL identifiers are (usually) case sensitive.

Tried. Does not make a difference.


Kevin
(graphicpush)

Offline

#513 2009-07-14 08:39:47

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

Re: smd_gallery: super-flexible gallery generator

RedFox

If you don’t want the ‘box’ plugin to treat all images on a page as a contiguous set, you need to make sure that each “instance” of smd_gallery uses a unique rel= attribute. Currently, the images in each article use rel="fancybox-nieuws". Consider adding something else to it that’s unique to that page/gallery. If you are only showing one thumbnail, the {id} would do, e.g. rel="fancybox-nieuws_{id}".

kevinpotts

Hmmm, weird. All I can say is that sorting by name works for me — even with a tag the same layout as yours (minus the curly quotes of course). I doubt it has anything to do with your form, but what is its contents, out of curiosty? You could also try adding debug="1" (or 2, or 3, or…) to the gallery tag. If you look at the SQL statement it gives you, plus any other pertinent information, that might pinpoint why it’s not sorting properly. Failing that, post some debug stuff here or mail me with it and we’ll try and figure out what’s going on.

P.S. cool looking site!

Last edited by Bloke (2009-07-14 08:40:43)


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

#514 2009-07-15 11:27:29

simoin
Member
From: Ireland
Registered: 2009-02-10
Posts: 50
Website

Re: smd_gallery: super-flexible gallery generator

Hi, I’m using smd_gallery here,

http://www.athlonesportscentre.ie/index.php?s=gallery

What I would like is a number beside each thumbnail so you can know how many pictures are in a set before you click into it.

This is the form I’m using,

{onchange:category_title}
<a href="{url}"  title="{title}" rel="lightbox-{category}">
{object}
</a>

Any help appreciated.
Simon

Offline

#515 2009-07-15 12:18:17

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_gallery: super-flexible gallery generator

simoin wrote:

What I would like is a number beside each thumbnail so you can know how many pictures are in a set before you click into it.

I had the same question. It’s a bit tricky.

Last edited by kevinpotts (2009-07-15 12:18:36)


Kevin
(graphicpush)

Offline

#516 2009-07-15 12:55:14

simoin
Member
From: Ireland
Registered: 2009-02-10
Posts: 50
Website

Re: smd_gallery: super-flexible gallery generator

Thanks, I’ll have look and hopefully get it sorted.

Offline

Board footer

Powered by FluxBB