@NIkolai: the code, you suggested removes entire email notification system. Its like for treating a small ulcer in little toe, you are doing an amputation of the limb. ;)
@Jerome: I understood the logic on creating subscription to some entities (provided these entities are useful / visible for the users) for receiving future updates on that entity.
But imagine a case scenario where I am creating an entity for internal need only - this entity is never exposed to the end user - (no user will be able to edit / delete / view / comment / like on this entity). In such case what's the use of subscribing the user to this entity? In my special case, I need to create numerous such hidden entities, which is causing unwanted entries in the relationship table. Can we have an option as below, so that developer can easily disable user subscription to specific entities?
Thank you.
But imagine a case scenario where I am creating an entity for internal need only - this entity is never exposed to the end user - (no user will be able to edit / delete / view / comment / like on this entity). In such case what's the use of subscribing the user to this entity?
Good point.
I like your suggestion of a capability.
For now you can always listen to the 'create', 'relationship' hook. You can than check if it's a notification relationship with your entity and return false.
Seems, you can only do it using custom CSS styles
I managed to achieve this by passing
Then I copied elgg/views/default/page/components/table.php to mod/myplugin/views/default/page/components/my-custom-list-type and added my conditions in that file.
In this case, your initial code should work as is.
Try use:
'item_class' => "elgg-item $class_name_based_on_metadata",
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.