Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-04 16:18:25

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

article images

HI there,

I have a home page that contains 3 excerts of articles. When clicked upon you’re taken to the individual article page.

I want to 1. Know how to post an image along with the article and secondly if i could show a thumbnailed version of the image in my excert.

I would have no problems with styling the image the way i want once i work out how to get it in to the article so its just how to do that mainly

Thanks for any suggestions

Offline

#2 2006-09-04 17:09:41

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: article images

When you’re on the ‘write’ tab to create/edit an article, select the ‘advanced options’ on the left. There’s room to enter the URL or ID of a single image there. In the page/template for the article (and probably in the body/excerpt of the article as well), you can use the <a href=“http://textbook.textpattern.net/wiki/index.php?title=Txp:article_image_/”>txp:article_image</a> tag to display that image in full size or its thumbnail.

Other option if you prefer textile or have a varying number of images to display: in the body, use <notextile><code>!/images/1.jpg!</code></notextile> and in the excerpt use <notextile><code>!/images/1t.jpg!</code></notextile> (‘t’ for ‘thumbnail’)

Offline

#3 2006-09-04 21:29:03

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

Re: article images

HI there Ruud,

Great thanks for that. Ive got the article image working fine but it doesnt seem to display a thumbnail in my excert. Ive used this code in my form:

<code><txp:article_image thumbnail=“1” /></code>

but it doesnt seem to work….?

Offline

#4 2006-09-05 00:02:27

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

Re: article images

That little [4.0.4] next to the attribute on the wiki means the attribute is not yet available.

Offline

#5 2006-09-05 07:42:09

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

Re: article images

So i cant create a thumbnail for the excerpt page then? Is there any other way to do it?

Offline

#6 2006-09-05 12:45:14

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: article images

Yes, insert <txp:thumbnail id="imageid#" /> into the excerpt field. bas_img_selector and upm_img_popper simiplify this task, so you don’t need to know the id.

Offline

#7 2006-09-05 14:34:09

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: article images

Offline

#8 2006-09-10 13:48:28

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

Re: article images

hi els,
thanks for the reply.

Ive tried installing the plugin and coding it like this in to my form which acts as both form for the excerpt page and the individual article page. What i want is the thumbnail on the excert page and the full sized image on the individual article page.

Heres my form with the wet tag in there but its not working. Also do you use <code><txp: article_image /></code> to display the full image on the individual page?

<code>

<txp:if_article_list>

<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:wet_article_thumb />
<p class=“info”><txp:posted /> by <txp:author /></p>
<txp:excerpt />
<txp:if_comments>
<p class=“comments”><txp:permlink>read on…</txp:permlink></p>
<p class=“info”><a href=”<txp:permlink />#discuss” class=“comments”>Comments (<txp:comments_count />)</a></p>

<txp:else />

<txp:if_comments_allowed><p><a href=”<txp:permlink />#discuss” class=“comments”>make a comment</a></p>
<txp:else /></txp:if_comments_allowed>
</txp:if_comments>

</txp:if_article_list>

<txp:if_individual_article>
<h2><txp:title /></h2>
<p><txp:posted /></p>
<txp:body />
<txp:if_comments>
<h2>Make a Comment</h2><div id=“comments”><p><txp:comments /></p>
</txp:if_comments>
</txp:if_individual_article></code>

Any ideas?

Offline

#9 2006-09-10 16:59:43

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: article images

Yes, <txp:article_image /> should be used to display the full image.

As far as I can see, this code should work. Did you activate the plugin? Did you enter the image id in the article image field under Advanced options? Did you create a thumbnail?

Offline

#10 2006-09-10 17:10:09

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

Re: article images

Hi els,

Thanks for the reply.

Ive activated the plugin. I entered the id of the image im using in advanced options( ive literally entered the article no and nothing else, thats right isnt it?). I havent created a thumbnail though?! I thought the plugin generated the thumbnail?! do i have to create it then?

Offline

#11 2006-09-10 19:29:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: article images

Hi elduderino,

That’s right, in the article image field should just go the image id, e.g. 4. You can find the id in the images list, by hovering over the image name, you can see it in the status bar.

Thumbnails are not created by the plugin. You can either create one yourself on your computer and upload it in the image upload screen (“Upload thumbnail”), or let Textpattern create one by entering width and height (and crop yes/no) (“Create thumbnail”).

Offline

#12 2006-09-10 20:16:10

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

Re: article images

Hi,

Ahhh! Im sorry ive never noticed that bit on the next page after you hit upload! Unfortunatley it still doesnt work. I dont know where the problem is. Im using the code in my form above now with this added to the bit at the bottom:

<code><txp:if_individual_article>
<h2><txp:title /></h2>
<p><txp:posted /></p>
<txp:article_image />
<txp:body /></code>

No image shows. I dont get it. Do i need something in my page template apart from directing txp towards this form?

Offline

Board footer

Powered by FluxBB