The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ALT Caption in Images

3 posters

Go down

Solved ALT Caption in Images

Post by AnaMi December 2nd 2011, 6:34 pm

Hi, everyone! Hello Hope you're enjoying a brilliant day!

I would like to ask if there's a possibility to use the ALT caption for images by using BBCode. This, as HTML doesn't work in the custom profile fields in my forum.

I've read in some forums it works this way:
[img alt="Image text"] http://www.website.net/image.jpg [/img]

It doesn't work in mine, though.

I'd appreciate your help! I love you
Thank you very much!
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 2nd 2011, 6:41 pm

Hi! Can you provide a link to your try, please?
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 2nd 2011, 8:13 pm

Hello Hello, Gassy! How are you?
My forum's English4Fun. It's a PHPBB3 forum and I'm working with text zone profile fields.

Thank you for your help!
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 2nd 2011, 8:17 pm

Hi again AnaMi! Well, please give me a link to a topic in that you have tried this code?

Anyway, this code doesn't work. Works only attributes on tables in bbcode. The example below doesn't work:
Code:
[img alt="text"]image[/img]
But this works:
Code:
[td colspan="3"]text[/td]
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 2nd 2011, 8:24 pm

Very good Thank you, Gassy! You're really kind!
I want to use the caption for the images in one of the custom profile fields which is displayed in the profile as well as the messages. If you go to this link, for instance, you'll see the user Misor has a profile field with an image. The idea is to add a caption to that picture.
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 2nd 2011, 8:34 pm

Do you talk about hover effect to the images? Admin, Colombia?
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 2nd 2011, 8:35 pm

No, it isn't. It's on the E4F! Gift field. Very Happy
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 2nd 2011, 8:43 pm

Ok, try to add in javascript management:
Code:
jQuery(document).ready(function() {
    jQuery('img').each(function() {
        if(jQuery(this).attr('src') == 'LINKTOIMAGE') jQuery(this).attr('alt', 'ALTTEXT');
    });
})
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 2nd 2011, 11:11 pm

Hello Thank you, Gassy! Wink
After creating this Javascript code, can I use HTML or the ALT property for the BBCode instead?

bye flower
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Gangstar15 December 3rd 2011, 12:10 am

If you use the image list profile field, then just add your text in "Alternate text" (:
Gangstar15
Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 3rd 2011, 4:07 am

Very Happy I see! Thank you, Gangstar!

Just one more question: once I add this JavaScript code, how can I use BBCodes with the Alt caption in a post?

Love Thank you for your massive help, guys!
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 3rd 2011, 7:16 am

So, I think you can activate HTML and use alt attribute. You cannot with bbcode because in HTML a image structure code is:
Code:
<img src="LINK" alt="TEXT" title="TEXT" />
but in bbcode is otherwise:
Code:
[img]LINK[/img]

So, using a example:
ALT Caption in Images Parchemin
Now see in Chrome with Inspect element, or with Mozilla Firefox how it looks as HTML. Wink
Code:
<img src="http://2img.net/i/fa/fdf/parchemin.png" alt="" class="" style="display:inline">
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi December 3rd 2011, 12:02 pm

Hello Thank you very much, Gassy!
HTML has always worked in my forum, even with the ALT caption code. My hope was to find a way to use the ALT caption in a custom profile field (text zone), which only accepts BBCode so far. Sadly, it doesn't work.

Very good Anyway, I really thank you for your priceless help and support! You're all second to none!! flower
AnaMi
AnaMi
Forumember

Female Posts : 46
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

Solved Re: ALT Caption in Images

Post by Guest December 3rd 2011, 12:09 pm

Thank you, and glad I could help! Wink
avatar
Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by Sanket December 3rd 2011, 6:53 pm

Topic Solved & Locked
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum