Online Users
- 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?
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.
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:
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.
Yesss!!! It worksss thanks @Samerton !!