Skip to Content Skip to Menu

email while creating a new group

  • Toulouzing
  • Toulouzing
  • ONLINE
  • Posts: 146
  • Thanks: 17
  • Karma: 2
3 days 8 hours ago #343288 by Toulouzing
email while creating a new group was created by Toulouzing
Hello !
I am in the phase of setting Groupjive in my site. 

I am wondering if it is possible to send an email to all registered users while a new group is created. Currently, It is an activity and a notification. Is there a setting for this or should be something doable with autoaction ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50171
  • Thanks: 8588
  • Karma: 1469
3 days 5 hours ago #343292 by krileon
Replied by krileon on topic email while creating a new group
CB GroupJive doesn't have that functionality so no it's not doable without implementing it yourself. It however can be implemented using CB Auto Actions. The below should work.

Global
Triggers: gj_onAfterCreateGroup
Type: Email
User: Automatic
Access: Everybody
Action
To: query
To Query:
Code:
SELECT `email` FROM `#__users` WHERE `block` = 0
Subject: EMAIL_SUBJECT_HERE
Body: EMAIL_MESSAGE_HERE

That should email every user when a group is created. I would recommend caution with this. It'd be easy to spam users with too many emails by doing this and could result in your email domain being blacklisted if too many people report you as spam.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Toulouzing
  • Toulouzing
  • ONLINE
  • Posts: 146
  • Thanks: 17
  • Karma: 2
2 days 18 hours ago - 2 days 17 hours ago #343302 by Toulouzing
Replied by Toulouzing on topic email while creating a new group
Thank you, I had a first trial sounding good ! Thank you also for the recommandation about email flooding, it's OK in my case because there will be only few events and a short list of users all registered and aware.

I have 2 questions ( i did my best to read documentation and help bubbles  but it is not comprehensive enough for me without your help)

How to use conditions and is it necessary to choose one ?

I do not find the way to use substitutions for the email ( such as username,groupname....)- is there a list somewhere and are they available or must do something to make it available ?
EDIT: It seems to be the use of references (variable 1, 2...) in the parameters of the related autoaction. But i still don't know how to use it 
Last edit: 2 days 17 hours ago by Toulouzing.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50171
  • Thanks: 8588
  • Karma: 1469
2 days 4 hours ago #343309 by krileon
Replied by krileon on topic email while creating a new group

How to use conditions and is it necessary to choose one ?

You shouldn't need any conditions unless you wanted to send the email only when specific conditions are met (e.g. specific group name, specific group category, etc..).

I do not find the way to use substitutions for the email ( such as username,groupname....)- is there a list somewhere and are they available or must do something to make it available ?

Field substitutions are just whatever fields you have in CB > Field Management. Variable substitutions (e.g. [var1]) are whatever the variables are for the trigger the auto action is using and are listed un the Global tab below the Triggers parameter. I recommend reading through the below substitution tutorial as well for better usage understanding.

www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18353-using-substitutions-throughout-cb

The gj_onAfterCreateGroup trigger only has 1 variable and it's the group object. So [var1_name] for example would be the name of the group that was just created. [var1_description] would be the description. This will match the database structure for the group, which is the _groupjive_groups database table.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Toulouzing
  • Toulouzing
  • ONLINE
  • Posts: 146
  • Thanks: 17
  • Karma: 2
1 day 9 hours ago #343321 by Toulouzing
Replied by Toulouzing on topic email while creating a new group
Thank you Kyle. I started to read the tutorial but I confess it 's huge investment for my little brain and will take a long long time for me to understand without any examples

My need for use of CB Autoactions for the site are quite simple :

#1 Send an email to all registered users while creating a new group in a dedicated category
#2 Send an email to all registered users while sending a message from the group
#3 Send an email to all joined participants while sending a message from the group ( same as #2 but restricted list of users)

Other emails will be managed using CB GJ Events so i think CB Autoaction is not necessary

For all the email i just need the substitution to include something like [group_name] . [user_name ] or [group_url] are nice to have but i understand it is not possible

I already makes the action #1 based on your previous help but i just do not find the condition to set a category ID and really i need you can hold my hand for the substitution. With this it will be easier for me to undersand the logic and the tutorial

 

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50171
  • Thanks: 8588
  • Karma: 1469
1 day 5 hours ago #343326 by krileon
Replied by krileon on topic email while creating a new group

#1 Send an email to all registered users while creating a new group in a dedicated category

The above auto action will do that. All you'll need is to add a condition. The following will work.

Field: Custom > Value
Custom Value: [var1_category]
Operator: Equal To
Value: INSERT_GJ_CATEGORY_ID_HERE

For all the email i just need the substitution to include something like [group_name] . [user_name ] or [group_url] are nice to have but i understand it is not possible

You'd have to build the URL manually, but beyond that everything else can be substituted in. Since the group object is var1 you'd have the following.

[var1_id] = Group ID
[var1_name] = Group Name
[var1_description] = Group Description
[var1_category] = Group Category ID

A group URL could be generated with the following.
Code:
[cb:config param="live_site" /]/index.php?option=com_comprofiler&view=pluginclass&plugin=cbgroupjive&action=groups&func=show&id=[var1_id]

User profile data will come from CB > Field Management based off name. So to get a users name it's just [name].

CB Auto Actions is a tool meant for developers so I understand it can be overwhelming, but outside of it your only option is writing your own code. You're asking for features that simply do not exist. So your only option is to make them exist.

#2 Send an email to all registered users while sending a message from the group

I don't understand the purpose of this. There's no functionality for this and would effectively allow group owners to spam your entire userbase. I don't recommend this. You'd have to implement this with CB Auto Actions if you insist on still having it.

#3 Send an email to all joined participants while sending a message from the group ( same as #2 but restricted list of users)

This is already built into GJ. Within CB GroupJive > Parameters > Groups > Message set "Type" to "Email". Then use the built in group message feature.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum