Jump to content

Add items to comment control menu


Recommended Posts


Your comment controls menu currently has the following check: 

{{if $comment->canEdit() || $comment->canSplit() || $comment->canHide()}}

If we want to add something to this menu it means we have to overload one of these methods or rely on one of them to be true, which is not ideal.

Could you add a more generic function for checking whether a comment should have this control menu appear? 

I also want the control menu to be possible to have on the first post in a topic, so if you could make that a possibillity as well I would appreciate it. 

Link to comment
Share on other sites

Thanks, @Daniel F.

But this area seems a bit confusing to me when I look closer into it. 

Those options also includes "Recommend" when I look at my install, so I guess it's really this check that it does?

{{if $comment->canPromoteToSocialMedia() || $comment->canDelete() || $comment->canSplit() || ( $comment instanceof \IPS\Content\Hideable AND ( ( !$comment->hidden() and $comment->canHide() ) || ( $comment->hidden() and $comment->canUnhide() ) ) ) || ( $comment->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}

But I'm pretty sure I chose the selector inside the if-check I presented above, so not sure what I'm missing here.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...