Jump to content

Letters avatars for members without profile photo


Janyour

Recommended Posts

Posted
6 hours ago, media said:

I have just uploaded. Looks good...

I do not think it is using G for guest, but this is better than using G, the new version is ignoring Guest_ part and using the name that guest picked

Like for Guest_Wholesome using letter W. Like this way better

I have a little problem; my board is in different language and if I have a username start with none English Character, It turns into a broken profile image????
How can I fix those characters? Should I just add/upload a png image for it or something else?

I'm working on a fix for that now. i didn't really think of it when i was putting it together, i'm too english centric :)

  • Replies 117
  • Created
  • Last Reply
Posted
11 hours ago, media said:

I have just uploaded. Looks good...

I do not think it is using G for guest, but this is better than using G, the new version is ignoring Guest_ part and using the name that guest picked

Like for Guest_Wholesome using letter W. Like this way better

I have a little problem; my board is in different language and if I have a username start with none English Character, It turns into a broken profile image????
How can I fix those characters? Should I just add/upload a png image for it or something else?

I have uploaded a new version, it has a new naming convention for avatars, so it should take care of the non-english characters a lot better. I am also using a different fontface, as the previous one didn't have support for non-latin characters. there is also now a setting to generate avatars with dual letters versus the one.

I will also like to note, GD is a horrible image library and for best results use imagemagick! :)

Posted
1 minute ago, CodingJungle said:

I have uploaded a new version, it has a new naming convention for avatars, so it should take care of the non-english characters a lot better. I am also using a different fontface, as the previous one didn't have support for non-latin characters. there is also now a setting to generate avatars with dual letters versus the one.

I will also like to note, GD is a horrible image library and for best results use imagemagick! :)

For a non-supported and free app, thank you for the awesome support and updates.  :)

Posted
7 minutes ago, Joel R said:

For a non-supported and free app, thank you for the awesome support and updates.  :)

well making improvements and support are 2 separate things IMHO :) but you are welcome for it all. 

Posted
39 minutes ago, CodingJungle said:

I have uploaded a new version, it has a new naming convention for avatars, so it should take care of the non-english characters a lot better. I am also using a different fontface, as the previous one didn't have support for non-latin characters. there is also now a setting to generate avatars with dual letters versus the one.

I will also like to note, GD is a horrible image library and for best results use imagemagick! :)

Thank you for the hard work man, I will be upgrading soon....

Thanks

Posted
58 minutes ago, CodingJungle said:

I have uploaded a new version, it has a new naming convention for avatars, so it should take care of the non-english characters a lot better. I am also using a different fontface, as the previous one didn't have support for non-latin characters. there is also now a setting to generate avatars with dual letters versus the one.

I will also like to note, GD is a horrible image library and for best results use imagemagick! :)

I have just deleted the old one and installed the new one 2.0.3 version (2 minutes job)

Just one word BEAUTIFUL... Very nice... All none English characters are working (in my case), plus 2 letters are working too (Nice to have separate settings for 2 letters version)...

AGAIN GREAT JOB...

Posted
7 minutes ago, media said:

I have just deleted the old one and installed the new one 2.0.3 version (2 minutes job)

Just one word BEAUTIFUL... Very nice... All none English characters are working (in my case), plus 2 letters are working too (Nice to have separate settings for 2 letters version)...

AGAIN GREAT JOB...

58450ac28efc9_-avatars.png

i knew something was up with non-english/latin characters when i noticed a few of my site members having the above avatar and i was like "wtf is that?"

I'm glad it is working out well for you, hopefully IPS one day will add their own version to the core, as i think it really wakes up rather boring site with a bunch of eggmen on it :)

Posted

oh i forgot to mention, if it dual letters are on, it will average out the two color codes for the avatars background color, so they will be different colored than the single letter avatars in the pre-rendered zip.

j.pngj2.pngj3.png

sorta how the j's and these k's are different colored if they have a different second letter. Hoping that will add more to the uniqueness of the avatars :)

Posted
12 minutes ago, Janyour said:

Thank you @CodingJungle really appreciate the support for this free app :)

 

more is to come :)

i finally think i licked the GD's text centering, now need to get imagemagik's figure out (as it is still a bit off, gravity wasn't enough). 

I am also introducing "unique backgrounds" which will generate the avatar's background color over the username (instead of just the 1 character or 2 if dual lettering is enabled). this will make the avatar's hopefully more unique, so users are more easily defined.

New Style:

2016-12-06_0232.png

Old Style:

2016-12-06_0233.png

this will however generate more avatars, but you can choose between the two.

Posted
7 hours ago, CodingJungle said:

more is to come :)

