Force an image

Avatar

By Besbos 7 October 2015 17:22

Member · 2 comments

Hey,

I'd like to change the placeholder image for users to another picture. But I want the picture to be per user, based on their username.

Is there a file where I can change this, haven't found it after searching..

Thanks,

Avatar

By Mohsen_Nirouzad 7 October 2015 18:53

Member · 134 comments
Besbos wrote

Hey,

I'd like to change the placeholder image for users to another picture. But I want the picture to be per user, based on their username.

Is there a file where I can change this, haven't found it after searching..

Thanks,

Hello, Besbos, Welcome to our Luna community forum! We will help you as we can...

  • If you want to change the default picture of avatar, You may be change placeholder.PNG ( Is it true? ). And don't forgot picture sizing ( New picture's size must be equal to previous picture )
  • If you want to set a default avatar for a special username, It's useless because there's a primary key in users' database for username. And it will be shown for one person...
  • If you wanna change a user group's default avatar, It may need some coding ... Yannick will help you...

Also, You can see Luna Documents ...

Last edited by Mohsen_Nirouzad (7 October 2015 19:11)


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By rolfo 8 October 2015 08:51

Member · 86 comments
Besbos wrote

But I want the picture to be per user, based on their username.

What do you mean by "based on their username"? A generated picture calculated out of the username string? Or should it be the first pictogram on google picture search when you search for that name?

At this time the placeholder is just a png-file located at img/avatars/placeholder.png. To change the behavior you have to write some code.

Last edited by rolfo (8 October 2015 08:52)

Avatar

By Besbos 10 October 2015 10:20

Member · 2 comments

I know I have to write some code, but I don't know where.

I want an userpicture like this:

http://somesite.com/pictures/{username}.png

Avatar

By Yannick 11 October 2015 14:52

Administrator · 1,456 comments

This is currently not possible in Luna. However, I would like to point out that we plan to add an interface to change the default avatar globally in Denim.


You can do anything