Page 1 of 1
alt beim Image Tag
Posted: Thu 11. May 2006, 18:58
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.
Posted: Thu 11. May 2006, 19:27
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.
Posted: Thu 11. May 2006, 20:03
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
Posted: Thu 11. May 2006, 20:04
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
but only for cp pictures !!
Jürgen
Posted: Thu 11. May 2006, 20:09
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:
Gruß Knut
Posted: Thu 11. May 2006, 20:23
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. ???
Posted: Thu 11. May 2006, 20:24
by larmann
Thank you Knud, that's what I was looking for!
Posted: Sun 14. Jan 2007, 16:05
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
Posted: Sun 14. Jan 2007, 17:10
by flip-flop