forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: FIREBOX on December 17, 2005, 10:36:21 pm

Title: Caption in Alt Tags ?
Post by: FIREBOX on December 17, 2005, 10:36:21 pm
Is it possible to change the alt tags from the filename, date created, dimensions etc. to show the caption
Title: Solved
Post by: FIREBOX on December 30, 2005, 08:06:37 pm
Mod to Show Image's Description in Thumbnail View as ALT Tag

Step 1

  open,   /include/functions.inc.php
 
  find (near the bottom of the page) :

Code: [Select]
  $pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
  $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
  $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
  $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);
 
  and replace it with :
 
Code: [Select]
  $pic_title =$lang_display_thumbnails['caption'].$row['caption'];


Optional Step

  If you want to show a word such as 'Description : ' before the image's caption without it apperaing
  in the preview text then,   open  /lang/english.php

  Find : File include/functions.inc.php, about 6 or 7 lines down you will find

Code: [Select]
  $lang_display_thumbnails = array(
  'filename' => 'Filename : ',
  'filesize' => 'Filesize : ',
  'dimensions' => 'Dimensions : ',
  'date_added' => 'Date added : ', //cpg1.3.0
  );

  change it to :

Code: [Select]
  $lang_display_thumbnails = array(
  'caption' => 'then the text you want here',
  );

 

  This mod has only been tested on CPG 1.3x,

  Any Problems just reply