Add Avatars to Showteam Page

Ashley
Offline
Administrator
Posts: 16
Threads: 8
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA

Ashley
Offline
Administrator

Posts: 16
Threads: 8
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA
This modification requires the installation of the MyBB Patches plugin. It is attached to this post for convenience. It includes the latest version of Plugin Library required by the plugin. If you have this file already, then you can choose to overwrite the file or skip, when prompted.

These are informational links for the MyBB Patches plugin:
https://github.com/frostschutz/MyBB-Patches
https://mods.mybb.com/view/patches
https://community.mybb.com/thread-54435.html

Also attached to this post is the patch file which can simply be imported after installing the Patches plugin.

Once this has been completed, perform the following steps:
1) Add to bottom of global.css:
Code:
.mybb-flex {
  display: -ms-flexbox !important;
  display: flex !important;
}

.mybb-margin-right-025rem {
  margin-right: 0.25rem !important;
}

.mybb-margin-right-05rem {
  margin-right: 0.5rem !important;
}

2) Replace the showteam_moderators_mod template with:
Code:
<tr>
<td width="45%" class="{$bgcolor}">
    <div class="mybb-flex">
        <div class="mybb-margin-right-05rem"><img src="{$avatar['image']}" alt="" {$avatar['width_height']}></div>
        <div class="mybb-flex">
            <div class="mybb-margin-right-025rem"><a href="{$user['profilelink']}"><strong>{$user['username']}</strong></a></div>
            <div><img src="{$theme['imgdir']}/buddy_{$status}.png" title="{$lang->$status}" alt="{$lang->$status}"></div>
        </div>
    </div>
</td>
<td width="30%" class="{$bgcolor}"><span class="smalltext">{$scopelist}</span></td>
<td width="15%" class="{$bgcolor}"><div class="postbit_buttons">{$user['lastvisit']}</div></td>
<td width="5%" class="{$bgcolor}"><div class="postbit_buttons">{$emailcode}</div></td>
<td width="5%" class="{$bgcolor}"><div class="postbit_buttons">{$pmcode}</div></td>
</tr>

3) Replace the showteam_usergroup_user template with:
Code:
<tr>
<td width="75%" class="{$bgcolor}">
    <div class="mybb-flex">
        <div class="mybb-margin-right-05rem"><img src="{$avatar['image']}" alt="" {$avatar['width_height']}></div>
        <div class="mybb-flex">
            <div class="mybb-margin-right-025rem"><a href="{$user['profilelink']}"><strong>{$user['username']}</strong></a></div>
            <div><img src="{$theme['imgdir']}/buddy_{$status}.png" title="{$lang->$status}" alt="{$lang->$status}"></div>
        </div>
    </div>    
</td>
<td width="15%" class="{$bgcolor}">{$user['lastvisit']}</td>
<td width="5%" class="{$bgcolor}"><div class="postbit_buttons">{$emailcode}</div></td>
<td width="5%" class="{$bgcolor}"><div class="postbit_buttons">{$pmcode}</div></td>
</tr>

The Result:
[Image: showteam-avatars.png]


.zip   MyBB-Patches-master.zip (Size: 34.6 KB / Downloads: 0)

.zip   patches.zip (Size: 853 bytes / Downloads: 0)
Users browsing this thread: 1 Guest(s)