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, 1:49 pm; 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 1st 2017, 11:18 pm; 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.
|

» I want to add Member Local Time as a profile field below avatar
» How to do it like this that I circle in the image ? The image is in Personal Profile it show in column of "Charactor sheet".
» Adding image to an Image List Profile Field not working!
» How can I have more than one image on a Image List Profile field?
» How can I set it up to allow users to have a visible profile pic on their profile??
» How to do it like this that I circle in the image ? The image is in Personal Profile it show in column of "Charactor sheet".
» Adding image to an Image List Profile Field not working!
» How can I have more than one image on a Image List Profile field?
» How can I set it up to allow users to have a visible profile pic on their profile??
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum