Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2007-01-04 22:22:34

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

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

…or a single thumbnail when showing current category (?c=myCat) and when using upm_category_image…

That is how upm_category_image is supposed to work: it displays an image for the currently viewed category.

As for the rest… v.0.5.1

Last edited by Mary (2013-01-24 17:32:36)

Offline

#86 2007-01-05 15:39:02

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

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

Bang !
It works, first time…
Thanks a lot Mary…


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#87 2007-01-05 16:38:43

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

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

Mary,

One last thing…
Would it be possible to use as title not the category but the alt text specified in the dedicated image field ?
I tryed to edit your plugin myself, the upm_category_image_list part of it, and tryed to change the title attribute from:

title="' .$row['cat_title'].'"';

to

title=\"{$alt}"".

Without any luck…
What can I change to achieve this ?

Last edited by hablablow (2007-01-05 16:40:32)


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#88 2007-01-06 19:05:42

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

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

The image’s alt text is already automatically added. And you can turn off titles.

Offline

#89 2007-01-21 14:49:58

Saigo
Member
Registered: 2005-01-02
Posts: 60
Website

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

Hi Mary,

I’m fairly new to coding so please bear with me. I’ve been reading the documentation of your plugin and some TXP resources and posts in this forum but for the life of me I can’t get what I want in mind to work.

I want to list out titles of movies in an alphabetical order (with short excerpts, but I can worry about that later), with the image of the category the movie is in below it.

I have a form called “movies_alphabetical” (not really that creative, I realised that), with the following code:

<txp:if_different><h3><txp:php>echo substr(title(array()), 0, 1);</txp:php></h3></txp:if_different>

<li><txp:permlink><txp:title /></txp:permlink></li>

<txp:upm_category_image_list break=“li” wraptag=“ul” />

I have also replaced the upm_category_image tag with:

<txp:if_article_category name="3 stars" number="1"> <img src="/images/3 stars.gif" /> </txp:if_article-category>

but that doesn’t work either. (That current article I have in is in a ’3 stars’ category, hence the code above as I wanted to test if it will output the image. It didn’t.)

I have also followed the step-by-step instructions closely, renaming my image without the .gif extension, etc.

I have spent 5 hours now on this and am close to tearing my hair off. I’d really appreciate any enlightening on my predicament!

Last edited by Saigo (2007-01-21 14:55:23)

Offline

#90 2007-01-22 20:49:51

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

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

</txp:if_article-category>

That tag is incorrectly named.

name="3 stars"

That might be contributing to the problem, having a space in the category’s name rather than its title.

Offline

#91 2007-01-23 05:54:58

Saigo
Member
Registered: 2005-01-02
Posts: 60
Website

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

Thanks Mary! I must’ve been horribly tired, didn’t spot that.

But that didn’t solve the problem though, ‘cause the image still wouldn’t appear. Again, I’m reposting the code below in the form “movies_alphabetical”. Did I do anything wrong to it?

<txp:if_different><h3><txp:php>echo substr(title(array()), 0, 1);</txp:php></h3></txp:if_different>

<li><txp:permlink><txp:title /></txp:permlink></li>

<txp:if_article_category>
<txp:if_individual_article>
<txp:upm_category1_image break="li" wraptag="ul" height="yes" />
</txp:if_individual_article>
</txp:if_article_category>

The if_individual_article is added as I found Els (or was it another person?) advising it to another guy who has the same problem as me (through searching the forum). Again, that doesn’t work. :/

Offline

#92 2007-01-24 15:29:41

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

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

You won’t need the if_individual_article tag – you use that when you want to use an article form tag outside of a form (which only makes sense in the context of an individual article).

First, view source: is anything (partial XHTML perhaps?) output by the tag? Next, change your debug mode to Testing: any warnings?

Offline

#93 2007-01-25 06:08:01

Saigo
Member
Registered: 2005-01-02
Posts: 60
Website

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

Hi Mary,

Thanks for being so patient with me.

I’ve now removed the if_individual_article tag. I’ve also checked the source and there is nothing in particular that may refer to the category image. Debug mode does not reveal any errors or warnings either.

Here’s a link to the list page concerned.

Currently, my movies_alphabetical form resembles the following:

<txp:if_different><h3><txp:php>echo substr(title(array()), 0, 1);</txp:php></h3></txp:if_different>

<li><txp:permlink><txp:title /></txp:permlink></li>

<txp:if_individual_article>
<txp:upm_category1_image break="li" wraptag="ul" height="yes" />
</txp:if_individual_article>

Last edited by Saigo (2007-01-25 06:10:50)

Offline

#94 2007-01-25 17:18:10

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

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

I’ve now removed the if_individual_article tag… Currently, my movies_alphabetical form resembles the following…

Uh, it looks like you removed the if_article_category_tag, not the if_individual_article tag.

Once you’ve definitely got that straightened out, then let’s walk through all the steps. First, what is the name (not title) of the Category1 of the article “Blood Diamond (2006)”? Next, look at the image you want to represent that category. Does it’s name match that of the category exactly (with no file extension)?

Offline

#95 2007-01-26 21:01:06

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

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

According to the tag trace of your page, you have not assigned the category 45-stars to that article:

<txp:if_article_category>
	[<txp:if_article_category>: false]
</txp:if_article_category>

Offline

#96 2007-01-27 03:04:28

Saigo
Member
Registered: 2005-01-02
Posts: 60
Website

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

OK, I saw two duplicate copies of my previous forum post so I removed one of them, but now both of them disappeared. o_O If anyone else happens to be following this particular topic, this is to let you know.

Anyhow, that article has been assigned the 45-stars category (the name, and not title, right? Because what appears in the ). Here’s a collage of the three different relevant pages, just to double confirm it again:

I have also changed the title of the category to 45-stars as well, but nothing is appearing, and the tag trace shows the same thing, it being ‘false’. (I then reverted the category title to 4.5 stars)

Last edited by Saigo (2007-01-27 03:05:16)

Offline

Board footer

Powered by FluxBB