Xenforo 2.1 Custom Staff And Admin Page

fakemasked

Well-known member
Registered
Joined
Apr 10, 2023
Messages
77
Points
8

Reputation:

Can anyone tell me how can I show total thread , Dragonbytes credit and his usergroup in custom Page

want to create a custom Page for admin mods and VIP user
Screenshot_20230429-010243_Chrome.jpg

I already made a page but don't know how to call it it's a Statics not dynamic so kindly help me to update thread , credit, and reputation and admin name
@BattleKing
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
595
Points
103

Reputation:

Make a new page node, then add html and css.
Just in case you need the vars for displaying the stats, here are the variables for the "statistics on the page".

Thread:

Code:
{{ $user.eaetc_thread_count }}
---- You need https://enxf.net/resources/eae-add-ons-thread-count.2519/ since XF doesn't support thread count by default

Credits:

Code:
<xf:set var="$viewableCurrencies" value="{{ $xf.app.em.getRepository('DBTech\Shop:Currency').getViewableCurrencies() }}" />
                            <xf:if is="$viewableCurrencies is not empty && $xf.options.dbtech_shop_points_postbit.0">
                                <xf:foreach loop="$viewableCurrencies" value="$currency" if="$currency.postbit">
                                    {$currency.prefix}{{ $currency.getValueFromUser($user) }}{$currency.suffix}
                                </xf:foreach>
                            </xf:if>
Reputation:

Code:
{$user.mrs_reputation_count|number}

---- To make this work, you need https://enxf.net/threads/reputation-system.3608/ or get it from somewhere else (MMO Reputation System)
 

fakemasked

Well-known member
Registered
Joined
Apr 10, 2023
Messages
77
Points
8

Reputation:

Make a new page node, then add html and css.
Just in case you need the vars for displaying the stats, here are the variables for the "statistics on the page".

Thread:

Code:
{{ $user.eaetc_thread_count }}
---- You need https://enxf.net/resources/eae-add-ons-thread-count.2519/ since XF doesn't support thread count by default

Credits:

Code:
<xf:set var="$viewableCurrencies" value="{{ $xf.app.em.getRepository('DBTech\Shop:Currency').getViewableCurrencies() }}" />
                            <xf:if is="$viewableCurrencies is not empty && $xf.options.dbtech_shop_points_postbit.0">
                                <xf:foreach loop="$viewableCurrencies" value="$currency" if="$currency.postbit">
                                    {$currency.prefix}{{ $currency.getValueFromUser($user) }}{$currency.suffix}
                                </xf:foreach>
                            </xf:if>
Reputation:

Code:
{$user.mrs_reputation_count|number}

---- To make this work, you need https://enxf.net/threads/reputation-system.3608/ or get it from somewhere else (MMO Reputation System)
Waduhekcode showing 0 0 only i want it for specific user like if admin : totalpost of admin or total credit of admin
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
595
Points
103

Reputation:

code showing 0 0 only i want it for specific user like if admin : totalpost of admin or total credit of admin
fakemaskedThen do something like

Code:
    <xf:if is="{$xf.visitor.is_admin}">
        Show content...
    </xf:if>

or

<xf:if is="{$post.User.isMemberOf(3)}">

replace 3 with the usergroup id of admingroup
 

fakemasked

Well-known member
Registered
Joined
Apr 10, 2023
Messages
77
Points
8

Reputation:

Thanks alot @Waduhek and how can I call a usergroup and show usergroup and banner style in that page
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
595
Points
103

Reputation:

Thanks alot @Waduhek and how can I call a usergroup and show usergroup and banner style in that page
fakemaskedTry:

Code:
Username: <xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" />

Banner: <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="jobTitle" />
 

fakemasked

Well-known member
Registered
Joined
Apr 10, 2023
Messages
77
Points
8

Reputation:

Let me try
<xf:if is="{$xf.visitor.is_admin}">
Show content...
</xf:if> is not working
 

fakemasked

Well-known member
Registered
Joined
Apr 10, 2023
Messages
77
Points
8

Reputation:

Yes I did but it doesn't worked with or without
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
595
Points
103

Reputation:

View previous replies…

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
595
Points
103

Reputation:

Can you give me example of this photo vai code so I can understand and implement according to my needs because u won't be able to understand
fakemaskedI don't know what's not working for you.

Code:
{{ $user.message_count }}

Should show you post count.
 
Top