coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: ibhuntin on April 06, 2007, 03:15:54 PM

Title: Disable Thumbnail Alt Text
Post by: ibhuntin on April 06, 2007, 03:15:54 PM
I am using Coppermine on a site of mine and would like to disable the alt text on the thumbnails so that the file name, size and other information do not show when the mouse is hovered over the image.  Can anyone tell me if there is a way to do this through the configuration or admin tools (I have looked but not found one) or where in the files/directory I can go to find the code that establishes the alt text? 

Thanks in advance.
Title: Re: Disable Thumbnail Alt Text
Post by: Sami on April 06, 2007, 06:44:56 PM
It's not recommended to change core files at all,
BTW you can edit {gallery-root}/include/functions.inc.php file & change display_thumbnails function (around line #1706)

change this:

                        $thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";


to this:

                        $thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\" title=\"\"/>";


keep in mind that you should have alt attribute for html validation
Title: Re: Disable Thumbnail Alt Text
Post by: ibhuntin on April 09, 2007, 02:34:35 PM
Thanks!  Worked like a charm.  I just added generic ALT text for validation.