Textpattern CMS support forum

You are not logged in. Register | Login | Help

#611 2009-12-14 11:39:27

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

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

These are probably generated because your form has newlines in it and TXP / the browser converts them to spaces. If you want to eliminate them you’ll probably have to put your Form/Container markup all on one line.

Good one, but it seemed that that wasn’t the problem at all. Your post pushes me deeper into the stylesheet and yes, it was a CSS thing. So, thank you!

But wait! I’ve another question.

I do want a tooltip when hovering the thumbnail but I don’t want a title beneath the enlargement (fancybox!) … but strange enough I can’t make that happen.

Below is the form that goes with the plug-in on this page (for example!) > www.dorpshuiswapse.nl/txp

<a class="group" rel="fancybox-{category}_{id}" href="{url}" title="{alt}" width="{width}" height="{height}">{object}</a>

If the image in TXP gets an ‘alt’ or not … there is always a title with the enlargement.

Last edited by RedFox (2009-12-14 11:49:54)

Offline

#612 2009-12-15 14:31:19

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

Re: smd_gallery: super-flexible gallery generator

And another one … :%

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

The tag >

<txp:smd_gallery category="vogido,volleyballen" form="gallery_more" thumblimit="1" sort="random"  />

The form >

<a class="group" rel="fancybox-{category}" href="{url}" title="{alt}" width="{width}" height="{height}">{object}</a>

The result (‘Oops!’) > www.dorpshuiswapse.nl/activiteiten

I’ve read the plug-in info several times but I can’t find a solution … so maybe it’s impossible!

Last edited by RedFox (2009-12-15 14:37:35)

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,787
Website

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: 743
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: 8,787
Website

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: 743
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: 43

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: 8,787
Website

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: 43

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

Board footer

Powered by FluxBB