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: Caption in Alt Tags ?  (Read 3059 times)

0 Members and 1 Guest are viewing this topic.

FIREBOX

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
Caption in Alt Tags ?
« 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
« Last Edit: December 30, 2005, 08:11:23 pm by TranzNDance »
Logged

FIREBOX

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
Solved
« Reply #1 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
« Last Edit: December 30, 2005, 08:58:31 pm by GauGau »
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.