Announcement

Collapse
No announcement yet.

How do I get viewable thread titles but can't read posts...?

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

  • How do I get viewable thread titles but can't read posts...?

    Here's what I need:

    A forum that is a 'tease' forum of important tips and information. I need it to be visible (did that with permissions) but have it so anybody can see the thread titles but only members of one specific additional user group can actually read post contents.

    How can permissions be set to allow viewing of thread titles in the forum but disallow actual reading of posts unless a member of a specific group?

    The problem right now is that to everyone without permission it just says last post "never" as in it's an empty forum.

  • #2
    That is currently how it works. I' not sure if this can be changed with template conditionals. If not, then it will require modifying the code. You can try asking over at vbulletin.org.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Ahh.. ok. Thanks.

      What about using a forum password while giving all users access to view threads? would that at least get rid of the "never/0" on the posts in the forum while only letting ppl with the password read them? Though I'd guess those without a password couldn't read the thread titles but at least it'd not look like an empty forum to them, right?

      Comment


      • #4
        Currently there is no separate permission to allow for 'teasing' like that. However, you can use templates conditionals to accomplish the same thing.

        Go to your:

        Admin CP -> Styles & Templates -> Style Manager -> « » -> Show Thread Templates -> SHOWTHREAD

        Find this code and add the red code:

        Code:
        <!-- end content table -->
        $spacer_close
        <!-- / end content table -->
        
        [color=red]<if condition="is_member_of($bbuserinfo, X)">[/color]
        
        <if condition="$show['threadedmode'] OR $show['hybridmode']">
        <!-- thread posts list -->
        $threadlist
        <!-- /thread posts list -->
        </if>
        
        <div id="posts">$postbits</div>
        
        [color=red]</if>[/color]
        
        <!-- start content table -->
        $spacer_open
        <!-- / start content table -->
        Where X is the usergroupid of the "one specific additional user group". That should work to hide thread content from everyone but that group. If you have multiple styles then this change will need to be applied to each style.

        You may also want to add an "else" to the code so a message is displayed for users who don't have access. For example:

        Code:
        <!-- end content table -->
        $spacer_close
        <!-- / end content table -->
        
        [color=red]<if condition="is_member_of($bbuserinfo, X)">[/color]
        
        <if condition="$show['threadedmode'] OR $show['hybridmode']">
        <!-- thread posts list -->
        $threadlist
        <!-- /thread posts list -->
        </if>
        
        <div id="posts">$postbits</div>
        
        [color=red]<else />
        
        	<div class="smallfont">You must be a member of whatever group to read threads in this forum.</div>
        
        </if>[/color]
        
        <!-- start content table -->
        $spacer_open
        <!-- / start content table -->

        Comment


        • #5
          Wow, thanks Jake!

          That's awesome... So, now just to clarify: That'd allow anyone with permission to view the forum the ability to view all the thread titles but if they actually clicked a thread name to read the thread posts they'd get that else warning instead?

          Also, if X is an additional user group, and 'Showthread' is a universal template, does that mean the whole bulletin board would work that way? If so, would I create a second style based off the first and then in the forum manager set that one forum to force to second special style?

          Comment


          • #6
            Originally posted by zaon
            That's awesome... So, now just to clarify: That'd allow anyone with permission to view the forum the ability to view all the thread titles but if they actually clicked a thread name to read the thread posts they'd get that else warning instead?
            Yeah. Basically you grant all viewing privs to everyone for the forum, but the template conditional will stop users from viewing posts within threads unless they are a member of that group.

            Originally posted by zaon
            Also, if X is an additional user group, and 'Showthread' is a universal template, does that mean the whole bulletin board would work that way? If so, would I create a second style based off the first and then in the forum manager set that one forum to force to second special style?
            Good point. I forgot about that detail.

            Yeah, either create a new style for the forum or use one style and add this to the condition:

            Code:
            <!-- end content table -->
            $spacer_close
            <!-- / end content table -->
            
            [color=red]<if condition="is_member_of($bbuserinfo, X) OR $forumid != Y">[/color]
            
            <if condition="$show['threadedmode'] OR $show['hybridmode']">
            <!-- thread posts list -->
            $threadlist
            <!-- /thread posts list -->
            </if>
            
            <div id="posts">$postbits</div>
            
            [color=red]</if>[/color]
            
            <!-- start content table -->
            $spacer_open
            <!-- / start content table -->
            Where Y is the forumid of the restricted forum. That should work.

            Comment


            • #7
              Ok... cool..

              Now, does that mean that the entire if/if and else conditionals only come into play if we're in the forum with ID of Y? So if Y doesn't = that specific tease forum, then the conditionals are ignored for all other forums on the boards?

              (just mak'n sure before I implement this code!! hehehe)

              Comment


              • #8
                Yeah, basically the code says if we are in forum Y then the user must be a member of group X for the posts to show. If we are not in forum Y then everyone can see the posts regardless.

                Comment


                • #9
                  Cool. It was the 'OR' statement that was confusing me.. but i'm not exactly a programmer though I try to act like I understand hehehe... but I've got enough now to try this.. thanks!

                  Originally posted by Jake Bunce
                  If we are not in forum Y then everyone can see the posts regardless.
                  And this won't override the lack of permission set by the usergroups to see private forums their group can't normally see at all, right? (even if they follow a direct thread link?)

                  Comment


                  • #10
                    Originally posted by zaon
                    And this won't override the lack of permission set by the usergroups to see private forums their group can't normally see at all, right? (even if they follow a direct thread link?)
                    Correct.

                    Comment


                    • #11
                      Thanks again! Try'n this now... will report back in a bit with results :-)

                      Comment


                      • #12
                        k, got it working except two issues:

                        1) It's also refusing to show post content to Admins and Mods who normally don't need to be members of that additional group to have access... How would we revise this code line to include also the user IDs of Admins and Mods groups:
                        Code:
                        <if condition="is_member_of($bbuserinfo, X) OR $forumid != Y">

                        2) The popup tool tips still shows partial thread post text as usual... This isn't too serious, and I could shorten it down some characters too for more of a tease... but if there's an EASY way to hold this in also just this forum then I'm game.. if not.. don't worry about it at all :-)

                        Comment


                        • #13
                          Originally posted by zaon
                          2) The popup tool tips still shows partial thread post text as usual... This isn't too serious, and I could shorten it down some characters too for more of a tease... but if there's an EASY way to hold this in also just this forum then I'm game.. if not.. don't worry about it at all :-)
                          Yeah, I just shortened the preview text to 100 characters.. just enough to get a feel for the thread without giving anything away reall..so no worries on this one...

                          But, on the first item in the above post, I'd like to do that in the code there without having to add that group as a secondary group to admins/mods due to a few reasons... That gonna be easy to work in a few "OR" statements or whatever in what X can equal?

                          Comment


                          • #14
                            Think I figured it out... so this is what I need, right:

                            Code:
                            <if condition="is_member_of($bbuserinfo, 12) OR is_member_of($bbuserinfo, 5) OR is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 7) OR $forumid != 43">

                            Comment


                            • #15
                              That looks correct.

                              Comment

                              Loading...
                              Working...
                              X