Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.1
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

bau_article_thumb

All it does is output an article thumbnail. I’m really not sure why txp:thumbnail doesn’t appear to work in RC3, but it really didn’t seem necessary with zem_article_thumb, until it broke in one particular instance for some strange reason that I couldn’t figure out.

So, I went back to the txp:article source code to find out how it worked. Basically, it returned the article ID number and added an image url string to locate the image in the default image directory. Since thumbnails are created in Textpattern with the addition of the letter “t”, it was just a simple matter of adding it to the url string.

That’s all it does.

To see how I’ve used it for a thumbnail gallery, you can see my page template

Article Request Count:
Initially released:
2005-04-08
Posted here:
08 Apr 2005

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (6)

Thanks for this – I could not figure out why txp:thumbnail didn’t do what I thought it would do.

Thanks,

Alvin…
I needed the thumbnail to link to the full image – I already added that to my local copy, but it might be a good idea to add that feature.
I installed the plugin and it works fine. Many thanks.

I also hacked the code, changing all instances of style to class.

Which means, for example, I can use the following in my TXP forms:

< txp:bau_article_thumb class = "thumb" />

Which will output:

< img src = "http://localhost:8007/images/1t.jpg" alt = "A lovely car" class="thumb" />

Which renders a lovely thumbnail floated to the left when using this CSS:

.thumb {
float: left;
margin: 0 10px 10px 0;
border: 2px solid #ccc;
}
alex:
PS works with TXP v. 4.0.1
Awsome! Such a simple functionality, but so useful.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern