Set access_id for comment

Hi all.

I want to set access_id=private for not admin user. 

the admin in a second time will change the access id than normal.
Used to create a sort of comment moderation very simple.
I found the following function and I was wondering if I could tie it to the action "leave a comment".
What do you think? Do you have suggestions on how to do?

function annotate(
                  $name,           // The name of the annotation type (eg 'comment')
                  $value,          // The value of the annotation
                  $access_id = 0,  // The access level of the annotation
                  $owner_id = 0,   // The annotation owner, defaults to current user
                  $vartype = ""    // 'text' or 'integer'

As always thanks in advance for your reply.

In action/comment/add i can try to override like...

$annotation = create_annotation($entity->guid,
'0'); [instead of # $entity->access_id); 0=ACCESS_PRIVATE]


So I will have also a private comment, right?

after i must to set an only admin action in edit to change the access_id from 0 to $entity->access_id.


This my think...


Warning:  obviously this is not a hack I always refer to the possibility of an override by the example mod is to figure out how to change the action.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking