2013-09-02, 02:03 AM
I'm putting together a Minecraft site, and in lieu of letting people upload avatars I was going to use the minotar.net avatar generator to make avatars based on their Minecraft username.
Basically how it works is it automatically generates an avatar based on how the characters face looks ingame. For instance for me, my Minecraft username is 'pixelbat'. If you go to this url you'll see how it works http://minotar.net/avatar/pixelbat/90.png It generates a 90x90 png of the characters face. You can change the username to anyone who plays the game. You can also change the 90 to any size up to 250.
I figured this would be relatively simple to implement using a required profile field upon registration to my site. Obviously I'm doing something wrong, or maybe this just isn't possible to do??
Here is what I got for my postbit_avatar template...
profile_fields[fid4] is the field I set up to be required upon registration.
If anyone has any ideas on how I can make this work, or maybe where I'm going wrong, I would gratefully appreciate the feedback. Thank you for your time.
Ok, so once I uploaded an avatar of my own, it started to display something. It's displaying the default avatar from minotar, which is linked to http://minotar.net/avatar//90.png. So it's totally omitting the {$profile_fields[fid4]}. I've tried both with and without ' marks around the fid4.
The second part to my issue seems that it requires a person to actually set an avatar before it will try to work. Could this be circumvented by setting a default for the avatar field within phpadmin?
I've also tried {$customfield['fid4']}, but no dice. I feel like this should work, but maybe I'm just overlooking something really little :|
Basically how it works is it automatically generates an avatar based on how the characters face looks ingame. For instance for me, my Minecraft username is 'pixelbat'. If you go to this url you'll see how it works http://minotar.net/avatar/pixelbat/90.png It generates a 90x90 png of the characters face. You can change the username to anyone who plays the game. You can also change the 90 to any size up to 250.
I figured this would be relatively simple to implement using a required profile field upon registration to my site. Obviously I'm doing something wrong, or maybe this just isn't possible to do??
Here is what I got for my postbit_avatar template...
<a href="{$post['profilelink_plain']}"><img src="//minotar.net/avatar/{$profile_fields[fid4]}/90.png" alt="" {$avatar_width_height} /></a>
profile_fields[fid4] is the field I set up to be required upon registration.
If anyone has any ideas on how I can make this work, or maybe where I'm going wrong, I would gratefully appreciate the feedback. Thank you for your time.
Ok, so once I uploaded an avatar of my own, it started to display something. It's displaying the default avatar from minotar, which is linked to http://minotar.net/avatar//90.png. So it's totally omitting the {$profile_fields[fid4]}. I've tried both with and without ' marks around the fid4.
The second part to my issue seems that it requires a person to actually set an avatar before it will try to work. Could this be circumvented by setting a default for the avatar field within phpadmin?
I've also tried {$customfield['fid4']}, but no dice. I feel like this should work, but maybe I'm just overlooking something really little :|