Author Topic: custom bbc tag 'only_members'  (Read 229 times)

Offline MoonCat

  • Newbie
  • *
  • Posts: 6
custom bbc tag 'only_members'
« on: January 19, 2020, 06:53:54 PM »
Hi SMF developers,

I have created bbc tag 'only_members' which hides parts of the text from the guest (inviting them to register) or showing the whole text for the registered members. The problem is that within those tags I can't include other tags, as the content is unparsed.

here is the relevant code:

Code: [Select]
                'tag' => 'only_members',
                'type' => 'unparsed_content',
                'content' => $context['user']['is_logged'] ? '$1' : '<br /><span class="topslice"><span></span></span> <div class="padding">' . $txt['guestview_not_allowed'] . '</div>
<span class="botslice"><span></span></span>',

any ideas, how I can control the content, but at the same time get it parsed?