Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-11 22:46:03

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

Plugin request: Latest thumbnail.

I’m looking for a plugin that would allow me to display the latest thumbnail from a specific catergory in a sidebar.

See this thread for addition info here

Offline

#2 2005-12-12 01:21:41

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Plugin request: Latest thumbnail.

Nichod,
You could use this form to show thumbnails
form name = thumb
<code>
<txp:if_category name=“word”>
<li><a href=”<txp:permlink />” title=”<txp:title/>” ><txp:zem_article_thumb /></a></li>
</txp:if_category>
</code>

The article tag would look like this:
<code>
<txp:article form=“thumb” sortby=“lastmod,posted” limit=“4” />
</code>

That would help you get what you want.

EDIT by the way, this should first be posted in “how do I?”. If you assertain that it is not accomplishable via the core tags available in txp then you should ask here :)

Matthew

Last edited by ma_smith (2005-12-12 01:26:36)


Offline

#3 2005-12-12 04:32:25

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

Re: Plugin request: Latest thumbnail.

It was ascertained that it couldn’t be done with tags. Its great if it can. This seems to be limited only to the current posted. Not the most recent. I’ll look at it. Perhaps this will work. Can I have a bit of an explanation of the various tags?

Last edited by Nichod (2005-12-12 04:33:16)

Offline

#4 2005-12-12 14:34:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin request: Latest thumbnail.

Matthew, he means the most recent post that had a thumbnail, not the thumbnail of the most recent post.

Nichod, Matthew’s code indeed won’t do what you’re after. So yes, it’s still a plugin request. :)

Offline

#5 2005-12-13 07:57:53

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

Re: Plugin request: Latest thumbnail.

Just wanted to pop this up. And make sure people know that this is a valid request. Though I am curious at all if this can be implemented with forms, etc. Since there is a the ability to link a latest article from a specific catergory, it seems this would be simple to implement as a plugin by one with the necessary knowledge.

Offline

#6 2005-12-14 07:39:03

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: Plugin request: Latest thumbnail.

Two questions regarding the detailled functionality of a possible plugin:

  1. Would it be correct to assume that the image used in this latest article does definitly have a thumbnail, or is there a chance of having even younger articles with article images that do not have a thumbnail (which would complicate things further)?
  2. Would you prefer to select the latest posted article or the one that was modified latest?

//w&

Offline

#7 2005-12-14 09:08:16

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Plugin request: Latest thumbnail.

It would be a nice feature in rss_thumbpop. Lets say the three last images uploaded and used in that plugin…

Offline

#8 2005-12-14 10:59:16

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

Re: Plugin request: Latest thumbnail.

> wet wrote:

> Two questions regarding the detailed functionality of a possible plugin:

  1. Would it be correct to assume that the image used in this latest article does definitly have a thumbnail, or is there a chance of having even younger articles with article images that do not have a thumbnail (which would complicate things further)?
  2. Would you prefer to select the latest posted article or the one that was modified latest?

It would only work if the article had a thumbnail. The plugin could be configured to list only a certain catergory. The thumbnail when clicked could go to the article or the full sized image. Latest three articles. Thanks for taking a look at this.

Offline

#9 2005-12-14 12:49:08

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: Plugin request: Latest thumbnail.

> Nichod wrote:

It would only work if the article had a thumbnail.

Hmm, I didn’t make myself clear. Images are assigned to articles, and images do or do not have thumbnails. Q: Are there any articles with assigned images which lack thumbnails, or do all article images have thumbnails, too?

Latest…

Latest posted, or latest modified, or both choices as an option?

…three articles.

I am currently thinking of a plugin which will accept an offset attribute, along the lines of txp_article_custom, and which will return the site-absolute url of the thumbnail image. So it will be completely up to you how you use that given URL: As a link, only the seond youngest article with an assigned image or whatever.

Your txp form will use it somehow like that:

  • For the youngest article: <a href="/link/to/article"><img src="<txp:wet_foobar category="events" offset="0" />" /></a>
  • For the second youngest article: <a href="/link/to/article"><img src="<txp:wet_foobar category="events" offset="1" />" /></a>
  • and so on…

If you could rectify those leftover questions above, I can toy around for a first attempt today or tomorrow.

Offline

#10 2005-12-14 13:34:53

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

Re: Plugin request: Latest thumbnail.

>Hmm, I didn’t make myself clear. Images are assigned to articles, and images do or do not have thumbnails. Q: Are there any articles with assigned images which lack thumbnails, or do all article images have thumbnails, too?

Articles COULD have images with unassigned thumbnails. But at this point, they could all be required to have thumbnails and I’d be happy to have something working. In my case they’d have assigned thumbnails.

>Latest posted, or latest modified, or both choices as an option?

Both as an option I suppose. But latest posted is what I’m thinking.

>I am currently thinking of a plugin which will accept an offset attribute, along the lines of txp_article_custom, and which will return the site-absolute url of the thumbnail image. So it will be completely up to you how you use that given URL: As a link, only the seond youngest article with an assigned image or whatever.

Sounds great!

Offline

#11 2005-12-14 21:40:05

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: Plugin request: Latest thumbnail.

Come on over and comment.

Offline

Board footer

Powered by FluxBB