Register Chat Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Nov 2005, 15:28
ILTK ILTK is offline
 
Join Date: Aug 2005
Question Supply ALT text for IMG tag

Having ALT text for images in a thread created with the IMG tag would be great for SEO and also to comply with ADA (Americans with Disabilities Act)

One way this could be done and not require any extra knowledge from users, would be to have a setup part where you specify what to parse out of the image filename ('-' '.jpg' '.gif' '.png' etc..), and then stick what's left after those things are parsed out of the filename into the ALT tag.

Just an idea, I don't know how to code this myself, but I think such a plugin would be welcomed by a lot of sites.
Reply With Quote
  #2  
Old 09 Nov 2005, 19:36
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Real name: Kevin
ILTK,

Hopefully somebody can convert this to a plugin but if you want a 'hack' method.....

In you /forums/includes/class_bbcode.php file look around line 1827 for:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

... and replace it with:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What that will do is take something like...
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

... and give it an ALT tag of "coolscifi logo" (the "_" is being replaced converted to a space).
Reply With Quote
  #3  
Old 12 Nov 2005, 14:11
Kila_Bite Kila_Bite is offline
 
Join Date: Apr 2005
Real name: Sam Mitchell
Good idea and thanks for the code KW802, however i'm still unclear where the alt tag would sit and what format to put it in. Where do you put the tag? Like you do in normal html after the url but before the /img? And if so, do you use the same syntax as HTML, so alt="text".

Thanks.
Reply With Quote
  #4  
Old 12 Nov 2005, 16:32
ILTK ILTK is offline
 
Join Date: Aug 2005
Thumbs up

Thanks a lot KW802, that is perfect

@Killa_bite, just name the image using underscores for spaces and this code will take care of the rest, you don't have to specify the alt text.

For example:

keyword1_keyword2.jpg

Would make it insert alt="keyword1 keyword2" for you.

Last edited by ILTK : 12 Nov 2005 at 16:37.
Reply With Quote
  #5  
Old 12 Nov 2005, 17:43
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Real name: Kevin
Originally Posted by ILTK
Thanks a lot KW802, that is perfect
No problem.
Reply With Quote
  #6  
Old 26 May 2006, 18:31
kofoid kofoid is offline
 
Join Date: Dec 2005
Is there a way to do this for your logo graphic?
__________________
Laura
The Oasis
A community with a harmonious attitude
Reply With Quote
  #7  
Old 26 May 2006, 18:46
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Well, for your logo graphic you'd just manually put in alt="", wouldn't you? It's not dynamic, unless you've made it that way.
__________________
+-~* SocomCity.Net *~-+
I DO NOT provide support through PM.

If a woodchuck really could chuck wood, the amount of wood chucked by said woodchuck would be proportional to this woodchuck's desire to chuck wood as well as its personal preference in chuckable wood among varying degrees of specially-designed woodchuck chucking wood.
Reply With Quote
  #8  
Old 02 Dec 2008, 15:24
greatwallforum's Avatar
greatwallforum greatwallforum is offline
 
Join Date: Jul 2008
Many images have names with no SEO or ADA value, such as IMG_1234.jpg.

How can I use the thread title or the forum name instead of the image filename?
__________________
Bryan – www.bryanf.com – Personal site
www.GreatWallForum.com – Great Wall Forum
www.Speed-Wiz.com – Automotive analysis, design, and simulation software

Last edited by greatwallforum : 02 Dec 2008 at 15:36.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 19:06.

Layout Options | Width: Wide Color: