Show last thread in private node

Liam C.

Member
Hello! Looking to modify something on our forums site. Right now we have private nodes in where users can submit threads, and only see their own threads, and staff can (of course) see these threads to handle them as they are used for reports, appeals, etc.

To improve user experience, we are looking to modify it to not show the 'private' phrase and instead show the user their own last thread.

Less:
        <div class="node-extra">
            <xf:if is="{$extras.privateInfo}">
                <span class="node-extra-placeholder">{{ phrase('private') }}</span>
            <xf:elseif is="{$extras.LastThread}" />
                <div class="node-extra-icon">
                    <xf:if is="$xf.visitor.isIgnoring($extras.last_post_user_id)">
                        <xf:avatar user="{{ null }}" size="xs" />
                        <xf:else />
                        <xf:avatar user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" size="xs" />
                    </xf:if>
                </div>

So from what I can tell, we'd continue with the if statement of privateInfo. Would like to some guidance on how I cold get this done.

My current thoughts are to add an if statement for author, so if thread author == xf visitor, then show last post but would that lead to any performance concerns? Or is there any better methods for doing so? We have quite a lot of these nodes, and each of these nodes have an archive for this too.

Any support would be handy! Thank you
 
Back
Top Bottom