XF 2.0 is it possible to let users only see their own messages AND when threads are merged?

Escobar

Active member
basically as title says is it possible to let users only see their own messages and when threads are merged view their own post in the threads only?
 
In post_macros, find
HTML:
{{ bb_code($post.message, 'post', $post) }}
Replace with
HTML:
                                <xf:if is="{$xf.visitor.user_id} == {$post.user_id} OR {$xf.visitor.is_staff}">
                                    {{ bb_code($post.message, 'post', $post) }}
                                    <xf:else />
                                        <div class="noViewPermission">
                                            You can only view your own messages.
                                        </div>
                                </xf:if>
You will probably need to modify other templates aswell, like preview etc.
 
In post_macros, find
HTML:
{{ bb_code($post.message, 'post', $post) }}
Replace with
HTML:
                                <xf:if is="{$xf.visitor.user_id} == {$post.user_id} OR {$xf.visitor.is_staff}">
                                    {{ bb_code($post.message, 'post', $post) }}
                                    <xf:else />
                                        <div class="noViewPermission">
                                            You can only view your own messages.
                                        </div>
                                </xf:if>
You will probably need to modify other templates aswell, like preview etc.
Could you also tell me what other templates i would have to edit? as i will add it to a live board :P
 
Back
Top Bottom