Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-06-03 20:22:06

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

[plugin] [ORPHAN] upm_category_image: Display image for category.

upm_category_image

Display image for category.

Last edited by uli (2013-01-24 17:10:24)

Offline

#2 2005-06-06 20:12:00

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

Hi Mary,

It sounds like a great plugin but I have a few questions that you may be able to clearify:

1) what should the format of the image name be? Based on the way TXP does it I assume something like My Thoughts would be My+Thoughts?
2) In the instance of displaying the image on the front page – say I have 5 articles on the front page, would it display the category image for all 5 entries, if they are different?
3) re: tags would this be correct:

<pre><txp: upm_category_image />
<txp: upm_category1_image />
<txp: upm_category2_image /></pre>

Thanks again

Offline

#3 2005-06-06 22:05:09

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

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

1.) Nope, just the same as the name. So a category of “My Thoughts”, the image’s name should also be “My Thoughts”.

2.) It will display all five, regardless to whether they are all different, or all the same.

3.) Yes.

I just updated the plugin, so you should make sure you have the latest version.

Offline

#4 2005-06-06 22:18:15

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

Hmm I haven’t been able to get it to work – i’m doing something wrong but not sure what, which doesn’t exactly narrow things down for get help.

Here’s the form I’m using it in:

<pre><h2><txp:posted /></h2>
<div class=“post”> <txp:upm_category1_image /><h3 class=“storytitle” ><txp:permlink><txp:title /></txp:permlink></h3> <div class=“meta”>Filed under: <txp:category1 link=“y” /> </div>
<br /> <div class=“storycontent”> <txp:etz_pg_body />
<txp:etz_pg_pages /> </div>

<div class=“feedback”> <txp:comments_invite /> </div></div></pre>

Offline

#5 2005-06-06 22:45:30

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

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

Okay, so the image(s) don’t appear at all? Have you got a live example I can see?

Offline

#6 2005-06-06 22:49:37

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

yep sure: http://www.sekhu.net/txp/

I’ve set them to display before title, following the sinstructions:

1. Create a new image category, named “upm_category_image”. (done) 2. Upload your images and their thumbnails (if you want the thumbnail feature). (uploaded images in gif format) 3. Rename your images to be the same name as the category you want them tied to. (used both “category name” and “category+name” format) 4. Assign each of your category images to the upm_category_image category (done) 5. Use the tags wherever you want the category images displayed. (done)

Is it possible it’s not liking the gifs?

Offline

#7 2005-06-07 01:19:25

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

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

Those steps are all correct.

I did notice one strange thing: all the images in your images folder – with the exception of head.png – are only 1kb in size. When I try to view them, I get a message about the images having errors in them. I don’t see how that could affect it, but you might want to try removing them, and try re-uploading.

Offline

#8 2005-06-07 05:56:58

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

> mary wrote:

> Those steps are all correct.

I did notice one strange thing: all the images in your images folder – with the exception of head.png – are only 1kb in size. When I try to view them, I get a message about the images having errors in them. I don’t see how that could affect it, but you might want to try removing them, and try re-uploading.

Hi mary – the images are purposely that small – I think the largest doesn’t even hit a k it’s about 784bytes. Make your site fast loading etc. THey’re not large or complicated images. I’ll try uploading them again and see if that makes any difference.

Something I personally noticed were that the images were attached or placed in the upm cat image dir setup, but didn’t appear as a number of images assigned to it. Additionally thumbnails weren’t created, which makes sense – i’m going to try the basic upload without the admin plugin.

Cheers

EDIT: Ok there seems to be a wierd Issue – I’m not sure if it’s a TXP bug, but I replicated the same image and it still failed to either display or generate in the admin area of TXP. So I then replicated the image in jpg format and it worked. Now it’s possible that TXP has issues with images under the following conditions:

transparent gif format
under 1k in size

I can’t confirm this, however. It’ll be interesting to see how it handles PNG format images.

I’ll try and test the images again thanks

EDIT2: Still no luck.

Upload images in jpeg format – confirmed they’re over 1k
Images display in admin panel
Image applied to the image cat – image cat does not display any number (is it supposed to?)
Cat name renamed from My Category to My-Category
Image name renamed as above
Image does not display

Last edited by sekhu (2005-06-07 06:22:54)

Offline

#9 2005-06-07 19:38:10

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

Your a godsend mary thank you so much for this. One thing I would like is the ability to apply a class to the img tag itself so I can turn off the wraptag.

Offline

#10 2005-06-07 20:47:39

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [plugin] [ORPHAN] upm_category_image: Display image for category.

I would love it if you could get category descriptions somehow.

Offline

Board footer

Powered by FluxBB