We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Groups approval: send admin notification about new created groups [Solution available] | Forum

Jochen
Jochen May 11 '14
Hi all,

I need a groups approval tool, which notifies the admin about new created group(s).

Eventually there is a setting I did not recognize ?

If not, I need code-addition/modification.  Anyone who can code this for me ?
I will be glad about offers,   br, Jochen

P.S.: I am using oxwall version 1.6.0

The Forum post is edited by Alia May 14 '14
Alia Team
Alia May 14 '14
1. Notifying admin about new groups.
One way around  is sending a message to particular email whenever new group is added. This is just a raw solution to give you an idea what can be done and where.

File to edit: ow_plugins/groups/controllers/groups.php
Function within the file:  public function process()
Where to add: right before  return $group;
Code to add:

     /**
     * Custom code
     * sends youremail@gmail.com an email with the title of the added group
     */
        $mail = OW::getMailer()->createMail();
                $mail->addRecipientEmail("youremail@gmail.com");
                $mail->setSubject("New group was created");
                $mail->setTextContent("$group->title");
                OW::getMailer()->send($mail);
        
       /**
     * End of Custom code
     * sends youremail@gmail.com an email with the title of the added group
     */



--------------------------
Explanation: custom piece of code will send an email using standard mail() function within PHP. More information: http://php.net/manual/en/function.mail.php

Solution tested on 1.6.0  only.

NOTE: all custom code modifications will be erased if you update the software in future. Keep track of what and where you are editing, so that you can apply the changes after update again.
--------------------------

2. Approval tool.
This is more complex modification and unfortunately I can not provide detailed instructions on how this can be achieved.

Jochen
Jochen May 16 '14
Hi Aliia, thank you very much for your support,  I will try this.

As a first solution this is great.

br, Jochen




Jochen
Jochen May 16 '14
Hi Aliia,
it works perfect, thank you very much,  br, Jochen
Jochen
Jochen May 16 '14
Aliia, since you are experienced with the groups-plugin, I have another question.

Is there a way to send an e-mail to all members of a specific group  only ?

In example:  The group  "Berlin"  has 10 members. I want to send an e-mail to those 10 members only. Is this possible ?

Thanks in advance, Jochen
Alia Team
Alia May 18 '14
Jochen, what kind of email would you like to send?
Alia Team
Alia May 19 '14
I mean would it be some kind of automatically generated email about an activity within the group ( if yes, then which activity)?

OR

It will be an email composed and sent by site admin ( similar to mass mailing)?
Jochen
Jochen May 20 '14
Hi Aliia, I just found out, that I can email all members by placing a message in the group`s pinboard.

Anyway it would be nice if I could send an email to selected users of a group.