Local user's profile image
2 posters
Page 1 of 1
Local user's profile image
Hello,
how do I get the local user's profile image? I have a div and I want to put it inside the div, but don't know what variable to use. I'm editing templates, so what variable is for profile image?
I tried using {USERNAME_AVATAR}, but it displays nothing.
Precisely, when I use it as a link withing src="", it displays (nothing).
how do I get the local user's profile image? I have a div and I want to put it inside the div, but don't know what variable to use. I'm editing templates, so what variable is for profile image?
I tried using {USERNAME_AVATAR}, but it displays nothing.
Precisely, when I use it as a link withing src="", it displays (nothing).
Last edited by BloodDrunk on May 2nd 2017, 18:49; edited 1 time in total
Re: Local user's profile image
Hello,
This JS code should do what you want:
This JS code should do what you want:
- Code:
$(function(){
$("selector").attr("src", _userdata.avatar.split(" ")[1].split("\"")[1]);
})
Guest- Guest
Re: Local user's profile image
Wolfuryo wrote:Hello,
This JS code should do what you want:Of course, you have to replace selector with the class or id of the img element.
- Code:
$(function(){
$("selector").attr("src", _userdata.avatar.split(" ")[1].split(""")[1]);
})
Thanks, I'll try it.
Btw, where do you get that? How do you know, do you see that somewhere or what..
EDIT: I believe you means only 2 ""'s, and not 3?
Last edited by BloodDrunk on May 2nd 2017, 04:18; edited 1 time in total
Re: Local user's profile image
Take a look at the source of a forum page. There's big JS code with all sort of goodies
It's not """, it is "\"".
It's not """, it is "\"".
Guest- Guest
Re: Local user's profile image
Uuuuuuu, lovely
Thank you, sir!
I'll come back here, I'll have more questions!
Thank you, sir!
I'll come back here, I'll have more questions!
Re: Local user's profile image
@BloodDrunk is this now solved ?
If yes please make sure you say so in the topic then mark as solved by clicking the mark solved button.
If yes please make sure you say so in the topic then mark as solved by clicking the mark solved button.
Re: Local user's profile image
Thank you
Have a great day.
Have a great day.
Problem solved & topic archived.
|
Similar topics
» How to hide users' personal profile to visitors?
» Script doesn't show image for users
» #fa Drop Down Profile Image
» user profile background image help
» How come I can't add a background image to my profile plate?
» Script doesn't show image for users
» #fa Drop Down Profile Image
» user profile background image help
» How come I can't add a background image to my profile plate?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum