Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Please help

Quote Reply
Please help
Hello,

is there possibly a simple way in excluding from <%loop post_loop%> all threads that a logged in user has not started himself?

The point is to create a category where registered users can only have a private threaded discussion with the forum admins.

If this requires a special global or plug in, please let me know.

Thank you for your help
Quote Reply
Re: [nt6] Please help In reply to
You can use the special instruction '<%nextloop%>' to skip the current loop (i.e. post). So, in this case, you could use something like:

<%unless user_id_fk == $current_user_id%><%nextloop%><%endunless%>

immediately after the <%loop post_loop%>.

Be warned that this isn't a perfect solution - although you won't show any extra posts, the post loop still only has 25 (typically) posts in it - if the current user didn't post any of the 25 on the page they're on, they won't see any posts on the page. A more elegant solution would require a custom plugin to handle only returning the relevant posts for the post_loop.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Please help In reply to
Thank you. This did the trick quite well.

Smile