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.

avatar variable

3 posters

Go down

avatar variable Empty avatar variable

Post by sun1994 7/7/2012, 22:59

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

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 8/7/2012, 12:11

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

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by SLGray 8/7/2012, 19:51

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.


avatar variable Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 8/7/2012, 20:25

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

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by SLGray 8/7/2012, 20:27

Do you have JavaScript Management on?


avatar variable Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 9/7/2012, 12:33

yes.
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by LGforum 9/7/2012, 19:23

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

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 9/7/2012, 20:27

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

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by LGforum 9/7/2012, 20:37

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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 9/7/2012, 23:58

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

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

avatar variable Empty Re: avatar variable

Post by sun1994 12/7/2012, 21:39

bump?
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Back to top

- Similar topics

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