Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

(Вайбкод AIR KILLGPT виджет инфо статистика профиля XenForo 2.1, 2.2, 2.3

Ноя
3
0
Пользователь
1770577255658.png1770577915512.png
1770578058123.png

1770578094560.png

Внешний вид - Виджеты - Добавить виджет - Html - Список форумов: боковая панель 0 - Шаблон код:

Pawn:
<style>
.kf-stats-widget {
    background: transparent;
    border: none;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 10px 0;
}

.kf-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
}

.kf-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kf-username {
    font-weight: 700;
    font-size: 16px;
    color: @xf-textColorEmphasized;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kf-usertitle {
    font-size: 11px;
    opacity: 0.6;
}

.kf-stats-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.kf-stat-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.kf-stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.kf-stat-label svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.kf-stat-count {
    font-weight: 700;
}

.kf-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.kf-button {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: 0.2s;
}

.kf-btn-primary { background: @xf-buttonPrimaryBg; color: @xf-buttonPrimaryTexColor; }
.kf-btn-secondary { background: @xf-buttonDefaultBg; color: @xf-buttonDefaultTextColor; border: 1px solid @xf-borderColor; }

.kf-btn-danger {
    background: #e02424;
    color: #ffffff !important;
}
.kf-btn-danger:hover {
    background: #b91c1c;
    color: #ffffff !important;
    text-decoration: none;
}

@media (max-width: @xf-responsiveNarrow) {
    .kf-stats-widget {
        height: auto;
        min-height: 250px;
    }
}
</style>

<div class="kf-stats-widget">
<xf:if is="$xf.visitor.user_id">
    <!-- Блок профиля -->
    <div class="kf-header-row">
        <xf:avatar user="$xf.visitor" size="s" />
        <div class="kf-user-info">
            <a href="{{ link('members', $xf.visitor) }}" class="kf-username">{$xf.visitor.username}</a>
            <span class="kf-usertitle">{$xf.visitor.user_title}</span>
        </div>
    </div>

    <div class="kf-stats-list">
        <div class="kf-stat-line">
            <span class="kf-stat-label"><svg viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg> Сообщения</span>
            <span class="kf-stat-count">{$xf.visitor.message_count|number}</span>
        </div>
    
        <div class="kf-stat-line" style="color: #ff4d4d;">
            <span class="kf-stat-label"><svg viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg> Реакции</span>
            <span class="kf-stat-count">{$xf.visitor.reaction_score|number}</span>
        </div>

        <div class="kf-stat-line">
            <span class="kf-stat-label"><svg viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg> Награды</span>
            <span class="kf-stat-count">{$xf.visitor.trophy_points|number}</span>
        </div>

        <div class="kf-stat-line">
            <span class="kf-stat-label"><svg viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg> Активность</span>
            <span class="kf-stat-count">{$xf.visitor.activity_points|default(0)|number}</span>
        </div>
    </div>

    <div class="kf-footer-actions">
        <a href="{{ link('members', $xf.visitor) }}" class="kf-button kf-btn-primary">Профиль</a>
        <a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="kf-button kf-btn-danger" data-xf-click="logout">Выход</a>
    </div>
<xf:else />
    <div style="text-align: center; margin: auto 0;">
        <p style="font-size: 14px; opacity: 0.5; margin-bottom: 15px;">Войдите для просмотра статистики</p>
        <div class="kf-footer-actions">
            <a href="{{ link('login') }}" class="kf-button kf-btn-primary" data-xf-click="overlay">Вход</a>
            <a href="{{ link('register') }}" class="kf-button kf-btn-secondary">Регистрация</a>
        </div>
    </div>
</xf:if>
</div>


Расширенный режим снимаем галочку - сохраняем
 
Сверху