How to change the alt & title attributes for stored imag

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
agemmell
Posts: 22
Joined: Tue 7. Mar 2006, 20:05

How to change the alt & title attributes for stored imag

Post by agemmell »

Hello again friendly, helpful phpwcms forum!

I've added a couple of images to my site using the "test w/image" content part. The image is stored in the database via the lovely phpwcms file upload facility.

My question/problem is that I have no control over the alt & title tags when I add an image in this way. Instead it defaults to the image name so I get a rather ugly "filename.gif" tooltip whenever I hover over that image!

Is it possible to change the alt/title attributes to a different value when using a "text w/image" content part? How do I do this?

Or is the only way to specify an alt/title value to set it implicitly by using an image RepTag?

Thanks.
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

use the imagecaption-field of the images in the following way

For the imagecaption under the Image:
Imagecaption

For an imagecaption and an alt-Text:
image-caption|alt-Text of the Image

For an imagecaption + alt-Text + jump to another page inside your Site, in the same window:
image-caption|alt-Text of the Image|index.php?ALIASNAME

For an imagecaption + alt-Text + jump to another page outsite of your Site, in the same window:
image-title|alt-Text of the Image|http://url.de

For an imagecaption + alt-Text + jump to another page outsite of your Site, in a new window:
image-caption|alt-Text of the Image|http://url.de _blank

If you wann have only an alt-Text use:
|alt-Text

If you wann have an internal link without caption or alt-text use:
||index.php?ALIASNAME

and so on......


If you need more than one Image... take as many lines as images :idea: :idea:
Each image must have its own Line :idea: :idea:
Last edited by pepe on Thu 9. Mar 2006, 19:01, edited 3 times in total.
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

That I know there is no way to put the title attribute but the ALT is easy ;)

just put

Code: Select all

|YOUR_TEXT
in caption field
(for title attribute you can hack the core code but is it worth it?)

Cheers

EDIT: WOW pepe was faster and more complete :D
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Hi Kosse... and in ENGLISH... :roll: ..............I'm learning :oops:

And: 17-18 minutes "reaction-time" ... wow what a forum :wink:
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

LOL :D ~yes you are!~ CLAP CLAP
If I have to do a post lik eyours with colors, bold and in german you can... go have a coffee, walk your dog, watch night program and come back... ;)

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

Post by flip-flop »

Hi pepe,

I have added your post at the faq-page. http://www.faq.phpwcms-docu.de/15_53_en.html

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
agemmell
Posts: 22
Joined: Tue 7. Mar 2006, 20:05

Post by agemmell »

Thank you all - especially pepe. Gold star, well done!
Post Reply