The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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: PHP Code:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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. |
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
Is there a way to do this for your logo graphic?
|
#7
|
||||
|
||||
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.
|
#8
|
||||
|
||||
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|