Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#601 2009-11-19 20:54:50

brian.zollinhofer
Member
From: Virginia
Registered: 2006-07-10
Posts: 24
Website

Re: smd_gallery: super-flexible gallery generator

I think I’m just doing something idiotic, but I can’t get imgsize to do what I think it should do.

<txp:smd_gallery category=“sidebar” sort=“random” limit=“3” imgsize=“100,150” />

I wanted to resize the images to 100px x 150px


Zollinhofer.com

“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain

Offline

#602 2009-11-20 09:21:16

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

Re: smd_gallery: super-flexible gallery generator

brian.zollinhofer wrote:

I wanted to resize the images to 100px x 150px

By default — without a form or container — smd_gallery will render an anchor tag surrounding the full size images in your chosen category. If you want it to display anything else, for example thumbnails or images in different sizes, you need to design your own form. Without a form, this is what smd_gallery will choose for you:

<a href="{url}" alt="{alt}"><txp:image id="{id}" /></a>

Since it is calling TXP’s image tag, it will display the image in its full size. If you want to do the same kind of thing but limit the image sizes you should do this:

<txp:smd_gallery category="sidebar" sort="random" limit="3" imgsize="100,150">
   <a href="{url}" alt="{alt}"><img src="{url}" width="{width}" height="{height}" /></a>
</txp:smd_gallery>

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

#603 2009-11-20 15:28:29

brian.zollinhofer
Member
From: Virginia
Registered: 2006-07-10
Posts: 24
Website

Re: smd_gallery: super-flexible gallery generator

Thanks so much! That did it.


Zollinhofer.com

“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain

Offline

#604 2009-11-25 13:28:29

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: smd_gallery: super-flexible gallery generator

obviously there is a sample for my request in this thread, but it would take ages to go this all through.
in a word, need simple popup gallery like this (this one actually uses rss_thumbpop plugin): thumbnails with captions from specified category and clicking on it opens up a big image. can’t figure out the form myself. my page <txp:smd_gallery category="Pictures" form="pictures" />

Offline

#605 2009-12-07 05:27:13

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

Without a form, this is what smd_gallery will choose for you:

<a href="{url}" alt="{alt}"><txp:image id="{id}" /></a>

Stef, I got a question about that: I’d like to get rid of the anchor tag, so I created a form with just <txp:image id="{id}" /> but images still get wrapped in the tag. Probably missing something obvious here…
Thanks a lot,
B.

Offline

#606 2009-12-07 09:47:09

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

Re: smd_gallery: super-flexible gallery generator

ploinkr wrote:

I created a form with just <txp:image id="{id}" /> but images still get wrapped in the tag

Did you give smd_gallery the form attribute or put the above code in the tag’s container?


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

#607 2009-12-07 16:01:28

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: smd_gallery: super-flexible gallery generator

<darn> I should check my code twice before posting ;-P – it was just a double quote missing somewhere. </darn>
Sorry about that :-/ – thanks nonetheless.

Offline

#608 2009-12-09 05:21:29

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: smd_gallery: super-flexible gallery generator

Hi Bloke,

its possibly to make the paging-form with css-class?
Or how i can add the class into the {}-form?
It would be great for making more css-styling ;)

code in the form “smd_gallery_nav”

{navprev:class} {navearlie:class2} {navthis:class2} {navlater:class2} {navnext:class}

html-output should e.g.:

<ul> 
<li class="class empty">«</li>
<li class="class2">1</li> 
<li class="current empty class2">2</li> 
<li class="class2">3</li>
<li class="class">»</li>
</ul>

Ive tried a span before and after {}-code, but its not a valide code :(

Lythande

Last edited by lythande (2009-12-09 05:22:05)

Offline

#609 2009-12-13 19:04:38

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

Re: smd_gallery: super-flexible gallery generator

On this page > www.dorpshuiswapse.nl/txp/vogido I use <txp:smd_gallery form="gallery_more" category="vogido" thumblimit="1" sort="random" />

The more images in category="vogido" the more whitespace there is beneath the thumbnail … !?

Has this something to do with the plug-in code? The tag! The form! Or is this only CSS?

Last edited by RedFox (2009-12-13 19:05:24)

Offline

#610 2009-12-14 10:46:19

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

Re: smd_gallery: super-flexible gallery generator

RedFox wrote:

The more images in category="vogido" the more whitespace there is beneath the thumbnail … !?

If you look inside your anchor tags for all images other than the 1st you’ll see there are one or two spaces like this:

<a options="here"...> </a>

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.


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

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

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
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: 809
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

Board footer

Powered by FluxBB