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.

avatar variable

View previous topic View next topic Go down

avatar variable

Post by sun1994 on July 7th 2012, 9:59 pm

Is there a way to get an avatar variable, which I can put in an announcement?
I already tried this tutorial; http://www.avacweb.com/t129-user-avatar-variable, but it doesn't work for me.

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by sun1994 on July 8th 2012, 11:11 am

Yes, and I put them on the right side, just like it says in the code.

Do you just have to insert <span class="AVATAR"></span> in you announcement to get the avatar, or do you have to put something between the >< tags?

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by SLGray on July 8th 2012, 6:51 pm

Did you add the default avatar URL in the JavaScript code?

if (x.length>0){ uav='<img src="'+x[0].src+'" />'; } else { uav='<img src="DEFAULT AVATAR URL HERE" />'; }

Also the log in widget as to the at the top of all the widgets.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36641
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: avatar variable

Post by sun1994 on July 8th 2012, 7:25 pm

Yes, did that. Also put the widget at the right top. So I don't get what I'm doing wrong. xD

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by SLGray on July 8th 2012, 7:27 pm

Do you have JavaScript Management on?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36641
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: avatar variable

Post by sun1994 on July 9th 2012, 11:33 am

yes.

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by LGforum on July 9th 2012, 6:23 pm

It sounds like you may have errors in other Javascripts. Could you post your forum URL.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: avatar variable

Post by sun1994 on July 9th 2012, 7:27 pm

http://layouttest-m.actieforum.com/

It's suppossed to show up above gast/guest in the log-in widget on the banner. And I didn't use any other javascript yet.

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by LGforum on July 9th 2012, 7:37 pm

It doesn't look like you have a sidebar. No sidebar, no widgets.

Unless phpbb2 has it completely different. Which wouldn't surprise me too much.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: avatar variable

Post by sun1994 on July 9th 2012, 10:58 pm

No I have, but I hid it with the javascript code from the tutorial.

Now to hide that widget if you don't want it,
Add this code underneath the line '$('.AVATAR').html(uav);'
Code:

$('.module', sidebar)[0].style.display="none";

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Re: avatar variable

Post by sun1994 on July 12th 2012, 8:39 pm

bump?

sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

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