Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Mary,
I am trying to have my first go here. But no worky.
Here are my forms, page, cats, etc.
page is:
<code>
<ul><txp:article_custom form=“cat-image” /></ul>
</code>
form is:
<code>
<txp:permlink><upm_category_image_list break=“li” xhtml=“yes” /></txp:permlink>
</code>
I have tried with and without permlink tags. I have tried all three possible article tags. (in this form)
images have been renamed:
glass, photo, video, audio, painting, sculpture, mixed
article categories are:
glass, photo, video, audio, painting, sculpture, mixed
appropriate images are given image category of : upm_category_image
and yet, I still get nothing.
I tried changing the article_custom form to just article, but that didn’t effect it either?
FURTHERMORE: I checked the source code and got this:
<code>
<a href=“http://www.artiswork.org/index.php?id=33” title=“Permanent link to this article”>
<upm_category_image_list break=“li” xhtml=“yes” show=“used” />
</a>
</code>
Which would suggest that it is pulling articles? rather than images? Just a guess?
Any ideas?
Matthew
Last edited by ma_smith (2005-09-02 18:45:44)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#38 2005-09-02 20:26:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
You were close: <code><txp:upm_category_image_list break=“li” wraptag=“ul” /></code>.
Edit: don’t forget to tell it to be context-sensitive.
Last edited by Mary (2005-09-02 20:26:49)
Offline
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Mary,
Thanks. I got the images to display! This is good. However it is repeating too many?
Look here to see how its acting. I think it may have something to do with the fact that I am using messy urls? My host doesn’t support mod-rewrite, is there a good way around this – the forum seems to give sort of spotty answers to this.
Currently the images link to http://artiswork.org/work-ms/?c=video for instance, whereas I need them to link to http://artiswork.org/?s=work-ms/?c=video ( I think )
I have three articles in section “work-ms” (one in the video cat, and two in the mixed cat).
Any idea why its displaying so many?
I don’t know if it matters or not, but on the help page of your plugin you have not include the <code>txp:</code> prefix to the upm_category_image tag.
Last edited by ma_smith (2005-09-02 22:09:11)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#40 2005-09-02 23:07:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
> “I don’t know if it matters or not…”
Whoops. It does. Thanks for telling me.
> “My host doesn’t support mod-rewrite, is there a good way around this?”
Nope, sorry. I’m afraid you won’t be able to use clean urls.
<txp:upm_category_image_list break="li" wraptag="ul" link_section="yes" show="used" />
I think maybe you’ve put it in an article form? Don’t. ;) It’s meant as page or miscellaneous form tag.
By the way, I noticed that the markup you’re getting for your thumbs at the bottom isn’t nested properly: links surrounded the list element, when it should be the other way around. Check the form(s) and tag(s) you’re using.
Let me know if you have further trouble.
Offline
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Mary,
The images are displaying perfectly. Too bad your plugin doesn’t tell me how to design my category images! :)
Its great!
The next thing I need to know now, is if this will work for messy urls? ie: can you give it an option to make the section messy as well? (the category option is already there of course.) again, here is an example: http://artiswork.org/?s=work-ms/?c=video Ahh. I just realized that’s not how it works? Hmm. How can I get it to work?
to reiterate: When someone clicks category “video” I want to show articles in section=“work-xx” that have the category of video, one at a time, and with the appropriate thumbs of those articles under the heading Artist: Matthew Smith (for instance).
Thanks,
Matthew
Last edited by ma_smith (2005-09-03 03:03:22)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#42 2005-09-03 04:15:42
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
In your artists page, do something like
bc..<txp:if_category>
<txp:article form=“category-list-form” /><txp:else />
<txp:article form=“individual-form” /></txp:if_category>
article is context-sensitive, which means it will already show just articles from that category if you ask for them. All you need to do is tell it how to display them. By default, the display isn’t any different.
The if_category looks to see if you are trying to view a category – by not handing the tag a specific category name to look for, it will just look for the presence of any category. If you are, it will use the one form to show them. If you’re not, then it will use the other. And of course you’d customize your forms, and add whatever parameters to your tags that you need.
The url problem: the plugin is supposed to figure out your url scheme, then generate the correct url. So it looks like you found a bug for me. Fixed version now available to download.
Offline
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Mary,
I just updated to textpattern 4.0.1 from RC3 and also updated your plugin to the current version. I am using the upm_category1_image tag to display the images on my front page. Since I updated the images are no longer showing up.
Any idea why this would be?
Refresh Dallas and other Refreshing Cities.
Offline
#44 2005-10-12 23:05:07
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Nope. ‘tis troubleshooting time. :) Does nothing get output in the source at all? If you temporarily set your site production mode to ‘debug’ do you get any errors or warnings?
Offline
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Yep, here are the errors:
<code>
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: img_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: cat_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: img_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: cat_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: img_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: cat_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: img_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: cat_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: img_table
tag_error <txp:upm_category1_image width=“yes” height=“yes” class=“category-img” thumb=“no” link_section=“no” /> -> Notice: Undefined variable: cat_table
</code>
Refresh Dallas and other Refreshing Cities.
Offline
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
Also, is it correct to have the preferences for upm_img_popper in the txp “preferences” tab. Stuff like upm_img_popper_show_class which is already in the “extensions” tab?
Same thing with rss_live_archive even though the plugin has been removed.
Here is an image
Last edited by tinyfly (2005-10-13 21:29:21)
Refresh Dallas and other Refreshing Cities.
Offline
#47 2005-10-13 20:17:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
I’ll look into it shortly.
Offline
#48 2005-10-13 23:04:41
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_category_image: Display image for category.
My bad. This should be fixed now.
Offline