Nameless icon indicating copy to clipboard operation
Nameless copied to clipboard

Online Users

Open Ariuw opened this issue 10 years ago • 4 comments

  • What kind of issue is it (Question, Bug, etc.)? Question
  • In which version of NamelessMC did it occur (1.x.x)? 1.0.10

Hello ! I am trying to create something like this

Can someone help me?

Ariuw avatar Jul 24 '16 22:07 Ariuw

I think you can do this pretty easy, if you have experience with some PHP and HTML. When you go to the Forum tab, you see that already "Online Users", so you can just change that to the Cravatar.eu images.

zTryhqrd avatar Jul 25 '16 08:07 zTryhqrd

I know how to use HTML but not PHP I have already get the image working but not the avatar of the player it means that the image doesn't show the online user avatar, I don't know how to get that working :cry:

Ariuw avatar Jul 25 '16 16:07 Ariuw

If you're referring to the online users list within the forums, you can change

$online_users_string .= '<a href="/profile/' . htmlspecialchars($online_user->mcname) . '">' . htmlspecialchars($online_user->username) . '</a>, ';

to

$online_users_string .= '<a href="/profile/' . htmlspecialchars($online_user->mcname) . '"><img src="https://cravatar.eu/avatar/' . htmlspecialchars($online_user->mcname) . '/50.png" alt="' . htmlspecialchars($online_user->mcname) . '" /></a> ';

It's untested, but it should work.

samerton avatar Jul 25 '16 18:07 samerton

Yesss!!! It worksss thanks @Samerton !!

Ariuw avatar Jul 25 '16 20:07 Ariuw