XF 2.2 How to add a group legend in footer?

brejsic

New member
Hello all,

I have one question to get started with this script- like in title - how to add a group legend in footer?

To illustrate, it is about something like this:

Screenshot 2021-10-17 at 06-10-35 WebFlake.webp
 
If you are trying to put it in widget_members_online, it really depends on the theme you are using. If you are using the default XenForo theme, which I base the themes I designed after, look for something like this:
HTML:
<div class="block-footer">
            <span class="block-footer-counter">{{ phrase('online_now_x_members_y_guests_z',{
                'total': number($online.counts.total),
                'members': number($online.counts.members),
                'guests': number($online.counts.guests)})
            }}</span>
        </div>
You can either put things in that block after the </span>, or create a new block like this:
HTML:
<div class="block-footer">
            <span class="block-group-key">
                <span class="username--style33">Chief Executive Officer</span>,
                <span class="username--style34">Chief Operating Officer</span>,
                <span class="username--style30">Managing Director</span>,
                <span class="username--style24">Chairperson</span>,
                <span class="username--style31">Director</span>,
                <span class="username--style32">Vice-Director</span>,
                <span class="username--style38">Deputy-Chairperson</span>,
                <span class="username--style37">Court Justice</span>,
                <span class="username--style35">Auditor</span>,               
                <span class="username--style19">Shareholder</span>,
                <span class="username--style20">Foreign-VIP</span>,
                <span class="username--style2">Visitor</span>,
                <span class="username--style45">Bot</span>
            </span>
        </div>
This could be refined more by those more familiar with how XenForo code works though.

This would then look something like this:

1634573076805.webp

Edit: Spacing went weird copying that code in, but you should get the gist.
 
Last edited:
Back
Top Bottom