i finally think i licked the GD's text centering, now need to get imagemagik's figure out (as it is still a bit off, gravity wasn't enough). 

I am also introducing "unique backgrounds" which will generate the avatar's background color over the username (instead of just the 1 character or 2 if dual lettering is enabled). this will make the avatar's hopefully more unique, so users are more easily defined.

New Style:

 

Old Style:

 

this will however generate more avatars, but you can choose between the two.

Nice, I like the new style better....

Is this something we have on 2.0.3 version or are you working on a new version?

Thanks

Posted
7 hours ago, opentype said:

An option to set our own fonts (e.g. the one the specific site already uses) would be useful. 

i would love to do this, but the problem i'm facing, is GD and Imagemagick only work well with certain types of fonts and getting them centered is a pain. Like i was using deja vu sans mono, imagemagick loves this font and can center it quite easy, but switch it to something like Consolas bold, it will typically center them horizontally correctly, but the vertical will be off by 10 to 15 pixels, and i am not sure how to correct this (which i'm currently working on). Now GD that is a whole bag of crazy, not all GD is equal, even for the same versions of PHP. it really depends on how GD is compiled.

I might be going about this the wrong way tbh. maybe i should be just generating the background image and then doing a overlay with css/html for the name, that will probably yield much better results. I'll play around with it this weekend, and see what i come up with. maybe a little forced hacking into writing to the custom.css :)

27 minutes ago, media said:

Nice, I like the new style better....

Is this something we have on 2.0.3 version or are you working on a new version?

Thanks

this will be in the next version :).

Posted
15 minutes ago, CodingJungle said:

maybe i should be just generating the background image and then doing a overlay with css/html for the name, that will probably yield much better results.

The image version is the most robust one. Once the image is created, it will just work everywhere and don’t interact with anything. I prefer that over the older attempts. 

Posted
5 minutes ago, opentype said:

The image version is the most robust one. Once the image is created, it will just work everywhere and don’t interact with anything. I prefer that over the older attempts. 

what i might do, is give you a way to upload a ttf for it, select it to use that one, and then give you top/left offset so people can adjust accordingly to generate a centered image. might even remove imagemagick as its proving to be the difficult one now :( 

Posted
7 minutes ago, CodingJungle said:

upload a ttf for it, select it to use that one, and then give you top/left offset so people can adjust accordingly to generate a centered image.

Sounds good. I wouldn’t mind fiddling with offset values for custom fonts. 

Posted
6 hours ago, opentype said:

Sounds good. I wouldn’t mind fiddling with offset values for custom fonts. 

Uploaded new version which has most of the features discussed here:

settings:

  • Desinger Mode: allows you to tweak the settings to achieve a better avatar. this setting will also disable n2a from creating or using n2a avatars on the front till disabled. this to avoid a lot of i/o as you change the settings.
  • Font Color: the main text color for the avatar.
  • Text Shadow Color: the text shadow color.
  • Single Letter Font Size: Single letter font size
  • Dual Letters Font SIze: Dual Letters font size.
  • Unique Backgrounds: creates a color code base on users entire name, not just the first and/or second letter. creates a more robust and unique colors for avatars.
  • Font File, upload a new font file and place its name here, n2a will use that font to render avatars instead.
  • X Offset/Y Offset: you will need to tweak this if you set a new font and the fonts x-axis/y-axis is not centered, you can enter a value here to help center it (takes negative or whole numbers) 
  • Text angle: angles the text from the x-axis, takes negative or whole numbers here.

Enjoy, let me know what you all think and if you want to thank me with a monetary value my paypal is https://www.paypal.me/codingjungle :) (you really don't but i wont turn down your thankfulness :)  )

Posted
1 hour ago, CodingJungle said:

Uploaded new version which has most of the features discussed here:

settings:

  • Desinger Mode: allows you to tweak the settings to achieve a better avatar. this setting will also disable n2a from creating or using n2a avatars on the front till disabled. this to avoid a lot of i/o as you change the settings.
  • Font Color: the main text color for the avatar.
  • Text Shadow Color: the text shadow color.
  • Single Letter Font Size: Single letter font size
  • Dual Letters Font SIze: Dual Letters font size.
  • Unique Backgrounds: creates a color code base on users entire name, not just the first and/or second letter. creates a more robust and unique colors for avatars.
  • Font File, upload a new font file and place its name here, n2a will use that font to render avatars instead.
  • X Offset/Y Offset: you will need to tweak this if you set a new font and the fonts x-axis/y-axis is not centered, you can enter a value here to help center it (takes negative or whole numbers) 
  • Text angle: angles the text from the x-axis, takes negative or whole numbers here.

Enjoy, let me know what you all think and if you want to thank me with a monetary value my paypal is https://www.paypal.me/codingjungle :) (you really don't but i wont turn down your thankfulness :)  )

Wow... Better than ever... :)

