CommunityBridge icon indicating copy to clipboard operation
CommunityBridge copied to clipboard

Minecraft heads as avatars

Open Niknox opened this issue 11 years ago • 7 comments

It would be great if you could add an option so that all players automatically have their minecraft head as their avatar on a webspace.

Niknox avatar Jul 30 '13 08:07 Niknox

That does sound cool and fun. And interesting in the programmatic sense. ;)

iain-davis avatar Jul 30 '13 12:07 iain-davis

Well, does this mean you will implement it?

Niknox avatar Aug 01 '13 13:08 Niknox

The users table for phpBB 3.0.12 on MySQL is shown at https://github.com/iain-davis/CommunityBridge/issues/76, used for avatar for a user.

The string in the cell is like 48_1388965776.png, somehow generated, no idea how but inspecting the PHP files will tell. The original filename was Christmas_Bunny.png. Out of interest I tried to run find but it found nothing, so I just went there and found the file at {phpBB root}/images/avatars/upload/8971212ba574bc08f73a6865f8705bb3_48.png. The number 48 in the names match my user ID.

rautamiekka avatar Jan 05 '14 23:01 rautamiekka

You can do this with Minotar.

https://minotar.net/

SXRWahrheit avatar Apr 24 '14 17:04 SXRWahrheit

Thanks for the tip, SXRWahrheit.

iain-davis avatar Apr 27 '14 17:04 iain-davis

I did it in PHPBB. The only thing is that users have to be named the same way as their in game characters. Go to styles and edit your style. From drop down list of style files pick "vievtopic_body.html" Find in script "" And make those few lines look like this:

           <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><br /><!-- ELSE --><img src="http://cravatar.eu/head/{postrow.POST_AUTHOR}/128.png" width="128" height="128" alt="" /><br />
                         <!-- ENDIF -->

Now save. If your users use their minecraft name as a username, then if they don't have avatar, they will have one from cravatar.eu showing their minecraft character ;]

MikeGold avatar Aug 15 '14 23:08 MikeGold

I did it on my forums by giving them a custom profile field to throw their username in and calling that.

SXRWahrheit avatar Aug 15 '14 23:08 SXRWahrheit