Monday, October 3, 2011

Jomsocial Group Bulletin email off

Working on one of the sport site developed in Joomla, as usual Jomsocial is installed. Client requirement was that he didn't want to get email when users of the site created jomsocial group bulletin. Its jomsocial's default behavior that it sends mail to all member of the group when group bulletin created. I made the correct change in a correct file after spending couple of hours.
If you want to off the mail of group bulletin creation then you need to override Jomsocial group controller. Well you can't override the jomsocial controller file so easily as you override template file.
To know more about how to override jomsocial controller you need to wait for my new post.
Go to the components->com_community->controller->groups.php file & comment the lines from line no. 3014 to 3024. Make sure these line contains the following code.
/*
$model =& $this->getModel( 'groups' );
$memberCount = $model->getMembersCount($groupId);
$members = $model->getMembers($groupId, $memberCount , true , false , SHOW_GROUP_ADMIN );
$membersArray = array();
foreach($members as $row)
{
$membersArray[] = $row->id;
}
unset($members);
*/
After that Jomsocial won't send email to members of the group when member creates bulletin for the group. However this worked for me for Jomsocial 2.2.4 version. I am not sure whether it works for other versions for that you need to just make sure where the above code is & i guess it won't be a big deal.
Note :- Don't waste your time to search back-end option to make jomsocial group bulletin off.

No comments:

Post a Comment