- Uyumlu XF 2 Sürümleri
- 2.2.X
- 2.0.X
- 2.1.X
Tüm Sayfalar'da Staffbar'ı Alt Navigasyon Altına Taşımayı ve Özelleştirmeyi Yapacağız
- Görünüm ve diller > Temalarınız > Default style - Şablonlar 'da
<xf:if contentcheck="true">
<div class="p-staffBar">
<div class="p-staffBar-inner hScroller" data-xf-init="h-scroller">
<div class="hScroller-scroll">
<xf:contentcheck>
<xf:if is="$xf.visitor.is_moderator && $xf.session.unapprovedCounts.total">
<a href="{{ link('approval-queue') }}" class="p-staffBar-link badgeContainer badgeContainer--highlighted" data-badge="{$xf.session.unapprovedCounts.total|number}">
{{ phrase('approval_queue') }}
</a>
</xf:if>
<xf:if is="$xf.visitor.is_moderator && !$xf.options.reportIntoForumId && $xf.session.reportCounts.total">
<a href="{{ link('reports') }}"
class="p-staffBar-link badgeContainer badgeContainer--visible {{ ($xf.session.reportCounts.total && ($xf.session.reportCounts.lastBuilt > $xf.session.reportLastRead) OR $xf.session.reportCounts.assigned) ? ' badgeContainer--highlighted' : '' }}"
data-badge="{{ $xf.session.reportCounts.assigned ? $xf.session.reportCounts.assigned|number . ' / ' . $xf.session.reportCounts.total|number : $xf.session.reportCounts.total|number }}"
title="{{ $xf.session.reportCounts.lastBuilt ? phrase('last_report_update:')|for_attr . ' ' . date_time($xf.session.reportCounts.lastBuilt) : '' }}">
{{ phrase('reports') }}
</a>
</xf:if>
<xf:if contentcheck="true">
<a class="p-staffBar-link menuTrigger" data-xf-click="menu" data-xf-key="alt+m" role="button" tabindex="0" aria-expanded="false" aria-haspopup="true">{{ phrase('moderator') }}</a>
<div class="menu" data-menu="menu" aria-hidden="true">
<div class="menu-content">
<h4 class="menu-header">{{ phrase('moderator_tools') }}</h4>
<xf:contentcheck>
<!--[XF:mod_tools_menu:top]-->
<xf:if is="$xf.visitor.is_moderator">
<a href="{{ link('approval-queue') }}" class="menu-linkRow">{{ phrase('approval_queue') }}</a>
</xf:if>
<xf:if is="$xf.visitor.is_moderator && !$xf.options.reportIntoForumId">
<a href="{{ link('reports') }}" class="menu-linkRow" title="{{ $xf.session.reportCounts.lastBuilt ? phrase('last_report_update:')|for_attr . ' ' . date_time($xf.session.reportCounts.lastBuilt) : '' }}">{{ phrase('reports') }}</a>
</xf:if>
<!--[XF:mod_tools_menu:bottom]-->
</xf:contentcheck>
</div>
</div>
</xf:if>
<xf:if is="$xf.visitor.is_admin">
<a href="{{ base_url('admin.php') }}" class="p-staffBar-link" target="_blank">{{ phrase('admin') }}</a>
</xf:if>
</xf:contentcheck>
</div>
</div>
</div>
</xf:if>
Kod Bloğunu Siliyoruz Ardından
<div class="p-body">
<div class="p-body-inner">
<!--XF:EXTRA_OUTPUT-->
Kod Bloğu Altına
<xf:if contentcheck="true">
<div class="p-staffBar">
<div class="p-staffBar-inner hScroller" data-xf-init="h-scroller">
<div class="hScroller-scroll">
<xf:contentcheck>
<xf:if is="$xf.visitor.is_moderator && $xf.session.unapprovedCounts.total">
<a href="{{ link('approval-queue') }}" class="p-staffBar-link badgeContainer badgeContainer--highlighted" data-badge="{$xf.session.unapprovedCounts.total|number}">
{{ phrase('approval_queue') }}
</a>
</xf:if>
<xf:if is="$xf.visitor.is_moderator && !$xf.options.reportIntoForumId && $xf.session.reportCounts.total">
<a href="{{ link('reports') }}"
class="p-staffBar-link badgeContainer badgeContainer--visible {{ ($xf.session.reportCounts.total && ($xf.session.reportCounts.lastBuilt > $xf.session.reportLastRead) OR $xf.session.reportCounts.assigned) ? ' badgeContainer--highlighted' : '' }}"
data-badge="{{ $xf.session.reportCounts.assigned ? $xf.session.reportCounts.assigned|number . ' / ' . $xf.session.reportCounts.total|number : $xf.session.reportCounts.total|number }}"
title="{{ $xf.session.reportCounts.lastBuilt ? phrase('last_report_update:')|for_attr . ' ' . date_time($xf.session.reportCounts.lastBuilt) : '' }}">
{{ phrase('reports') }}
</a>
</xf:if>
<xf:if contentcheck="true">
<a class="p-staffBar-link menuTrigger" data-xf-click="menu" data-xf-key="alt+m" role="button" tabindex="0" aria-expanded="false" aria-haspopup="true">{{ phrase('moderator') }}</a>
<div class="menu" data-menu="menu" aria-hidden="true">
<div class="menu-content">
<h4 class="menu-header">{{ phrase('moderator_tools') }}</h4>
<xf:contentcheck>
<!--[XF:mod_tools_menu:top]-->
<xf:if is="$xf.visitor.is_moderator">
<a href="{{ link('approval-queue') }}" class="menu-linkRow">{{ phrase('approval_queue') }}</a>
</xf:if>
<xf:if is="$xf.visitor.is_moderator && !$xf.options.reportIntoForumId">
<a href="{{ link('reports') }}" class="menu-linkRow" title="{{ $xf.session.reportCounts.lastBuilt ? phrase('last_report_update:')|for_attr . ' ' . date_time($xf.session.reportCounts.lastBuilt) : '' }}">{{ phrase('reports') }}</a>
</xf:if>
<!--[XF:mod_tools_menu:bottom]-->
</xf:contentcheck>
</div>
</div>
</xf:if>
<xf:if is="$xf.visitor.is_admin">
<a href="{{ base_url('admin.php') }}" class="p-staffBar-link" target="_blank">{{ phrase('admin') }}</a>
</xf:if>
</xf:contentcheck>
</div>
</div>
</div>
</xf:if>
Ekliyoruz Şimdi Font Awesome İcon ve Ortalamak İçin
Extra.less İçerisine Ekliyoruz
// Staff bar
.p-staffBar{
border: 0;
border-radius: @xf-blockBorderRadius;
margin-bottom: 10px;
}
// Admin and moderator bar
.p-staffBar-inner{
padding-left: 4px;
padding-right: 4px;
// Reset default
max-width: none;
.hScroller-scroll{
display: flex;
}
}
.p-staffBar-link{
padding-left: 10px;
padding-right: 10px;
&::before{
.m-faBase();
.m-faContent(@fa-var-lock);
display: inline-block;
margin-right: 6px;
}
&[data-xf-key="alt+m"]::before{
.m-faContent(@fa-var-check-square);
}
&[href*='/admin']{
margin-left: auto;
}
}