PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Question About Image Alt Text (http://www.photopost.com/forum/photopost-pro-how-do-i/134997-question-about-image-alt-text.html)

kkibak January 15th, 2008 02:03 AM

Question About Image Alt Text
 
I was recently reviewing the alt tags for images on our site and noticed what seems like a big problem - when you view a photo in photopost, for example http://www.breederretriever.com/phot....php/photo/783 - the main image doesn't seem to have any alt text...?

I would like to have the alt text for this image be the same as the page title for accessibility reasons. In the example above, this would be "Chihuhuas Meeting Great Danes." Is there a setting I missed in the admin panel to implement this, or is there perhaps a code modification someone could recommend?

Thanks so much.

Kris

Chuck S January 15th, 2008 07:38 AM

In showphoto.php you can replace

Code:

Content visible to verified customers only.
with this

Code:

Content visible to verified customers only.
on the $imgdisp lines.

kkibak January 15th, 2008 08:24 AM

Great! Worked like a charm, thanks!

I don't mean to push my luck here but would you mind telling me what the name of the variable is that holds the category (within showphoto.php)? I would like to make it something like "alt=\"$filename - $categoryname\" so the ALT text would end up, for example, as "Chihuhuas Meeting Great Danes. - Chihuahua" as opposed to just "Chihuhuas Meeting Great Danes."

Thanks again for your help.

Edit: Oops! I just realized it looks like the change you gave me is putting the actually file name (minus the .jpg) as the alt text - is there a way I could use the page title instead? That is, the short descriptiono of the photo the user entered when uploading?

Chuck S January 15th, 2008 08:46 AM

Title variable is $title

Catname is $thecatname

kkibak January 15th, 2008 12:24 PM

Great, just what I was looking for, thanks.

Chuck S January 15th, 2008 12:25 PM

Not a problem glad to assist.


All times are GMT -5. The time now is 02:42 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97