Skip to Content Skip to Menu

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49579
  • Thanks: 8485
  • Karma: 1465
5 hours 23 minutes ago #342042 by krileon
Another note is I'm also improving automatic parsing of mentions and hashtags in ActivityEntity. This means if the activity message contains either of their shortcodes it will properly append them to the activity by inserting into their appropriate database tables. A shortcode for a mention is (mention:USER_ID) and hashtags is (hashtag:HASHTAG) so you'll be able to utilize those features from CB Auto Actions as well once implemented there. This should all be done tomorrow.


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: robster80

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

  • robster80
  • robster80
  • ONLINE
  • Posts: 56
  • Thanks: 5
  • Karma: 0
5 hours 21 minutes ago #342043 by robster80
Thank you for the clarification and upcoming fix.
Best,
Robert.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49579
  • Thanks: 8485
  • Karma: 1465
4 hours 57 minutes ago #342044 by krileon
Ok, managed to get both done today. Below is an auto action for article create.

Global
Triggers: onContentAfterSave
Type: CB Activity
Access: Everybody
User: Automatic
Conditions
Field: Custom > Value
Custom Value: [var1]
Operator: Equal To
Value: com_content.article
Action
Mode: Activity
Method: Create
Published: [var2_state]
Asset: article.[var2_id]
Owner: [var2_created_by]
Comments: Articles
Likes Asset: article.[var2_id]
Date: [var2_created]
Load By: By Asset Only

That should work for when you save an article to save the same way the core activity does. Adjust the other features as needed. Once you've updated both CB Activity and CB Auto Actions you should have a new parameter there called Flair to select what flair you want applied. Short codes in the Message parameter are also functional and documented in its parameter description.

Be sure to turn off the parameter in CB Activity for logging article activity though since that won't be necessary now.


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.

  • robster80
  • robster80
  • ONLINE
  • Posts: 56
  • Thanks: 5
  • Karma: 0
4 hours 31 minutes ago #342045 by robster80
Thanks a lot for preparing this example — it’s very helpful! 🙏

Could you please explain how to configure the Conditions in Auto Actions so that the activity is created only when the article belongs to one of several specific categories? I have around 10 categories that should trigger the activity.

Best,
Robert

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49579
  • Thanks: 8485
  • Karma: 1465
4 hours 25 minutes ago #342046 by krileon
var2 is the article object. From that you can apply whatever conditions you like to the article. Joomla stores the category id in catid. So with [var2_catid] you can filter to a specific category. Example as follows.

Field: Custom > Value
Custom Value: [var2_catid]
Operator: Equal To
Value: 20

This would mean only log activity for articles in category with an id of 20. You can use the other operators to expand on this. For example a simple comma separated list of ids can be accomplished with the following.

Field: Custom > Value
Custom Value: [var2_catid]
Operator: Is In
Delimiter: ,
Value: 20,40,60,31

Now you can supply a comma separated list of category ids to support as many categories as you like.


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.

  • robster80
  • robster80
  • ONLINE
  • Posts: 56
  • Thanks: 5
  • Karma: 0
3 hours 35 minutes ago #342047 by robster80
Thanks again for your help!

Just to share an observation from debugging: in my case, the condition with com_content.article alone didn’t trigger the activity. What I saw was that the object value was com_content.form instead. So when I used the Is In operator with com_content.article,com_content.form, the activity was created correctly after adding an article. It seems that in my setup the object is sometimes form instead of article (even though it’s a standard Joomla article — I don’t really understand why).

I just wanted to mention this in case it helps explain similar cases. I’ve attached a screenshot of the working setup. I’m now ready to switch to CB Auto Actions as soon as flairs can be added to those activities.

Best,
Robert
Attachments:

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

Moderators: beatnantkrileon
Powered by Kunena Forum