Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wet_thumbfilter: Renders article thumbs matching various criteria
Oh, nice! Will sortby=“rand()” work?
Offline
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
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wet_thumbfilter: Renders article thumbs matching various criteria
Great! I can use this, thanks.
Offline
#5 2005-12-14 23:06:37
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: wet_thumbfilter: Renders article thumbs matching various criteria
thanks wet, you’re the thumbnail king
Offline
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?
Please try Textpattern for Aptana
Offline
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?
Please try Textpattern for Aptana
Offline
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
#11 2005-12-16 07:04:58
- Nichod
- Member
- Registered: 2005-06-06
- Posts: 119
Re: wet_thumbfilter: Renders article thumbs matching various criteria
Ahh. This only shows the most recent thumbnail. Any chance of having it show the past 3?
Please try Textpattern for Aptana
Offline
Re: wet_thumbfilter: Renders article thumbs matching various criteria
Of course, that’s what the offset
attribute is good for.
Simple put those three lines into a form, an article or a template:
<txp:wet_thumbfilter category="events" offset="0" />
<txp:wet_thumbfilter category="events" offset="1" />
<txp:wet_thumbfilter category="events" offset="2" />
You can also add any useful HTML markup:
<ul class="gallery">
<li><txp:wet_thumbfilter category="events" offset="0" /></li>
<li><txp:wet_thumbfilter category="events" offset="1" /></li>
<li><txp:wet_thumbfilter category="events" offset="2" /></li>
</ul>
Got it?
Last edited by wet (2005-12-16 07:22:53)
Offline