Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-16 19:15:36

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

wet_article_thumb: article thumbnail display

wet_article_thumb displays the thumbnail which belongs to an article’s image with an optional link to the article.

Usage

<txp:wet_article_thumb />
  • Display the thumbnail for the current article’s image
<txp:wet_article_thumb class="thumb" link="1" />
  • Display the thumbnail for the current article’s image.
  • Apply class thumb to the image tag.
  • Make the thumbnail a link to the article. This comes handy in article lists.

More information and download.

Offline

#2 2006-08-04 08:40:12

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

Re: wet_article_thumb: article thumbnail display

v0.3, now supporting comma separated image lists.

Offline

#3 2006-09-17 19:43:10

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

Re: wet_article_thumb: article thumbnail display

elduderino wrote:

<blockquote>
HI there,

This seems like the right place to be posting this….i hope so anyway!

Im having problems with my thumbnail not appearing. Ive installed the plug-in and enabled it, uploaded an image and its associated thumbnail and tried to call it using the the following form:

<txp:if_article_list>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<p class="info"><txp:posted /> by <txp:author /></p>
<txp:wet_article_thumb /> 
<txp:excerpt />
<txp:if_comments>
<p class="read"><txp:permlink>read on...</txp:permlink></p>
<p class="comments"><a href="<txp:permlink />#discuss" >comment (<txp:comments_count />)</a></p>
<txp:else />
<txp:if_comments_allowed><p class="read"><txp:permlink>read on...</txp:permlink></p>
<p class="comments"><a href="<txp:permlink />#discuss">comment (<txp:comments_count /> )</a></p>
<txp:else /></txp:if_comments_allowed>
</txp:if_comments>
</txp:if_article_list>
<txp:if_individual_article>
<txp:article_image />
<h2><txp:title /></h2>
<p><txp:posted /></p>
<txp:article_image />
<txp:body />
<txp:if_comments>
<h2>Make a Comment</h2><div id="comments"><p></p>
</txp:if_comments>
</txp:if_individual_article>

IN my html im calling the form with
<txp:article form="articles" listform="articles" limit="3" />

which seems to be working fine..

The top part of the form deals with my article excerpts on my default page and the bottom part deals with full articles. My full article images work but not my thumbnails.

Any ideas what i could be doing wrong here?
</blockquote>

Using image ids is the right way. You definitely activated the plugin, haven’t you?

Offline

#4 2006-09-17 19:54:00

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: wet_article_thumb: article thumbnail display

Yes absolutely, just double checked. Theres not any additional elements i need to get this plugin working are there?

Offline

#5 2006-09-18 04:43:49

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

Re: wet_article_thumb: article thumbnail display

None I’m aware of. This plugin requires nothing more than

  • An image with an existing thumbnail.
  • An article with that image assigned as the article image by image id, more than one image supportted by a comma separated list of ids.
  • A place in an article form.

I’ve prepared a version of the plugin which spits out HTML comments instead of doing nothing whenever there’s a condition which wouldn’t render a thumbnail. Please substitute the existing PHP code (edit the plugin) with this version.

Then, browse to your site’s front end and hunt in the source of the page’s HTML for comments starting with <!-- wet_article_thumb. Share your findings here.

Last edited by wet (2006-09-18 04:50:54)

Offline

#6 2006-09-18 08:11:43

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: wet_article_thumb: article thumbnail display

Hi Wet,

Your plugin output this code in my source:

<code><!— wet_article_thumb: image file C:\wamp\www\textpattern\images\62t.gif does not exist —> </code>

So i had a look in my images file and indeed the 62 thumbnail want there so i created it manually and put it in the folder andit worked. I then tried uploading and image and its associated thumbnail throught textpattern and testing it in an article and all is well!

I dont know what i was doing wrong in the first place! Its working perfectly now.

Thanks for your help Wet and thanks for writing this plugin!

Offline

#7 2006-10-02 15:04:12

AtleL
Member
From: Norway
Registered: 2005-07-26
Posts: 10
Website

Re: wet_article_thumb: article thumbnail display

Hi Wet! This plug-in looks just right for me, but I seem to have the same initial problem as elduderino, although I’ve got the thumbnail in the right folder and everything (When I hit the url for the thumb it shows up: ../images/6t.jpg).

In my article-content I have no <code><txp:article_image/></code>, but I’ve written the ID of the image in Advanced Options. I have one form for the listing of the articles (that’s where I want the thumbnail) with <code><txp:wet_article_thumb /></code>, and one for the single article, in which I call the image with <code><txp:article_image/></code>.

Here’s the form I use for the listing of the articles:
<code><div class=“medarbeidere_2”>
<txp:wet_article_thumb />
<h2><txp:permlink><txp:title /></txp:permlink></h2>
</div></code>

I’m using Textpattern version 4.0.3 and I have activated the plug-in. Any thoughts?

Offline

#8 2006-10-02 19:01:04

AtleL
Member
From: Norway
Registered: 2005-07-26
Posts: 10
Website

Re: wet_article_thumb: article thumbnail display

Hmmm… Had a thought, about how I’d written the ID of the image in Advanced Options. On other occations I’ve actually written images/6.jpg, instead of just the number. Don’t know why. But I tried with just the ID-number 6, and behold! It works! Hope I didn’t waste anybody’s time with this stupid problem.

Offline

#9 2006-10-02 19:06:28

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

Re: wet_article_thumb: article thumbnail display

To clarify for posterity: wet_article_thumb requires only numbers in the “Advanced Options” image field. Either just a single one, or multiple numbers separated by commas. No spaces, no alpha characters, no file names. It uses the first image’s thumbnail.

Valid:

  • 42
  • 8,15,47,11

Invalid:

  • 42.jpg
  • /images/8t.pjg,/images/15t.gif

;-)

Offline

#10 2007-01-03 18:00:34

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

Re: wet_article_thumb: article thumbnail display

v0.4, adding rel and link_class attributes due to popular requests. Get it while it’s still useful, as core code is catching up

Last edited by wet (2007-01-03 18:00:55)

Offline

#11 2007-06-15 11:44:22

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

Re: wet_article_thumb: article thumbnail display

wet wrote:

To clarify for posterity: wet_article_thumb requires only numbers in the “Advanced Options” image field. Either just a single one, or multiple numbers separated by commas. No spaces, no alpha characters, no file names. It uses the first image’s thumbnail.

I don’t know what’s wrong but then i put multiple numbers of image id’s separated only by commas the images doesn’t show up, when single one – it shows up…

my page:

<txp:article limit=“55” form=“wet” />

my form wet:

<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:if_article_list>
<txp:if_excerpt>
<txp:wet_article_thumb />
<txp:excerpt />
<p class=“meta”><txp:permlink>Loe edasi…</txp:permlink> | <txp:comments_invite /> | <txp:posted /></p>
<txp:else />
<txp:body />
<txp:article_image />
<p class=“meta”><txp:comments_invite /> | <txp:posted /></p>
</txp:if_excerpt>
<txp:else />
<txp:body />
<txp:article_image />
</txp:if_article_list>

and homepage

Last edited by Gallex (2007-06-15 11:50:48)

Offline

#12 2007-06-15 11:48:44

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

Re: wet_article_thumb: article thumbnail display

Which version of Textpattern are you using?

Offline

Board footer

Powered by FluxBB