Two topics: substitutions + usergroup cbsubs

5 years 8 months ago #306914 by lorfos62
FIRST ISSUE
I'm trying to create a CBsubs system of plans with the following features:
Plan 1 - This plan is FREE and is dedicated to WORKERS (usergroup) looking for a job. Their profile is edited by OPERATORS (moderators) through AddUserFrontend. They cannot register (apply) on their own.
Plan 2 - This plan is AT COST and is dedicated to EMPLOYERS (usergroup) looking for a worker. They can choose whether to
a) register on their own through the website and pay with credit card or
b) have OPERATORS (moderators) edit their profile and grant access through AddUserFrontend.

I set up the Registration Form but I still have 2 problems:
Problem 1: I cannot have EMPLOYERS be registered as such. When I check the Users in backend they are always shown in the WORKERS usergroup! I have already set up the access level to EMPLOYERS in the CB Configuration User Profile and I have already set up the CBsubs access level to EMPLOYERS.



Problem 2: I have a DropDown SingleSelect field that I would like to set at a given value at registration without letting the EMPLOYERS choose (value is 2 and label is "xxx"). I made an attempt of substitution in the Registration (last) box of Parameters of that field but my skills and syntax in substitutions are really poor. Joomlapolis documentation seems to be written for people at a higher level than mine.

SECOND ISSUE
The CB Content Bot is very useful but it takes into consideration only Viewer and Author substitutions. Is there any way to have it work with any user? Is there a substitution path (that I haven't got a clue yet) wher I can put the userid and have all the fields replaced?

Thanks in advance.
Attachments:

Please Log in to join the conversation.

5 years 8 months ago #306933 by krileon
Replied by krileon on topic Two topics: substitutions + usergroup cbsubs

Problem 1: I cannot have EMPLOYERS be registered as such. When I check the Users in backend they are always shown in the WORKERS usergroup! I have already set up the access level to EMPLOYERS in the CB Configuration User Profile and I have already set up the CBsubs access level to EMPLOYERS.

So you're wanting to remove the Registered usergroup? CBSubs won't touch usergroups it's not configured to manage. You'd need a plan that adds/removes Registered, but it may not allow that as the risk of having no usergroup would be too high. You can use CB Auto Actions to accomplish this as it can Replace their usergroups instead of just Add/Remove using a Usergroup action and the below configuration.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A

Alternatively you could review changing the "New User Registration Group" within Users > Manage > Options to something other than Registered.

Problem 2: I have a DropDown SingleSelect field that I would like to set at a given value at registration without letting the EMPLOYERS choose (value is 2 and label is "xxx"). I made an attempt of substitution in the Registration (last) box of Parameters of that field but my skills and syntax in substitutions are really poor. Joomlapolis documentation seems to be written for people at a higher level than mine.

There's no functionality to apply a default value at time of registration without having the field available at registration. The default registration value is only applied if the field is actually available at time of registration. You'll need to use CB Auto Actions acting on the onAfterUserRegistration trigger with a Field action to set its value.

The CB Content Bot is very useful but it takes into consideration only Viewer and Author substitutions. Is there any way to have it work with any user? Is there a substitution path (that I haven't got a clue yet) wher I can put the userid and have all the fields replaced?

Recommend reading the substitution tutorial below where it explains how to utilize the user parameter for substitutions.

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


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.195 seconds

Facebook Twitter LinkedIn