The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

ALT Caption in Images

View previous topic View next topic Go down

Solved ALT Caption in Images

Post by AnaMi on 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
Forumember

Female Posts : 40
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 on December 2nd 2011, 6:41 pm

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

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi on 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
Forumember

Female Posts : 40
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 on 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]

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi on 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
Forumember

Female Posts : 40
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 on December 2nd 2011, 8:34 pm

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

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

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

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

AnaMi
Forumember

Female Posts : 40
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 on 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');
    });
})

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi on 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
Forumember

Female Posts : 40
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 on December 3rd 2011, 12:10 am

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

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 on 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
Forumember

Female Posts : 40
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 on 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:

Now see in Chrome with Inspect element, or with Mozilla Firefox how it looks as HTML. Wink
Code:
<img src="http://illiweb.com/fa/fdf/parchemin.png" alt="" class="" style="display:inline">

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

Post by AnaMi on 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
Forumember

Female Posts : 40
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 on December 3rd 2011, 12:09 pm

Thank you, and glad I could help! Wink

Guest
Guest


Back to top Go down

Solved Re: ALT Caption in Images

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

Topic Solved & Locked

Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


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