Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Modification] How to show user avatar in the Who's Online?
I hope the subject is in the right place.

How to show user avatar in the Who's Online.


[Image: EkranResmi2018-04-0222.42.44.png]

[Image: EkranResmi2018-04-0223.04.13.png]

Open the FTP -> index.php:

Find the following code: (line 59)
PHP Code:
SELECT s.sids.ips.uids.times.locations.location1u.usernameu.invisibleu.usergroupu.displaygroup 

PHP Code:
SELECT s.sids.ips.uids.times.locations.location1u.usernameu.invisibleu.usergroupu.avataru.displaygroup 

And open the Admin KP -> Themes and Templates -> Templates -> Your Theme Templates -> Index Templates -> index_whosonline_memberbit

Open and replace all the codes with this one.

<div style="float: left">{$comma}<div style="margin-left: 5px"></div></div><div style="margin-top: 5px"><img src="{$user['avatar']}" width="20px" height="20px" style="float: left; margin-top: -4px; border-radius: 2px; border: 1px solid #ccc; margin-right: 3px"><div style="float: left; margin-top: -1px">{$user['profilelink']}{$invisiblemark}</div></div>


Open the FTP -> online.php:

Find this code: (Line 207)

PHP Code:
SELECT DISTINCT s.sids.ips.uids.times.locationu.usernames.nopermissionu.invisibleu.usergroupu.displaygroup 


PHP Code:
SELECT DISTINCT s.sids.ips.uids.times.locationu.usernames.nopermissionu.avataru.invisibleu.usergroupu.displaygroup 

Admin KP -> Themes & Templates -> Templates -> Your Theme Templates -> Whos Online Templates -> online_row

Replace all the codes with this one.

<td cllime="trow1"><img src="{$user['avatar']}" width="38px" height="38px" style="float: left; margin-right: 5px; border-radius: 3px"/>{$online_name}{$user_ip}</td>
<td align="center" cllime="trow2">{$online_time}</td>
<td cllime="trow1" width="50%">{$location}</td>

Good works!
Wow, the procedure is very complex but its worth it. I will try this later! Thanks man!
[Image: mybb-theme-club.png]
i am follow the instruction wow awesome work bro
Unfortunately there is an issue for users with default avatar...
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system

Forum Jump:

Users browsing this thread: 1 Guest(s)