[Solved]: alt tag for pictures [Solved]: alt tag for pictures
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

[Solved]: alt tag for pictures

Started by sbouilland, March 26, 2009, 04:07:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sbouilland

Hi !

In order to get a better referencement of my pictures with google, I would like to replace the text "clic to enlarge" in the "alt" tag of the picture. I would like to write the title ou description (comming from IPTC) in this tag.

For the moment, here is what I have in the generated source code :
<a href="javascript:;" onclick="MM_openBrWindow('displayimage.php?pid=99&amp;fullsize=1','108313504249cb97cf21c82','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=505,height=335')"><img src="albums/ImportPhotos/Brumes%20Picardes/Brumes_03.jpg" class="image" border="0" alt="Cliquez pour voir l'image en taille réelle" /><br /></a>

I would like to replace "Cliquez pour voir l'image en taille réelle" by the image title.

Is there a way to do this ?

Sorry for my bad english and many thanks by advance for your help !

Nibbler

Copy theme_html_picture() from the sample theme.php to your custom theme.php, find


$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";


change to


$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$CURRENT_PIC_DATA['title']}\" /><br />";


Use the french support section if you prefer.

sbouilland

Thank you very much, I will try this right now !