Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#613 2009-12-15 14:49:06

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

Re: smd_gallery: super-flexible gallery generator

RedFox wrote:

… so maybe it’s impossible!

*splutter* what?! ;-)

Is it possible to render one thumbnail linking to a gallery of images of more than one (sub)categories?

The problem (I think, if I’ve understood correctly) is that you want to show one or more thumbnails that link to a bunch of image categories when viewed in FancyBox.

In which case, the solution lies in your Form. Remember that most of the *Box scripts group images together using the rel attribute? Your form uses rel="fancybox-{category}" which will only allow visitors to traverse through one category at a time. If you want to be able to navigate through them all you’ll have to be more creative with your rel tag:

  • rel="fancybox" will traverse all images on the page
  • rel="fancybox-mygroup" will traverse all images generated from this smd_gallery tag (becaues they’ll all have the same rel name). Alter the ‘mygroup’ bit in each Form if required so that each smd_gallery on the page is part of a unique group
  • OR rel="fancybox-{galleryid}" if you are using the smd_gallery tag in its own Form; galleryid will track your smd_gallery tags and generate a unique identifier for that particular tag instance, thus allowing you to only traverse images generated from that tag when the lightbox is opened

Does that help?

Last edited by Bloke (2009-12-15 14:51:11)


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

#614 2009-12-15 15:16:03

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

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

Does that help?

I hope so … give me a day or two … ;-)

Btw … can you have a look at my earlier post … if you can?

Last edited by RedFox (2009-12-15 15:17:22)

Offline

#615 2009-12-15 16:04:42

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

Re: smd_gallery: super-flexible gallery generator

RedFox wrote:

I do want a tooltip when hovering the thumbnail but I don’t want a title beneath the enlargement (fancybox!

Missed your edit.

Look at the HTML source generated by smd_gallery. The {object} (by default) renders an img tag that has an alt attribute. And your Form has title="{alt}" on the anchor.

My guess is that Fancybox is reading one of those two attributes and treating it as a caption. Try either removing the title attribute from the anchor or removing the alt from the img using smd_gallery’s objectform to specify your own markup for the {object} replacement tag. If the tooltip disappears on hover, try adding a title to the img tag instead; *shrug* clutching at straws.

[ note that if it is the alt and you do remove it, your page might not validate any more ]

Last edited by Bloke (2009-12-15 16:06:50)


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

#616 2009-12-15 16:53:43

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

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

Look at the HTML source generated by smd_gallery…

I did some tweaking here and there before my post, but I will look further into it … thanks a lot for now!

[edit 1]
It is Fancybox that uses whatever it needs to make captions in the slide. I could tweak Fancybox but I’m not a scripter … so I did this in the stylesheet of Fancybox >

div#fancy_title {
	position: absolute;
	margin-top: -24px; /* edit by redfox */
	z-index: 100;
	display: none;
	visibility: hidden; /* edit by redfox > hiding caption! */
}

It still gives a tooptip on hovering the thumbnail and … the page validates … :)

[edit 2]
The solution to both ‘problems’ (I want one (1) thumbnail with a tooltip (alt) ànd no caption in Fancybox!) is:

1) Using this tag in an article >

<txp:smd_gallery category="geschiedenis" objectform="slide" thumblimit="1" sort="random">
<a class="group" rel="fancybox-{category}" href="{url}" title="{alt}">{object}</a>
</txp:smd_gallery>

2) Using this objectform (‘slide’) >

<img src="{thumburl}" alt="{alt}" />

3) And hide the caption div in the Fancybox stylesheet … see code above!

Hopes it benefits other users of smd_gallery and Fancybox. See the results at www.dorpshuiswapse.nl/biljarten

Last edited by RedFox (2009-12-16 12:06:07)

Offline

#617 2009-12-16 14:44:27

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: smd_gallery: super-flexible gallery generator

Dear Stef,

It is a wonderful plugin – I have but one problem (good for me, I know :) ): when the plugin renders the images from the category, it puts a line break around each. I tried to use the break=“li” option, but then it uses both the line break AND the list… Maybe I’m just too lame to figure out the solution, but presently I’m quite helpless (I would not want to ruin the source code, either :) )

Thanks in advance!

Zoltán

Offline

#618 2009-12-17 09:30:53

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

Re: smd_gallery: super-flexible gallery generator

zoltandragon wrote:

it puts a line break around each

You mean a line break in the source code? That would be because your Form or container are on a new line inside the smd_gallery tag. To remove the line break you need to do:

<txp:smd_gallery category="something">... some container output goes here...</txp:smd_gallery>

If that’s not what you mean, please post your tag and form code.


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

#619 2009-12-17 10:30:33

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: smd_gallery: super-flexible gallery generator

doh! I knew it should be simple… sorry. silly me :)

Offline

#620 2009-12-21 02:08:32

jrubio
Member
From: New York, NY
Registered: 2009-12-21
Posts: 13
Website

Re: smd_gallery: super-flexible gallery generator

Hello,

I have created a slideshow with categories. Everything is working fine. I have a navigation bar with sub-menus and when hovering with the mouse, they display in the back of the slideshow. I am using slideshow.js. I’ve had this problem before with flash and I solved it by adding the parameter “wmode = transparent”

How do I create the same effect with smd_gallery. You can see the slideshow here!

Thank you. I am almost there!

Last edited by jrubio (2009-12-21 02:10:40)

Offline

#621 2009-12-21 02:16:27

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

Re: smd_gallery: super-flexible gallery generator

jrubio wrote:

when hovering with the mouse, they display in the back of the slideshow.

Hmm, have you tried addign z-index:2000; (or some other big number) to your ul.dropdown class somewhere to put the nav bar on top of everything else?


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

#622 2009-12-21 10:59:37

jrubio
Member
From: New York, NY
Registered: 2009-12-21
Posts: 13
Website

Re: smd_gallery: super-flexible gallery generator

that did it! thanks a lot.

Offline

#623 2009-12-30 16:01:41

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: smd_gallery: super-flexible gallery generator

HI there,

I am struggling the whole afternoon with the plugin. I have doublechecked everything, read a lot of posts, but i can’t get it to work.
I have tried a very basic setup:
Page:
<txp:smd_gallery category="trees" sublevel="all" form="gallery" wraptag="ul" break="li" />
Form:
<a rel="lightbox-{category}" href="{url}" title="{caption}"><txp:thumbnail id="{id}" /></a>

I see the thumbs and i can click on them but the full photo opens in a new window. No effect at all.
All the .js files and the .css file are in place.

Anyone help?

WAIT!! I installed version 2 of both the css and js files and now it works! (please update the documentation)

Last edited by afewimages (2009-12-30 16:09:39)

Offline

#624 2009-12-30 16:13:14

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: smd_gallery: super-flexible gallery generator

Anyone knows COLORBOX? I am very impressed with this tool. How can i implement this in the plugin?

Steven.

Offline

Board footer

Powered by FluxBB