Author Topic: how to change image alt text ??  (Read 7484 times)

0 Members and 1 Guest are viewing this topic.

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
how to change image alt text ??
« on: July 31, 2009, 07:22:12 AM »
Hi

how to change the image alt text ??

i want category description (cat_desc)  as image alt text

pls help

Rembrandt

  • Guest
Re: how to change image alt text ??
« Reply #1 on: July 31, 2009, 10:53:36 AM »
Hi!
...
 want category description (cat_desc)  as image alt text...

in categorie.php:
alt=\"".format_text($cat_cache[$cat_id]['cat_description'], 1, 0, 1)."\"

in HTML:
alt="{cat_description}"

mfg Andi

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: how to change image alt text ??
« Reply #2 on: August 02, 2009, 09:40:43 PM »
sorry

i want to display image description in images alt text

Rembrandt

  • Guest
Re: how to change image alt text ??
« Reply #3 on: August 05, 2009, 08:20:22 AM »
Hi!
Quote
i want to display image desc as alt text on thumbnails & detail page

search in templates/yourTemplates/media jpg.html:

alt
="{image_name}"

replace it with:

alt
="{image_description}"


search in includes/functions.php

 $site_template
->register_vars(array(
    
"image_id" => $image_row['image_id'],

add before:

$site_template
->register_vars("image_description"format_text($image_row['image_description'], 2));


search:

"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link),

replace it with:

"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'],$image_row['image_description'], $mode$show_link),

search:

function get_thumbnail_code($media_file_name$thumb_file_name ""$image_id$cat_id$image_name ""$mode ""$show_link 1$open_window 0) {

replace it with:

function get_thumbnail_code($media_file_name$thumb_file_name ""$image_id$cat_id$image_name ""$image_description "",$mode ""$show_link 1$open_window 0) {

search:

$thumb 
"<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".format_text($image_name2)."\" />";

replace it with:

$thumb 
"<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".format_text($image_description2)."\" />";

search:

$thumb 
"<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".format_text($image_name2)."\" />";

replace it with:

$thumb 
"<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".format_text($image_description2)."\" />";



mfg Andi

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: how to change image alt text ??
« Reply #4 on: August 06, 2009, 09:19:34 PM »
the same is working fine

tks alot