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.
EDIT:
In action/comment/add i can try to override like...
$annotation = create_annotation($entity->guid,
'generic_comment',
$comment_text,
"",
$user->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.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.