Show Minecraft Skin in Postbit - Hiển thị Minecraft Skin trong Postbit

PVS

Super Moderator
Thành viên BQT
Code hoặc hướng dẫn này được sử dụng trên phiên bản Xenforo cũ đã quá hạn sử dụng. Bạn hãy click để tìm bản mới hơn
Show Minecraft Skin in Postbit - Hiển thị Minecraft Skin trong Postbit

1. Vào Custom User Fields và click Create New Field

Field ID: minecraft_id
Title: Minecraft Username
Description: Enter your Minecraft Username here.

2. Tạo một Custom Field khác

Field ID: minecraftskinonoff
Title: Disable Your Minecraft Skin
Description: Checking this box disables your Minecraft skin in posbit.
Field Type: Check Boxes
Possible Choices:
Value: 1 | Text: Enable / Disable your Minecraft skin

3. Vào template message_user_info tìm:
Mã:
<xen:if is="@messageShowHomepage AND {$user.homepage}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase home_page}:</dt>
                        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
                    </dl>
                </xen:if>

Thêm vào đằng sau:
Mã:
<xen:if is="{$visitor.customFields.minecraftskinonoff}"> <xen:else />
                <xen:if is="{$user.customFields.minecraft_id}">
    <div><img class= "minecraftskin" src="http://minepic.org/skin/{$user.customFields.minecraft_id}" /></div>
</xen:if>
                </xen:if>

4. Vào template EXTRA.css và thêm:
Mã:
.minecraftskin {
    float: right;
    margin-bottom: 0px;
    margin-right: -3px;
    margin-top: 18px;
    opacity: 0.6;
    width:20px;
}

postbit.png


postbitinfo.png

Chúc các bạn thành công.


Nguồn: xenforo.com​
 
Back
Top