Announcement

Collapse
No announcement yet.

Protecting from VIEWING a thread...?

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

  • Protecting from VIEWING a thread...?

    Hey everyone...

    Is there a way for a certain usergroup (in this case, well say "registered" group) to view the CONTENTS of a forum but can't view what's in them?

    For example, lets say there's a forum called General Chat, and in there, there are about 50 threads going on. I want the user to be allowed to VIEW the titles but get an ACCESS DENIED message when he clicks on one of them...

    I checked the Forum permissions, but all it says is "View other's threads", but thats not the effect Im looking for.

    Is this possible? - How?

  • #2
    you could do a lil trick ;D

    in the postbit / postbit_legacy template find
    HTML Code:
    $post[message]
    with
    HTML Code:
    <if condition="$bbuserinfo[usergroupid] == X]$post[message]<else />What youd Like to say to them here :)</if>
    replace X with the userid

    if there part of an additional usergroup this will need to be changed abit

    Comment


    • #3
      Well, that didnt work Any other ideas?
      Last edited by b00tsauce; Sun 21 Dec '03, 11:36pm.

      Comment


      • #4
        erm >.< i got that backwords
        HTML Code:
        <if condition="$bbuserinfo[usergroupid] != 1"]$post[message]<else />What youd Like to say to them here :)</if>

        Comment


        • #5
          That still isnt working, Faranth.

          I basically want the whole post to be protected, you know what I mean? Not only at the $post[message] level.

          If THIS user is not part of THIS group, then post the error/unregistered screen.
          If THIS user is part of THIS group, then post message.

          After testing it out with your code, this is what I get:

          The following error occurred when attempting to evaluate this template:

          Parse error: parse error in [...]/msgboard/includes/adminfunctions_template.php(2960) : eval()'d code on line 108

          This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

          Any other ideas?
          Last edited by b00tsauce; Wed 24 Dec '03, 12:08pm.

          Comment


          • #6
            if you dont want them to be able to view it id suggest asking for hacking help at vbulletin.nl



            bah im a dolt

            <if condition="$bbuserinfo[usergroupid] != 1"]>$post[message]<else />What youd Like to say to them here </if>



            use that it WILL work ^^ i forgot a thing

            Comment


            • #7
              You just reposted the SAME SAME thing as the post above!

              I guess Ill have to ask at vbulletin.nl or something. Im sure this is something simple anyway...

              Comment


              • #8
                That might require hacking since you want members to be able to view the forum but get the nopermission page on thread viewing.

                What Faranth suggested will hide post contents from members (meaning, it will show the actualy thread)
                Chamber of Secrets - The Ultimate Harry Potter Community!

                Comment


                • #9
                  Yeah, I would be open to that...but it's not working

                  Comment


                  • #10
                    Looks like Faranth was on the right track, but the syntax was a tad off

                    Here's the good syntax:

                    <if condition="$bbuserinfo[usergroupid] != 1">$post[message]<else />What youd Like to say to them here </if>

                    Comment


                    • #11
                      Editing the usergrup you don't want them to see posts and setting not to view user posts? maybe that could help..

                      Comment


                      • #12
                        Originally posted by b00tsauce
                        Looks like Faranth was on the right track, but the syntax was a tad off

                        Here's the good syntax:

                        <if condition="$bbuserinfo[usergroupid] != 1">$post[message]<else />What youd Like to say to them here </if>
                        Does it work properly now?

                        Comment


                        • #13
                          yes it does
                          Attached Files

                          Comment


                          • #14
                            how can I add 2 usergroups that I don't want them to see the post? For now I have the unregistered people who cant see the post, but what if I want to add 2 groups in the same condition?

                            <if condition="$bbuserinfo[usergroupid] != 1,2">$post[message]<else />What youd Like to say to them here </if>

                            Is this the right syntax?

                            Comment


                            • #15
                              no, simply say

                              <if condition="$bbuserinfo[usergroupid] != 1 OR $bbuserinfo[usergroupid] != 2">
                              Chamber of Secrets - The Ultimate Harry Potter Community!

                              Comment

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