Where to edit ALT tag for image?
|
bigu_c
Joined: 2007-10-28
Posts: 210 |
Posted: Mon, 2009-09-07 15:49
|
|
Default for ALT tag of any image is: Name of image Quote:
<img src="/d/xxxxx-x/IMAGE-NAME.jpg" width="XXX" height="XXX" alt="IMAGE-NAME"/> I want find where I can edit this template. Please help, thank you! |
|
| Login or register to post comments |

Posts: 11018
I think, though I'm not 100% sure (I'd have to dig around searching old forum posts)
/modules/core/classes/GalleryTemplate.class
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 210
I checked and don't see that form.
Posts: 11018
Ah, dug up this old thread:
http://gallery.menalto.com/node/36533
http://sourceforge.net/tracker/index.php?func=detail&aid=1198718&group_id=7130&atid=357130
Forgot you can edit the templates for this, you probably just want to edit /themes/YourTheme/templates/album.tpl and photo.tpl
http://codex.gallery2.org/Gallery2:Editing_Templates
If you wanted to make other changes to that globally, you'd edit: /modules/core/classes/GalleryPhotoItem.class and
GalleryDerivativeImage.class
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 210
I'm sorry, but I'm newbie.
Can you tell me how to edit from:
I want this for images on photo pages only.
Thank you!
Posts: 11018
Can you post a link to a page on your site where you want this change made?
So you just want to append the word Pictures to the existing alt tag?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 210
http://www.car-pictures.us/audi/r8/Audi_R8_V10_5_2_FSI_quattro_01.jpg.html
View source you will see:
I want to change to:
... not only for this image.
Hope you understand my mind (sorry for my English)
Thank you!
Posts: 11018
Edit photo.tpl and add the stuff in bold. It's best to make a local directory and copy photo.tpl into that and make the changes on that file. If you ever upgrade or reinstall your changes will be overwritten if you don't do that.
http://codex.gallery2.org/Gallery2:Editing_Templates
{g->image id="%ID%" item=$theme.item image=$image fallback=$smarty.capture.fallback class="%CLASS%"} </div> {/g->container} {else} <div id="photo"> {g->image item=$theme.item image=$image fallback=$smarty.capture.fallback}{g->image id="%ID%" item=$theme.item image=$image fallback=$smarty.capture.fallback class="%CLASS%" alt="`$theme.item.title` Pictures"} </div> {/g->container} {else} <div id="photo"> {g->image item=$theme.item image=$image fallback=$smarty.capture.fallback alt="`$theme.item.title` Pictures"}____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 210
Thank nivekiam,
I changed success
Many thanks!