Textpattern Forum

You are not logged in. Register | Login | Help

#31 2008-03-25 18:59:27

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: smd_gallery: super-flexible gallery generator

1. can attr class="empty" be added to li items which don’t have a link? It’s like ob1_pagination works :)
2. Is there variable, like {totalimages}, which shows not the amount of displaying images per current page but counts all images, that should be displayed if limit attr is omitted?

Last edited by the_ghost (2008-03-25 19:03:34)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#32 2008-03-28 18:27:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: smd_gallery: super-flexible gallery generator

nardo wrote:

how do you output the thumbnail’s width and height (into the img tag) when thumbnails can be different sizes?

Currently you can’t :-( And that layout looks very good too!

Since TXP doesn’t store thumbnail dimensions you can only rely on the sizes they are stored in the file system when you upload them. I think you can modify the thumbnail sizes yourself from the images tab on a file-by-file basis (or use the glx_admin_image plugin). Alternatively lam_dynamic_image may help you in this case.

I did consider a hack that reads the current thumbnail sizes and determines the orientation, then applies max width/height restrictions via thumbsize so you could perform such a layout BUT it incurs significant time penalties since each image’s meta data has to be read in turn.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2008-03-28 18:39:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: smd_gallery: super-flexible gallery generator

the_ghost wrote:

can attr class="empty" be added to li items which don’t have a link? It’s like ob1_pagination works :)

Yes it’s possible. I should probably do it, thanks for the advice.

2. Is there variable, like {totalimages}, which shows not the amount of displaying images per current page but counts all images, that should be displayed

Not yet, but I will add this for you.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#34 2008-03-28 18:56:18

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: smd_gallery: super-flexible gallery generator

Thanks Stef! Personal customized plugin will :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#35 2008-04-01 16:01:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: smd_gallery: super-flexible gallery generator

New version 0.34 (compressed) that fixes a small SQL parenthesis bug and adds the emptyclass attribute and the {maximages} replacement tag.

emptyclass defaults to “empty”, and {maximages} can be used in both thumbnail and paging forms. The help has been updated to make it slightly clearer what each image count tag does, as the names are a little confusing at times!

Thanks to the_ghost for the ideas.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2008-04-04 18:43:31

progre55
Member
Registered: 2006-05-02
Posts: 648

Re: smd_gallery: super-flexible gallery generator

Bloke:

I may take the plunge with your new version. How easy is it to duplicate this functionality: jquery image gallery

progre55

Offline

#37 2008-04-04 18:54:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

How easy is it to duplicate this functionality: jquery image gallery

Piece of cake :-) Include the javascript and css he specifies in your page head then use:

<ul id="demoOne">
 <txp:smd_gallery category="blah1, blah2">
   <li><img src="{url}" /></li>
 </txp:smd_gallery>
</ul>

I’m considering expanding the tag set so you can bring the ‘id’ into the plugin as well (helps with multiple galleries per page) but that’s going to require some more thought. For now, the code there will get you going.

EDIT: schoolboy error in the code. Fixed now.

Last edited by Bloke (2008-04-04 18:57:40)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#38 2008-04-06 08:50:34

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,188
Website

Re: smd_gallery: super-flexible gallery generator

Hi Stef, just noticed that the smd_gallery I have here does not seem to render in IE6 and IE7 – any idea why? Fine in FF and Safari etc. Its using fancy zoom, but I don’t see a JS problem here…


TXP Tips | @txptips | Me | @jonathanstubbs | Github

TXP Builders – finely-crafted code, design and txp @txpbuilders

Offline

#39 2008-04-06 09:04:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: smd_gallery: super-flexible gallery generator

jstubbs wrote:

does not seem to render in IE6 and IE7 – any idea why?

Could it be the missing closing > on the anchor tag? Is that caused by one of my replacement tags or your form?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#40 2008-04-06 09:37:04

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,188
Website

Re: smd_gallery: super-flexible gallery generator

Beats me! Tags like this are being produced:

<a href="http://domain.com/images/25.jpg" title="Bla bla" <img src="http://domain.com/images/25t.jpg" alt="bla" /></a>

On second look, the alt portion might be giving me the problem, with the self-closing tag: alt=“bla” />

I use a form to produce the gallery.


TXP Tips | @txptips | Me | @jonathanstubbs | Github

TXP Builders – finely-crafted code, design and txp @txpbuilders

Offline

Board footer

Powered by FluxBB