1

I've been looking up the hooks that can be used with the Comment Module. But I don't think there is one I could use to filter the list of comments by entry author in the Control Panel. I'm trying to filter that list so users only see the comments on entries they've added.

Is there any existing add-ons that can do this? Or are there any hooks I could use to write an add-on myself?

Thanks in advance! Diederik.

1 Answer 1

1

One approach to only show comments on posts that have been authored by the logged in user is to use a conditional comparing logged_in_member_id to author_id. Do this inside your channel entries tag pair and embed the comment entries if the condition is met. Simplified example:

{exp:channel:entries channel="blog"}
    <h1>{title}</h1>
    {if logged_in_member_id == author_id}
        <p>You wrote this post, so can see these comments:</p>
        {embed="embeds/_comments"}
    {/if}
{/exp:channel:entries}
2
  • I wasn't really clear about this, sorry. I'm talking about comments listing in the backend...
    – Diederik
    May 16, 2013 at 9:49
  • Ah, I see. I had assumed front end. For the Control Panel you will probably have to build a custom module. I can't think of an existing tool to do that. PS - You should edit your question to make it clear that you're talking about the Control Panel not the front-end. This will give you a better shot at getting an answer. Plus it will push your question to the forefront again.
    – Alex Kendrick
    May 16, 2013 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.