Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-04-13 20:52:07
- Neko
- Member
- Registered: 2004-03-18
- Posts: 458
The easiest way to link an image?
Hi. I was wondering what’s the easiest way to link an uploaded via TXP image within an article.
Like I write
It was a really nice day in Milan
and the link returns the actual full-size image.
I’ve tried linking the TXP image tag but doesn’t work, nor works Textile or HTML.
Any idea?
Thanks in advance,
-Neko
Last edited by Neko (2006-04-13 20:52:40)
Offline
#2 2006-04-13 21:20:48
- whatbrick
- Member
- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: The easiest way to link an image?
Are you sure the link to the image points to the correct location? If HTML (<a href="image.jpg">link</a>
) doesn’t work, then it isn’t a TXP problem. Maybe the image name is wrong, or maybe the image wasn’t put on the server.
What exactly do you mean by “doesn’t work”? Does it return a 404 error or something else?
Both Textile and TXP image tags produce a full img
tag (<img src="image.jpg" />
) so you can’t use that in an href. A textile link to an image would be something like this: <notextile>link;. That would output <a href="/image/someimage.jpg">link</a>
.
Do you have a real-world example that you can show us? It would help us pin-point what the problem may be.
Just some random thoughts to help…hopefully.
Do not taunt the Markup Monkey!
Offline
#3 2006-04-13 21:27:27
- Neko
- Member
- Registered: 2004-03-18
- Posts: 458
Re: The easiest way to link an image?
Well, I upload an image, then I click the write tab and write some words, then I wanna make a link to the image, like this:
<notextile>Holy crap image tag</notextile> (space added just in this example, #@*%& Textile)
but the result is obviously all messed up. Now, I’m trying to help out a person who’s pretty much inexperienced about computers and stuff and wants to publish his blog about cycling. I was thinking about the easiest way to make him able to link images. A plug-in is welcome too.
Last edited by Neko (2006-04-13 21:35:06)
Offline
Re: The easiest way to link an image?
Not being an expert in anything much, I think even I can see the problem here:
<pre>Holy crap image tag</pre>
is not the right Textile for displaying an image (as far as I know).
<code>!http://www.textism.com/common/textist.gif(Textist)!</code>
is what is displayed in the Textile help on the ‘Write’ tab.
Or, of course you could upload the image via the ‘Images’ admin interface, find out the image db number (eg: 2), place that number in the ‘Article Image’ field under ‘Advanced Options’ on the Write tab, then in your article (or article form) use <code><txp:article_image /></code> to display the image.
Forgive me if I’m misunderstanding your question.
Offline
#5 2006-04-13 22:16:13
- whatbrick
- Member
- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: The easiest way to link an image?
My understanding of what Neko is trying to accomplish is a text link to an image. Using a Textile img tag, a TXP image tag, or the TXP article_image tag all produce a full HTML image tag (<img src="image.jpg" />
for example). Those cannot be used in an href or it would produce something like this: <a href="<img src="image.jpg" />">crap</a>
which will not work.
Have you tried <a href=“http://forum.textpattern.com/viewtopic.php?id=8563”>upm_img_popper</a>? It may have what you need.
Do not taunt the Markup Monkey!
Offline
#6 2006-04-13 23:19:52
- Neko
- Member
- Registered: 2004-03-18
- Posts: 458
Re: The easiest way to link an image?
Yes, yes, sorry for messing up with my request, I’m lucky that whatbrick understood what I wanted. :)
Well, all I wanna do is to place a link to the URL of an image, like <code><a href=“http://somesite.com/images/19.jpg”>Milan</a></code> and I want it to be easy to accomplish since the guy who’ll run the blog is a 60-ish old man and knows near to nothing about computers.
And thanks, I’ll try Mary’s plug-in, but if something else comes in mind I’m all ears.
Thanks,
-Neko
Last edited by Neko (2006-04-13 23:20:11)
Offline
Re: The easiest way to link an image?
Hi,
what about something like:
<notextile><code>Milan;
is it to complicated?
The old man will only need to remember the /images/image_id, and the way to link with textile.
Offline
#8 2006-04-14 18:48:35
- Neko
- Member
- Registered: 2004-03-18
- Posts: 458
Re: The easiest way to link an image?
Offline
Pages: 1