alt beim Image Tag

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

alt beim Image Tag

Post by larmann »

Hi there

a little question: I inserted an image via IMAGE tag. No problem. But if I want to give an ALT to that image I get stucked. Where do I have to place the alt text for that image?

Thanks for your support.
User avatar
Klappstuhl28
Posts: 833
Joined: Fri 4. Mar 2005, 01:58
Location: Hamburg
Contact:

Post by Klappstuhl28 »

Just add:

<img src="pathtoyourpicture/yourpicture.gif" alt="MY ALT TEXT" width="if needed" height="if needed" border="0">

This is what the tag will do.
Last edited by Klappstuhl28 on Thu 11. May 2006, 20:26, edited 1 time in total.
Lars

Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Hi Klappstuhl 28,

well, what you are writing there is just normal HTML. My point was a different one:

You know this one: {IMAGE:icon/DateiDownload.jpg}
And you know this one: {IMAGE_LEFT:imagename}

Isn't there anything like {IMAGE_LEFT:imagename _alt="MY ALT TEXT"} ?

In the source code there is the alt="", but I don't know haw to place something in there.

No idea?

thanx
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hello

Picture + Alt-Text + Link to target on same Site, in the same window:
Pic-Text|Alt-Text of Pic|index.php?ALIASNAME


this is stolen from:

http://faq.phpwcms-docu.de/12_53_de.html

:wink:

but only for cp pictures !!

Jürgen
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hello Veit,

one possibility is a patch at the front.func.inc.php. Thats my solution:
{IMAGE:picture.gif:picture name} - and so on. (Generating an alt- and title text).

Code: Select all

	// kh 160805 Alle non db images mit vspace="0" hspace="0" ergänzt
	// insert non db image standard
//	$search[7]		= '/\{IMAGE:(.*?)\}/';
//	$replace[7]		= '<img src="picture/$1" border="0" alt="" />';

	// insert non db image:{IMAGE:image.ext:alt text} ----------KH (flip-flop) 24.04.2006
	$search[7]		= '/\{IMAGE:(.*?):(.*?)\}/';
	$replace[7]		= '<img src="picture/$1" border="0" vspace="0" hspace="0" alt="$2" title="$2" />';
	
	// insert non db image left
	$search[8]		= '/\{IMAGE_LEFT:(.*?):(.*?)\}/';
	$replace[8]		= '<img src="picture/$1" border="0" vspace="0" hspace="0" align="left" alt="$2" title="$2" />';
	
	// insert non db image right
	$search[9]		= '/\{IMAGE_RIGHT:(.*?):(.*?)\}/';
	$replace[9]		= '<img src="picture/$1" border="0" vspace="0" hspace="0" align="right" alt="$2" title="$2" />';
	
	// insert non db image center
	$search[10]		= '/\{IMAGE_CENTER:(.*?):(.*?)\}/';
	$replace[10]		= '<div align="center"><img src="picture/$1" border="0" vspace="0" hspace="0" alt="$2" title="$2" /></div>';
	
	// insert non db image right
	$search[11]	 	= '/\{SPACER:(\d+)x(\d+)\}/';
	$replace[11] 	= '<img src="img/leer.gif" border="0" vspace="0" hspace="0" width="$1" height="$2" alt="" />';
// // kh 160805 Ende patch 
Have a look too:

Code: Select all

www. phpwcms.planmatrix. de/
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Klappstuhl28
Posts: 833
Joined: Fri 4. Mar 2005, 01:58
Location: Hamburg
Contact:

Post by Klappstuhl28 »

I don´t no where you want to place it.

Knut´s solution will work. If you use it in the templates add
it and that´s it. I don´t know where this should be a problem.
The time i use to write the tag i write the code. ???
Lars

Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Thank you Knud, that's what I was looking for!
velo
Posts: 38
Joined: Sun 29. May 2005, 14:48

Post by velo »

Couldnt find it in another topic, but is there a way to add an ALT text to pictures in the summary? So not with a rt but with a picture from the database.

greetz

Velo
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi velo,

please have a look: http://faq.phpwcms-docu.de/content/15/5 ... -link.html

Regards Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply