Been pulling my hair out for a few days wondering why google tells me the most prevalent keyword on my page is .jpg
(it shouldnt be crawling thumbnails.php but never mind)
I had a quick search on how to change the alt tag from the filename under 1.5x and could only find the following abandoned post
http://forum.coppermine-gallery.net/index.php/topic,66104.msg328686.html#msg328686
(http://forum.coppermine-gallery.net/index.php/topic,66104.msg328686.html#msg328686)
whether its to the album name, website url or even just the filename without the extenion any help on this one would be apreciated
Grant
www.magicmirrorphoto.co.uk/gallery (http://www.magicmirrorphoto.co.uk/gallery)
What exactly do you want to achieve?
as i say at the moment the alt text for each picture in my gallery is #####.jpg
which is screwing up the keywords when the site is crawled by the search engines
im just looking to edit the alt text for each picture whether there is a method to trim off .jpg or change it entirely
without having to edit several hundred manually
Quote from: grantson on October 14, 2010, 05:59:44 PM
im just looking to edit the alt text for each picture whether there is a method to trim off .jpg or change it entirely
It's an easy task to trim the file extension. If that's the solution you want I'll come up with a code snippet. If you want to change it entirely, please specify what exactly should be used.
go for trimming the file extension
i can always use it for guidance later :)
Open include/functions.inc.php, find
$thumb_list[$i]['image'] = '<img src="' . $pic_url . '" class="image" ' . $image_size['geom'] . ' border="0" alt="' . $row['filename'] . '" title="' . $pic_title . '" />';
and replace with
$row['fileinfo'] = pathinfo($row['filename']);
$thumb_list[$i]['image'] = '<img src="' . $pic_url . '" class="image" ' . $image_size['geom'] . ' border="0" alt="' . basename($row['filename'], '.'.$row['fileinfo']['extension']) . '" title="' . $pic_title . '" />';
Andre as always top notch :)
thats another beer I owe you lol