Skip to Content Skip to Menu

Questions about auto action and gallery

  • krileon
  • krileon
  • ONLINE
  • Posts: 49863
  • Thanks: 8520
  • Karma: 1465
5 days 10 hours ago #342629 by krileon
Replied by krileon on topic Questions about auto action and gallery
For gallery_onAfterApproveGalleryItem the variables are as follows.
Code:
$_PLUGINS->trigger( 'gallery_onAfterApproveGalleryItem', [ $gallery, $source, $row ] );

So var1 is incorrect. The media row object is var3. That's why yours is not generating properly. Please keep in mind I've implemented a helper for this. Under the Global tab you should see all the variables for any triggers you add to your auto action. If it's not displaying for you please let me know.

You should be able to fix your issue by simply swapping your var1 to var3 in your substitutions.


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.

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 491
  • Thanks: 42
  • Karma: 3
  • Add-ons
5 days 10 hours ago #342631 by liaskas
Replied by liaskas on topic Questions about auto action and gallery
Yes it worked. Changed all the media row object and now the activity is created with the correct asset.

One thing still remains unsolved...

When the media is approved, it remains as unpublished in the activity list (backend). What am i missing? Now i have to go through backend for every new media item to publish it. How can we set the auto action so... that the activity log is published?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49863
  • Thanks: 8520
  • Karma: 1465
4 days 16 hours ago #342634 by krileon
Replied by krileon on topic Questions about auto action and gallery
Try setting the "Published" parameter to 1 to force it published since you're creating it after approval this should 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.
The following user(s) said Thank You: liaskas

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

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 491
  • Thanks: 42
  • Karma: 3
  • Add-ons
4 days 1 hour ago #342646 by liaskas
Replied by liaskas on topic Questions about auto action and gallery
Thank you Krileon, it worked fine.
The following user(s) said Thank You: krileon

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

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 491
  • Thanks: 42
  • Karma: 3
  • Add-ons
2 days 19 hours ago #342655 by liaskas
Replied by liaskas on topic Questions about auto action and gallery
Unfortunately, it stopped working again!

With the following auto action settings, it worked for a while and now...
The images are created in backend CB Gallery: Media
no activity records are created at all in backend CB Activity: Activity.

Auto action settings:

Triggers: gallery_onAfterApproveGalleryItem
Type: CB Activity
User: Automatic
Access: Everybody

Conditions
1
Field:Value
Custom Value: [var3_asset]
Operator: Is REGEX
Value: /^profile\./
2
Field:Value
Custom Value: [var3_asset]
Operator: Is Not REGEX
Value: /\.uploads$/

Action
Mode: Activity
Method: Create
Stream: Profile Activity
Published: 1
Asset: gallery.[var3_type].[var3_id]
Title: empty field
Message: empty field
Owner: [var3_user_id]
Flair: Adult
Cooments: Same as stream
Likes Asset: empty field
Dynamic Group Asset:  empty field
System:  empty field
Date:  empty field
Load By: By Asset Only
Group Asset: gallery.%
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49863
  • Thanks: 8520
  • Karma: 1465
2 days 17 hours ago #342656 by krileon
Replied by krileon on topic Questions about auto action and gallery
How are you approving media? That trigger only fires for frontend approval. If you're approving from backend it won't apply. Backend only fires the root events like gallery_onAfterUpdateItem and gallery_onAfterCreateItem.


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