Announcement

Collapse
No announcement yet.

Conditional Help - Display Message On Specific Forum To Unregistered Users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditional Help - Display Message On Specific Forum To Unregistered Users

    I have a forum that's content is hidden to unregistered users. When they hit it they just get an empty forumdisplay page. What I'd like to do is add a message to the page under an adblock I already have that says - 'The contents of this forum are only visible to members who've completed the registration process. Register now, it's free'

    I only want this block to show up on a single forumdisplay - not all of them, and then it's only visible too unregistered members and members awaiting email confirmation. I've fiddled a bit with conditionals, but I'm a bit lost with it. So far I have this:
    Code:
    <if condition="is_member_of($post, 1) AND THIS_SCRIPT == 'FORUMDISPLAY' AND !in_array($foruminfo['forumid'], array(80))">
    <!-- open content container -->
    </if>
    I don't know how to do multiple usergroups in the member of bit, or how to make it work. Pointers appreciated. And if there's an easier way of doing, let me know...


  • #2
    This will work in most of the main templates:

    Code:
    <if condition="$forumid == [color=red]X[/color] AND is_member_of($bbuserinfo, 1, 3)">
    
    </if>
    Where X is the forumid of the forum.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X