Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#865 2011-12-07 13:50:26

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

Re: smd_gallery: super-flexible gallery generator

something like this?

<txp:smd_gallery category="!header, !kuelavilla-header, !site-design, !content" sort="category date desc" thumblimit="1" thumbsize="70" onchange="category_title" onchangewraptag="h6" grouptag="div" groupclass="pildid" objectform="title">
{grouptagstart}
{onchange:category_title}
<a rel="lightbox-{category}" href="{url}" title="{caption}">
{object}
</a>
{grouptagend}
</txp:smd_gallery>

form ‘title’ :

<a>{category_title}</a>

Offline

#866 2011-12-07 13:54:39

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

Re: smd_gallery: super-flexible gallery generator

Gallex wrote:

something like this?

Yeah. I was thinking more:

<h6>{category_title}</h6>

since you’ve already got the anchor around the outside of the {object} but in principle yes I think that’ll do it.


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

#867 2011-12-08 09:00:27

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

Re: smd_gallery: super-flexible gallery generator

great!

one little thing: i would like to sort the albums by category name, not by date like right now.

this sort="category name desc" not working

Offline

#868 2011-12-08 21:16:06

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

Re: smd_gallery: super-flexible gallery generator

Gallex wrote:

sort="category name desc" not working

You need to comma-separate columns for sorting, e.g.:

sort="category, name desc"

would sort by (ascending) category then descending name. Whereas:

sort="category desc, name desc"

Would sort both in descending order.


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

#869 2011-12-20 21:13:03

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_gallery: super-flexible gallery generator

I’m creating a gallery system that enables the client to easily drag and drop photos to sort them. To create a new album, all they need to do is create an article, then add and arrange images using bot_image_upload. On the main gallery page, the articles are shown, but appear as albums launched by a single image using smd_gallery and smd_slimbox. The user just clicks on the thumbnail for that article and slimbox opens up with the images. That way they can browse each album without leaving the page.

Here’s my code:

<txp:smd_gallery id="?article_image"
     form="gallery" thumblimit="1"  />
</txp:if_article_image>

and the form:

<a rel="lightbox-smd" href="{url}"
     title="{title}">
{object}
</a>

Works brilliantly (thanks once again, Stef, for your excellent plugins!). The only thing I’d like to be able to do that I haven’t yet figured out is, I’d like to limit each slimbox gallery to the images for that particular article. Right now each album opens with the images for the individual article, but next and previous takes the user into images for the other articles on the page.


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#870 2011-12-20 21:21:38

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: smd_gallery: super-flexible gallery generator

^^ It’s usually a matter of “scoping” the rel attribute.

Something like this should work:

<a rel="lightbox-smd-<txp:article_id />" href="{url}"
     title="{title}">
{object}
</a>

This way, the slimbox script “knows” which images are related to each other.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#871 2011-12-20 21:55:26

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_gallery: super-flexible gallery generator

Thanks, Julián – you’re the best. That totally worked. Much appreciated!


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#872 2012-01-09 17:47:45

Joserinu
New Member
Registered: 2012-01-09
Posts: 1

Re: smd_gallery: super-flexible gallery generator

I would love to have smd_lib and smd_gallery and the website seem to be gone or a broken link. Please let me know where i can get those plugin.

Offline

#873 2012-01-09 19:51:05

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: smd_gallery: super-flexible gallery generator

Stef, did you happen to read This Site’s Domain is Now Safe by Chris Coyier lately?
Hope it’s not that kind of occurrence and everything will be resolved easily.

Joserinu, I’ve uploaded both for you: gallery 0.61 lib 0.36 . Just can’t tell whether I’ve the most recent versions.

Edit: Removed files again, please use stefdawson.com/sw/plugins

Last edited by uli (2012-01-09 23:37:51)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#874 2012-01-09 22:37:53

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

Re: smd_gallery: super-flexible gallery generator

Ack, thank you Uli for stepping in while my site drifted away for a bit. ‘Twas a small administrative error thanks to the vagaries of the global banking cartel who seek to enslave us all with debt. I probably pissed them off and that’s how they pay me back.


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

#875 2012-01-09 23:34:30

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

[…] ‘Twas […]

Cool, glad that it was past that fast. Soh Tanaka is still waiting for his domain, almost 6 weeks now.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#876 2012-01-09 23:46:33

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

Re: smd_gallery: super-flexible gallery generator

uli wrote:

Soh Tanaka is still waiting for his domain, almost 6 weeks now.

Crikey.

I caught mine just in time, got hold of the support team and they set me up a new agreement on the spot. All sorted within about 8 minutes. I love my hoster’s customer service: they even help me out when it’s my fault!


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

Board footer

Powered by FluxBB