I want only friends of a user to post on message board and send messages. any code I could add to existing plugin will be helpful
Those should be pretty simple modifications to make. You'll need to wrap the add form output and the actions for both plugins in a check to see if the user trying to send a message is a friend. To do this, use the check_entity_relationship() function like:
if (check_entity_relationship($logged_in_user, 'friend', $user_receiving_the_message) {
// let it go
} else {
register_error('You have to be a friend to message this person.');
forward(REFERRER);
}
@jetwumoore there's already a plugin that let's you choose whether you want your friends to send you or anyone:
http://community.elgg.org/pg/plugins/release/315864/developer/slyhne/messages-with-privacy-option-11
Rodolfo Hernandez
Arvixe/Elgg Community Liaison
Well it's easy enough to create a cron job using Elgg, that combined with a function that deletes entities from age does the job.
In your plugins start.php you should just place a line like this, and create a function that does your thing :-)
register_plugin_hook('cron', 'weekly', 'your_cunning_function_cron_hook');
Good luck
I have not created any plugin. Never tried. I guess no solution for now
please make some plugin like this ?
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.