Welcome to xfleaks.com

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

XF 2.2+ how to custom create stuff on the admin and moderator line on xenForo 2.2 (See Picture Attached)

Anonymous

Site Owner
Administrator
Joined
Jun 2, 2022
Messages
2,270
Reaction score
113
Points
120
Location
USA
Screenshot 1

If you want to create something like this, you must make 2 template edits.
  1. Go to templates, find the Page Container template.
  2. Click to edit that template (Page Container)
Look for this in your page container:

Code:
<xf:if is="$xf.visitor.is_admin">
                    <a href="{{ base_url('admin.php') }}" class="p-staffBar-link" target="_blank"><i class="fas fa-user-cog"></i> {{ phrase('admin') }}</a>
                </xf:if>

Right under that, you will want to add the following code, you can edit it to your words.
Remember this is only the first edit. The styling is controlled in the extra less template, that we will get to in a minute.


Code:
<xf:if is="{{$xf.visitor.isMemberOf([1, 2, 3, 4, 20])}}">
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> Free Downloads: <font color="orange"><b>Enabled</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> All Users Can Download: <font color="orange"><b>20 Resources Per Day</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> Sharing our Resouces is: <font color="orange"><b>Allowed</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-users"></i> Invite Your: <font color="orange"><b>Friends</b></font></a>  
               
                </xf:if>

Once you have whatever you want to say in there, save the template.
Now load (edit) extra.less template

At the top of your extra.less file, on line 1
you will want to add the following code and style it however you want.
Remember the look of the "Button" is controller here.


Code:
// This class controls the p staff member bar at the very top of the screen (admin and moderator bar)
.staffbarinfo {
  background: black !important;
  border-color: #00ffdc !important;
  border-radius: 5px !important;
  font-weight: 500 !important;
  padding: 5px;
  padding-right: 5px;
  padding-left: 5px;
 }
 

fsivasly

New Member
Joined
Mar 13, 2021
Messages
1
Reaction score
0
Points
1
Age
37
Location
RU
View attachment 2908

If you want to create something like this, you must make 2 template edits.
  1. Go to templates, find the Page Container template.
  2. Click to edit that template (Page Container)
Look for this in your page container:

Code:
<xf:if is="$xf.visitor.is_admin">
                    <a href="{{ base_url('admin.php') }}" class="p-staffBar-link" target="_blank"><i class="fas fa-user-cog"></i> {{ phrase('admin') }}</a>
                </xf:if>

Right under that, you will want to add the following code, you can edit it to your words.
Remember this is only the first edit. The styling is controlled in the extra less template, that we will get to in a minute.


Code:
<xf:if is="{{$xf.visitor.isMemberOf([1, 2, 3, 4, 20])}}">
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> Ücretsiz İndirmeler: <font color="orange "><b>Etkin</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> Tüm Kullanıcılar İndirebilir: <font color= "orange"><b>Günde 20 Kaynak</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-download"></i> Kaynaklarımızı Paylaşmak: <font color= "orange"><b>İzin verildi</b></font></a>
                <a href="#" class="p-staffBar-link staffbarinfo" style="float:right;"><i class="fas fa-users"></i> Davet Edin: <font color="orange "><b>Arkadaşlar</b></font></a> 
              
                </xf:if>[/KOD]

[B]Söylemek istediklerinizi orada bulduktan sonra şablonu kaydedin.
Şimdi extra.less şablonu yükleyin (düzenleyin)

extra.less dosyanızın en üstünde, 1. satırda
aşağıdaki kodu eklemek ve istediğiniz gibi biçimlendirmek isteyeceksiniz.
"Düğme" görünümünün burada denetleyici olduğunu unutmayın.[/B]

[KOD]// Bu sınıf, ekranın en üstündeki p personel çubuğunu kontrol eder (yönetici ve moderatör çubuğu)
.personel bilgisi {
  arka plan: siyah !önemli;
  kenarlık rengi: #00ffdc !important;
  sınır yarıçapı: 5 piksel !önemli;
  yazı tipi ağırlığı: 500 !önemli;
  dolgu: 5 piksel;
  dolgu-sağ: 5px;
  dolgu-sol: 5px;
 }[/KOD]
[/QUOTE]
teşekkür ederim
 
Top Bottom