Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [superseded] rah_aimage

#1 2007-12-11 16:55:11

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

[superseded] rah_aimage

Since Textpattern v4.3.0, built-in image tags have allowed much more customization and can be used to do what rah_aimage offered.

To display a linked image, where link’s target is taken from image’s alt field:

<txp:if_article_image>
	<txp:images>
		<a href="<txp:image_info type="alt" />">
			<txp:image_url />
		</a>
	</txp:images>
</txp:if_article_image>

Last edited by Gocom (2012-07-24 22:27:46)

Offline

#2 2010-01-31 19:01:14

jonlandrum
Member
From: Shi'Kahr
Registered: 2009-11-26
Posts: 35
Website

Re: [superseded] rah_aimage

How would I fill an alt attribute and a title attribute for images I’ve uploaded via FTP? Could I perhaps use a custom field for alt and another for title, and in the <txp:rah_aimage /> tag do something like alt="<txp:custom_field name='alt' />" caption="<txp:custom_field name='title' />"? Or would that even work?


\\//_ Live long and prosper.

Offline

#3 2010-02-02 11:30:19

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_aimage

Hi, Jonathan got your email and noticed your post here :-)

jonlandrum wrote:

How would I fill an alt attribute and a title attribute for images I’ve uploaded via FTP?

You mean images that are imported into TXP’s database or just on the server? Yes,

alt='<txp:custom_field name="alt" />' caption='<txp:custom_field name="title" />'

will work if you need it. But only if the image is not stored inside the DB. Default values are applied only when the image doesn’t have the information, meaning isn’t stored inside TXP’s image management.

Note that probably only reason you would want to use this plugin, rah_aimage, is if you want to link the images to somewhere by placing URL to the image’s alt field.

Offline

#4 2010-02-06 03:26:37

jonlandrum
Member
From: Shi'Kahr
Registered: 2009-11-26
Posts: 35
Website

Re: [superseded] rah_aimage

Thanks for your reply, Jukka. I don’t have my images in the database because I didn’t want them named “1.jpg, 2.jpg, 3.jpg …” But now I don’t have a way to set the title and alt attributes. So I was hoping this plugin would give me that functionality.

Last edited by jonlandrum (2010-02-06 03:27:08)


\\//_ Live long and prosper.

Offline

#5 2010-05-03 10:12:10

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: [superseded] rah_aimage

Okay, could someone offer up a working Article or Page tag example that would link an image within my images folder (e.g.: images/sampleimage.jpg) that would utilize the “usealturl” backend url option?

I’ve tried this tag on my Page:
<txp:article_image link=“1” usealturl=“1” /> (I’ve also tried it with only: <txp:article_image />)

Then, in my TXP Images manager, I have placed a url (i.e.: http://testweb.com) within the “Alternate text” field.

Then, in my Article, within the “Article image” field, I have the coorisponding number (7) entered there.

Help!

Last edited by laptophobo (2010-05-03 10:14:05)


Living the Location-Independent Life: www.NuNomad.com

Offline

#6 2010-05-03 10:30:39

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [superseded] rah_aimage

It’s named txp:rah_aimage, not txp:article_image
Does that change anything?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2010-05-03 10:36:15

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: [superseded] rah_aimage

Hi, I meant to write: <txp:rah_aimage link=“1” usealturl=“1” />
And sorry, no, it didn’t change anything.

:-}

Last edited by laptophobo (2010-05-03 10:36:35)


Living the Location-Independent Life: www.NuNomad.com

Offline

#8 2010-05-03 11:22:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: [superseded] rah_aimage

an image within my images folder (e.g.: images/sampleimage.jpg)

if you’ve uploaded that image via the txp images tab, txp always renames the images to a number. Images with other names you have to link manually as they’re not stored in the system.


TXP Builders – finely-crafted code, design and txp

Offline

#9 2010-05-03 11:44:04

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: [superseded] rah_aimage

Well, the thing is is that I’ve tried it both ways. Using the TXP number and the actual file name.
Do you have an example to show me?


Living the Location-Independent Life: www.NuNomad.com

Offline

#10 2010-05-03 12:10:18

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_aimage

  1. The string inserted into article image field must be a singular image ID. For example 24. No extensions or file names.
  2. The string inserted into the image’s Alt field under Image manager must only contain the url address. The address must start either with www. or http://.
  3. The tag example, <txp:rah_aimage link="1" usealturl="1" /> works just fine. For example the image on this page is linked with the tag.

Offline

#11 2010-05-04 02:00:37

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: [superseded] rah_aimage

Gocom,

Yes, thanks for that. I just tried the tag: <txp:rah_aimage link=“1” usealturl=“1” /> within my Article and it works correctly.

However, when I place the same tag within the Page, the image views but the web address function does not work.


Living the Location-Independent Life: www.NuNomad.com

Offline

#12 2012-03-27 10:08:33

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [superseded] rah_aimage

code below works until i add another image into article image field. no multiple images support?

<txp:rah_aimage link="1" usealturl="1" thumbnail="1" title="0"  class="partners-logos" />

and html it outputs after adding another image

<a href="http://www.sporditeip.ee/images/" rel="external"><img src="69,70" alt="" class="partners-logos" /></a>

Last edited by Gallex (2012-03-27 10:16:04)

Offline

  1. Index
  2. » Archives
  3. » [superseded] rah_aimage

Board footer

Powered by FluxBB