XF 2.1 Visitor Panel Header

audio

Member
Could someone please show how to make the header bar show on the visitor's panel like my Members Online panel.
1576096186836.webp
 
The way I did it was to edit the widget_visitor_panel template, changing the contents to
Code:
<xf:if is="$xf.visitor.user_id">
    <div class="block"{{ widget_data($widget) }}>
        <div class="block-container">
        <h3 class="block-minorHeader">{$title}</h3>
        <div class="block-body block-row">
                <xf:macro template="account_visitor_menu" name="visitor_panel_row" />
            </div>
        </div>
    </div>
</xf:if>

Then I added this in the in extra.less template to add an icon before the widget title
Code:
.block[data-widget-definition="visitor_panel"]{
    .block-minorHeader{
        &::before{
            display:inline-block;
            font:normal normal normal 18px/1 "Font Awesome 5 Pro";
            text-rendering:auto;
            line-height:1;
            -webkit-font-smoothing:antialiased;
            -moz-osx-font-smoothing:grayscale;
            transform:translate(0, 0);
            width:auto !important;
            content:'\f2c1';
        }
    }
}

Screenshot_2019-12-11 Online Discussions.webp
 
Thank you @Gemma

This is an oldie but goodie

I left out everything in extra_less and only used your template to make it look exactly like I wanted.


Happy Thank U GIF
 
The way I did it was to edit the widget_visitor_panel template, changing the contents to
Code:
<xf:if is="$xf.visitor.user_id">
    <div class="block"{{ widget_data($widget) }}>
        <div class="block-container">
        <h3 class="block-minorHeader">{$title}</h3>
        <div class="block-body block-row">
                <xf:macro template="account_visitor_menu" name="visitor_panel_row" />
            </div>
        </div>
    </div>
</xf:if>

Then I added this in the in extra.less template to add an icon before the widget title
Code:
.block[data-widget-definition="visitor_panel"]{
    .block-minorHeader{
        &::before{
            display:inline-block;
            font:normal normal normal 18px/1 "Font Awesome 5 Pro";
            text-rendering:auto;
            line-height:1;
            -webkit-font-smoothing:antialiased;
            -moz-osx-font-smoothing:grayscale;
            transform:translate(0, 0);
            width:auto !important;
            content:'\f2c1';
        }
    }
}

View attachment 214985

One of those things, I did not realize I needed. Thank you for answering this.

Web capture_17-6-2022_222915_user.oo5dynasty.com.webpWeb capture_17-6-2022_222535_user.oo5dynasty.com.webp
 
Which widget is it?
By @BassMan
Gives you the ability to add account widget to many different sections of your site. A really cool add-on. I have his premium service cause it’s an amazing deal!
 
Top Bottom