How To Allow Viewing of Thread Links But Not Posts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    How To Allow Viewing of Thread Links But Not Posts

    Currently there is no separate permission for viewing posts independent of their thread links. However, you can use templates conditionals to accomplish the same thing.

    First make sure the users in question have permission to view threads. Then go to your:

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

    Find this code and add the red code. In this example the conditional disallows viewing of posts for guests. Other applications will use a different condition:

    Code:
    <!-- end content table -->
    $spacer_close
    <!-- / end content table -->
    
    [color=red]<if condition="$bbuserinfo['usergroupid'] != 1">[/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 -->
    This will make it so posts only show up for users who are not guests. Like I said, other applications will use a different condition. 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="$bbuserinfo['usergroupid'] != 1">[/color]
    
    <if condition="$show['threadedmode'] OR $show['hybridmode']">
    <!-- thread posts list -->
    $threadlist
    <!-- /thread posts list -->
    </if>
    
    <div id="posts">$postbits</div>
    
    [color=red]<else />
    
    $spacer_open
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="alt1">
    	<div>Message that is displayed if user does not have permission to view posts.</div>
    	</td>
    </tr>
    </table>
    
    $spacer_close
    
    </if>[/color]
    
    <!-- start content table -->
    $spacer_open
    <!-- / start content table -->
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    The Printable Version page must also be edited to prevent users from viewing posts by that means. Go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Printable Thread Templates -> printthread

    As above, add the red code:

    Code:
    	(<span class="smallfont"><em>$vboptions[bburl]/showthread.php?t=$threadid</em></span>)
    </div>
    
    <br />
    
    [color=red]<if condition="$bbuserinfo['usergroupid'] != 1">[/color]
    
    $postbits
    
    [color=red]<else />
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="alt1">
    	<div>Message that is displayed if user does not have permission to view posts.</div>
    	</td>
    </tr>
    </table>
    
    </if>[/color]
    
    <br />
    
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr valign="top">

    Comment

    • Freddie Bingham
      Former vBulletin Developer
      • May 2000
      • 14057
      • 1.1.x

      #3
      vBulletin 3.5 will have a permission that controls this, labeled "Can View Thread Content". If you give a usergroup Can View content but not Can View Thread Content, then they will be able to browse forumdisplay but not enter threads. They will also see the threads on New Posts or Daily Posts, but likewise can't enter them. The threads will also return results if the user does a search on thread titles (but not posts or showing results as posts). Members will also be able to subscribe to these forums and receive updates about new threads, but not subscribe to the actual threads.

      That should give what most people are wanting in being able to tease members into what else is available on your forums.

      Comment

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