Upgraded to 2.1.0 ... All good...

Posted
6 hours ago, CodingJungle said:

 

  • X Offset/Y Offset: you will need to tweak this if you set a new font and the fonts x-axis/y-axis is not centered, you can enter a value here to help center it (takes negative or whole numbers) 

The Y value field rejects negative values. So I can’t move the letters up at the moment. 

Other than that! Thanks for the improvements. :thumbsup:

Posted
2 minutes ago, opentype said:

The Y value field rejects negative values. So I can’t move the letters up at the moment. 

Other than that! Thanks for the improvements. :thumbsup:

no problem. i have one more minor feature i'm gonna role out (where you can put a username in the color overrides, my unique color was this gawdy green on my site, it had to go and i want my color to be different, and didn't want to share with the other MI's :) ). I'll go over the number fields again, make sure i have the right option set so they can take negative numbers.

Posted
2 hours ago, CodingJungle said:

no problem. i have one more minor feature i'm gonna role out (where you can put a username in the color overrides, my unique color was this gawdy green on my site, it had to go and i want my color to be different, and didn't want to share with the other MI's :) ). I'll go over the number fields again, make sure i have the right option set so they can take negative numbers.

Awesome !!

Posted

So does this create avatars for every member with the default avatar?

That seems pretty intensive. Is there an option to just create them for a user when they register?

I have a few thousand inactive accounts that don't need avatars.

Posted
12 hours ago, opentype said:

The Y value field rejects negative values. So I can’t move the letters up at the moment. 

Other than that! Thanks for the improvements. :thumbsup:

this should be fixed, there are a few other improvements, like you can pass a username (must be exact match) to the color overrides and it will use that color for the background of the avatar, still works with the letter(s) too. and if you have dual letters enabled and only want members who have space in their names to have dual letter avatars, you can enable it, so any one with just a single name like "Michael" will only get the "M", but "Coding Jungle" would get "CJ".

enjoy everyone :)

4 minutes ago, iacas said:

So does this create avatars for every member with the default avatar?

That seems pretty intensive. Is there an option to just create them for a user when they register?

I have a few thousand inactive accounts that don't need avatars.

depends what mode it is in. if you have unique colors it will create an avatar for each member, if you don't use unique colors, it will generate a single image for all the members who's username starts with say "S".  it only generates the user's avatar if there is content that is view with them in it and/or if you go browsing thru the members list in the ACP. it doesn't automate thru the members list on its own, some form of loading the member needs to occur for the avatar's to generate.

Posted
6 minutes ago, CodingJungle said:

depends what mode it is in. if you have unique colors it will create an avatar for each member, if you don't use unique colors, it will generate a single image for all the members who's username starts with say "S".  it only generates the user's avatar if there is content that is view with them in it and/or if you go browsing thru the members list in the ACP. it doesn't automate thru the members list on its own, some form of loading the member needs to occur for the avatar's to generate.

Okay.

Last question (I think): does uninstalling remove all of the avatars created? Do the avatars of the members revert back to "no image" so that the default avatar can be used, or are they broken images?

Posted
Just now, iacas said:

Okay.

Last question (I think): does uninstalling remove all of the avatars created? Do the avatars of the members revert back to "no image" so that the default avatar can be used, or are they broken images?

the avatars are stored in uploads/n2a (they might stick around after the app is uninstalled, but they are easily located to be removed), but as for the users profiles they will revert back to the eggman or whatever default avatar you set for them to have if they didn't select on on their own. it doesn't actually save to their member record, it sees if they have an avatar selected, as it normally just return the default avatar's url, instead it will return the n2a avatar generated for them. once the image is generated and they don't change their name or you don't mess with any settings, the same image url image will be returned. 

I wanted it to have as little actual impact on everything, incase it is removed or if IPS rolls out their own (or for some reason i suddenly turn into a prick and refuse to update it or something). I was going to have it store to the member's record and the more i thought about it the more i was like "nope that is a bad idea".

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...