Skip to Content Skip to Menu

Flairs not working with automatic article publication activity (filtering issue)

  • krileon
  • krileon
  • ONLINE
  • Posts: 49580
  • Thanks: 8485
  • Karma: 1465
2 hours 56 minutes ago #342054 by krileon

I still have the Like and Comment settings enabled under Activity > Article. Should I also move those to Auto Actions?

Do you need those activity? and do you need them to also have that flair?

I’m now realizing just how versatile Auto Actions is, but it has always seemed to have a steep learning curve. I remember you once said that creating detailed documentation isn’t possible, but that you’re ready to help prepare solutions — and I see you doing that in other threads too. Maybe collecting those ready-made solutions with some basic categorization in one place could help people like me better understand the tool and take advantage of its full potential?

The complexity in it is you need to have some understanding of what triggers you need and the variables those triggers provide. I've improved things a good bit as it now has a variable output for selected triggers just below the triggers parameter. Generally each persons usage is different from one another; especially conditions. I provide examples using the same format I did above so you're welcome to search our forums for them.

if article tags have the same names as flairs, could we automatically assign those corresponding flairs to the activity during its creation?

That might be doable. Will add a feature ticket and review when I have further time as I really need to get back to CB Gallery 3.0 or it's never going to get done, lol.

forge.joomlapolis.com/issues/9719

Since ActivityEntity has been extended with these features you can probably use the core activity logging functionality and instead just use CB Auto Action to extend those activity. This requires some PHP, but the below should probably work.

Global
Triggers: activity_onBeforeActivityEntitySave
Type: Code
User: Self
Access: Automatic
Action
Method: PHP
Code:
Code:
if ( ! preg_match( '/^article\.\d+/', $variables['var1']->getAsset() ) ) { return; } $variables['var1']->setFlair( [ COMMA_LIST_OF_FLAIR_IDS ] );

Replace COMMA_LIST_OF_FLAIR_IDS as the name implies with a comma list of flair ids. You can find flair id within CB Activity > Flair as the far right column. This would avoid you having to make your own create, comment, and like activity auto actions and would only need this.


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