XF 2.2 How to add a group legend in footer?


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
The markup would need to be created manually.

You can use an ad template to display it in that location, or edit the PAGE_CONTAINER template directly.
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:
<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)})
You can either put things in that block after the </span>, or create a new block like this:
<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>
This could be refined more by those more familiar with how XenForo code works though.

This would then look something like this:


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