Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Create an Auto action to open group on Join

11 years 5 months ago #226377 by nopersonalive
Create an Auto action to open group on Join was created by nopersonalive
Hello,

I am trying to create an auto action using cb_auto plugin. Im on joomla 3.1, cb 1.9 and groupjive 2.7.0

I need to redirect users to a group, the moment they join it.

Do you think I should use a Type Code, CBActivity or Redirect Action?

Can you give me a lead as to where I can begin?

Thank you.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226416 by krileon
Replied by krileon on topic Create an Auto action to open group on Join
They already do in most cases. Where is this a problem? At any rate you'd use a Redirect action with the below URL.

index.php?option=com_comprofiler&task=pluginclass&plugin=cbgroupjive&action=groups&func=show&cat=[var1_category]&grp=[var1_id]


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.

11 years 5 months ago #226971 by nopersonalive
Replied by nopersonalive on topic Create an Auto action to open group on Join
Thank you Krileon.

The redirect works, but there's still one thing not working right. I tried to check with the debugger, but it doesn't give me anything.
  1. User clicks on join
  2. User is redirected to " www.uoegista.com/index.php/***link alias ***/pluginclass?plugin=cbgroupjive&action=overview" and an "not authorized" error appears. The "you joined successfully" message also appears, which was configured in the auto action.
  3. If I go back in the browser, and re-click "join", the groups opens like it should, and (obviously) shows a "you are already part of this group" message.

So, when the auto action tries to redirect, the necesary permissions havent been set (i guess). But the redirect URL seems correct.

The auto action trigger is After User Join Group.

Is there a way to configure this action with a different trigger, but that it does the same?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226999 by krileon
Replied by krileon on topic Create an Auto action to open group on Join
That's the correct trigger, but it's not in the correct spot for current release (fixed for next release already). You'll need to perform the below edit for it to behave properly.

IN: /components/com_comprofiler/plugin/user/plug_cbgroupjive/component.cbgroupjive.php
ON: Line 1477 (roughly, my internal build has changes)
OF: function joinGroup
Code:
$_PLUGINS->trigger( 'gj_onAfterJoinGroup', array( $row, $group, $category, $user, $plugin ) );

What you'll need to do is move the above to be directly before the success redirect. You'll see an IF statement towards the bottom of that function that has $success in it. Move the above trigger to be directly above that IF statement.

The current placement of the trigger won't accept invites, send notifications, etc.. if you redirect on it. This is all fixed in next release, but the above quickfix should allow it to work fine.


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.

11 years 5 months ago #227146 by nopersonalive
Replied by nopersonalive on topic Create an Auto action to open group on Join
Great.

So, to make a decision, when is the date for the next release?

if its more than a month from today, I will apply the edit.

Thank you lots for providing the solituion.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227156 by krileon
Replied by krileon on topic Create an Auto action to open group on Join

So, to make a decision, when is the date for the next release?

I don't know, I've a couple of incubator project releases to make first. Probably 2-3 weeks from now is best guess.

if its more than a month from today, I will apply the edit.

No harm in applying the fix so no need to wait. You're just moving it to where it should be.


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