Announcement

Collapse
No announcement yet.

Use If Conditions to exclude guest users from seeing parts of the forums

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

  • Use If Conditions to exclude guest users from seeing parts of the forums

    I want to build the most secure forum to prevent spamming etc (like silent spamming via homepage links etc).

    I want to prevent Usergroup 3 and 5 (Not Logged in/Guest and Users Awaiting E-mail confirmation). I want to hide members list, and also am thinking about blocking reply, new post etc also.

    So what is the condition to do if usergroup is not 3 and 5 then display those options (seems the easist way) so

    PHP Code:
    <f condition "usergroup != 3, 5"option<if> 
    something like that (no clue on conditions)

    Thanks Also should add the option if user can't do something then to not display that feature (like for the calendar)

  • #2
    You could use

    Code:
    <if condition="!is_member_of($bbuserinfo, 3) OR !is_member_of($bbuserinfo, 5)">
    PUT THE PAGE TEMPLATE HERE
    <else />
    PUT AN ERROR MESSAGE HERE
    </if>
    Where you place the entire code of the template you want to restrict.

    Comment


    • #3
      Originally posted by merk
      You could use

      Code:
      <if condition="!is_member_of($bbuserinfo, 3) OR !is_member_of($bbuserinfo, 5)">
      PUT THE PAGE TEMPLATE HERE
      <else />
      PUT AN ERROR MESSAGE HERE
      </if>
      Where you place the entire code of the template you want to restrict.
      Thanks, but the else isn't requires since they won't see anything. Can you combine the groups to 3, 5?

      Comment


      • #4
        Originally posted by merk
        You could use

        Code:
        <if condition="!is_member_of($bbuserinfo, 3) OR !is_member_of($bbuserinfo, 5)">
        PUT THE PAGE TEMPLATE HERE
        <else />
        PUT AN ERROR MESSAGE HERE
        </if>
        Where you place the entire code of the template you want to restrict.
        Thanks, but the else isn't requires since they won't see anything. Can you combine the groups to 3, 5?

        Comment


        • #5
          Not the way you're thinking. I released a hack on vBulletin.org that changes is_member_of to do what you want, but there isnt any need for this.

          Comment

          Loading...
          Working...
          X