i want to add a hack to the ownerblock that displays how many posts a person has in their messageboard, iv been able to do how many messageboard items that user has posted but i want the count of how many items they have in their messageboard kind like this, this is how i did it for my how many files a user has uploaded
$content_menu .= '<br>';
$content_menu .= elgg_echo('file');
$content_menu .= ' (';
$content_menu .= elgg_get_entities_from_relationship_count(array(
'types' => 'object',
'subtypes' => 'file',
'owner_guid' => elgg_get_page_owner_guid(),
'full_view' => false,
'view_toggle_type' => false,
'count' => true
));
$content_menu .= ')';
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.
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Jpardee@joshpardee
Jpardee - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
You must log in to post replies.Messageboard comments are saved as annotations, they are not entities. Use elgg_get_annotations() instead
so it would be
'types' => 'object',
'subtypes' => 'messageboard_comments',
????
where owner_guid is the user's guid value.