Not a bug HTML widget will not show in Forum list: Sidebar if in Advanced mode

frm

Well-known member
Affected version
2.3.2
2.3.2/replicated on XF demo

HTML widget will not show in Forum list: Sidebar if in Advance Mode (not tested in other positions).

Advanced mode off:
Screenshot_20240831_115214_Chrome.webp

Advanced mode on:
Screenshot_20240831_115231_Chrome.webp
 
This one?
1725092475538.webp

Where are the basics and necessary block??
If you want to use the Advanced mode you need to build manually blocks... For example:
HTML:
<div class="block">
    <div class="block-container">
        <div class="block-row">
            YOUR CODE
        </div>
    </div>
</div>
 
Using this new code as the block:
HTML:
<div class="block">
  <div class="block-container" data-widget-id="19" data-widget-key="inviteFriends" data-widget-definition="html">
    <div class="block-row">
        .
      <a class="shareButtons-button shareButtons-button--share is-hidden" data-xf-init="web-share" data-text="
                <xf:if is=" $xf.visitor.Profile.custom_fields.userRealName">
        {{ $xf.visitor.Profile.custom_fields.userRealName }} (@{{ $xf.visitor.username }})
        <xf:elseif is="$xf.visitor.username" /> @{{ $xf.visitor.username }}
        <xf:else /> Someone </xf:if> thought that you would enjoy {{ $xf.options.boardTitle }} — {{ $xf.options.boardDescription }}. {{ $xf.options.boardTitle }} can be found at: {{ $xf.options.homePageUrl }} However, they might think that you would be more interested in this:" data-hide=".shareButtons-button:not(.shareButtons-button--share)"> <img src="{{ $xf.homePageUrl }}/invite.png">
      </a>
    </div>
  </div>
</div>
And this CSS in {ICODE}extra.less[/ICODE]
CSS:
@media (max-width: @xf-responsiveNarrow)
{
    .block[data-widget-key="inviteFriends"]
    {
      display: none;
    }
}

Still doesn't want to get rid of it on a larger viewport using this in extra.css

 
Remove data-widget-id="19" data-widget-key="inviteFriends" data-widget-definition="html" from the block-container div and add this {{ widget_data($widget) }} to the block div instead
 
Remove data-widget-id="19" data-widget-key="inviteFriends" data-widget-definition="html" from the block-container div and add this {{ widget_data($widget) }} to the block div instead
Thanks for the help! I’ve updated the tutorial to now support XF 2.3, XF 2.2.9 and newer, as well as XF 2.2.8 and older.

The discussion of the tutorial explains how to skip the CTA method (image) and simply update the Share Font Awesome link to include such a personalized message as mentioned in this XF suggestion.
 
Back
Top Bottom