Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: alt tag for pictures  (Read 2969 times)

0 Members and 1 Guest are viewing this topic.

sbouilland

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
[Solved]: alt tag for pictures
« on: March 26, 2009, 04:07:53 pm »

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 !
« Last Edit: March 27, 2009, 12:39:23 pm by Joachim Müller »
Logged

Nibbler

  • Guest
Re: alt tag for pictures
« Reply #1 on: March 26, 2009, 04:26:46 pm »

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

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

change to

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

Use the french support section if you prefer.
Logged

sbouilland

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: alt tag for pictures
« Reply #2 on: March 27, 2009, 07:58:21 am »

Thank you very much, I will try this right now !
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.