tainz / CommunityBridge

A Minecraft plugin for connecting your game to your website.
https://www.spigotmc.org/resources/communitybridge.2232/
20 stars 22 forks source link

Minecraft heads as avatars #73

Open Niknox opened 11 years ago

Niknox commented 11 years ago

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.

iain-davis commented 11 years ago

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

Niknox commented 11 years ago

Well, does this mean you will implement it?

rautamiekka commented 10 years ago

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.

SXRWahrheit commented 10 years ago

You can do this with Minotar.

https://minotar.net/

iain-davis commented 10 years ago

Thanks for the tip, SXRWahrheit.

MikeGold commented 10 years ago

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 ;]

SXRWahrheit commented 10 years ago

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