Textpattern Forum

You are not logged in. Register | Login | Help

#1 2005-12-14 21:38:35

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

wet_thumbfilter: Renders article thumbs matching various criteria

wet_thumbfilter displays the thumbnails for articles images meeting various filter criteria with an optional link to the articles.

Sample use:

tag function
<txp:wet_thumbfilter category="events" /> displays the most recent thumbnail belonging to an article in the “events” category.
<txp:wet_thumbfilter category="events" sortby="LastMod" offset="1" /> displays the thumbnail which is associated with an article out of the “events” category. Articles are sorted by the date of last modification. The article at offset 1 (i.e. the second) is chosen.
<txp:wet_thumbfilter category="events,fairs" limit="3" wraptag="ul" break="li" label="Recent pics" labeltag="h3" /> displays thumbnails from the three most recent articles out of the “events” or “fairs” category. The thumbnails are embedded into an unordered list and labelled by a h3.

Download and further information. Initial plugin request and use case.

Last edited by wet (2006-11-05 17:02:35)

Offline

#2 2005-12-14 22:08:39

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,380
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Oh, nice! Will sortby=“rand()” work?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#3 2005-12-14 22:13:32

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Of course. wet_thumbfilter just passes all “sortby” options on to the SQL query.

Offline

#4 2005-12-14 22:16:30

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,380
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Great! I can use this, thanks.


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#5 2005-12-14 23:06:37

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 739

Re: wet_thumbfilter: Renders article thumbs matching various criteria

thanks wet, you’re the thumbnail king

Offline

#6 2005-12-14 23:13:39

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Nowadays, in this overly cluttered world you’ve got to find yourself a niche inside a niche to shine bright ;-)

Offline

#7 2005-12-15 01:57:59

Nichod
Member
Registered: 2005-06-06
Posts: 119

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Looks and works nicely. Now how do I have the thumbnail link to each of the articles? Or is that not possible in this version?

Offline

#8 2005-12-15 20:12:18

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Thanks for the input, Nichod. I was too shortsighted. After some thinking I decided to simplify the use of wet_thumbfilter and let it behave like any other ordinary tag. It now shares an attribute subset with wet_article_thumb. The plugin displays the selected thumbnail by itself, removing the need for any embracing img tag, and it will provide a link to the article as well.

I’ve adopted the samples on the initial post of this thread. Please download version 0.2 from the location given there.

//w&

Last edited by wet (2005-12-16 06:00:24)

Offline

#9 2005-12-16 00:31:37

Nichod
Member
Registered: 2005-06-06
Posts: 119

Re: wet_thumbfilter: Renders article thumbs matching various criteria

Nice. How about a limit attribute? Or is it there and I’m not seeing it?

Offline

#10 2005-12-16 05:57:54

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: wet_thumbfilter: Renders article thumbs matching various criteria

No, there is no limit attribute. What would be the use of such an attribute?

Offline

Board footer

Powered by FluxBB