Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Caption in Alt Tags ?  (Read 3132 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.023 seconds with 20 queries.