Skip to Content Skip to Menu

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

[SOLVED] AutoAction - Profile Book/Wall and Comment Field to Activity Stream

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
9 years 3 months ago #267078 by krileon
The Activity parameters are going to make no sense unless you understand how CB Activity API works. Type for example determines the type of activity being added. Lets say for example I upload a photo to CB Gallery. The activity for a photo would have the below.

Type: gallery
Sub-Type: photo

In your case no default activity action exists so you essentially have to create your own type to distinguish that activity.

Comments are not something that would generally generate activity like what you're wanting. There's a system action in CB Auto Actions 6.3.1 to generate comment activity, but only if it's a comment on another activity entry. There's no code in place to display an inline-comment stream like there is an inline-activity stream as it doesn't really make sense or have any usability (a comment out of context has no use).

The best I can suggest is just generating an activity entry about the comment entry, but if you comment on that activity entry it will not display on that comment stream as you're commenting on the activity entry not on that comment stream.

Global
Trigger: activity_onAfterCreateComment
Access: Everybody
User: Automatic

Action
Mode: Activity
Method: Create
Type: comment
Item: [var1_id]
Title: wrote a comment
Message: [var1_message]
Owner: [var1_user_id]

Ignore links as you don't need them. The owner will be the user who made the comment so linking back to their profile will already be handled. If you want the activity to only log if it's the profile owner making the comment then you'd also want to use the below conditional check.

Conditions
1. [var1_user_id] Equal To [cb:userdata field="user_id" user="#displayed" /]

Another option is to just set Access to something like "All Non-Moderators".


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.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 3 months ago #267108 by jpdenny1
Thanks Kyle, with these settings I will drop the comment field with the auto action idea and use Activity for everything. :cheer: As the stream can be controlled more than I thought.

Testing here and the major problem is that I have say Admin and 2 Users (2 users of same group)

User 1: Can post on their own Activity Stream and it comes into the Admin stream. They can also post on the Admin Stream in the Admins profile. (Which is fine).

User 2: Neither of the two above are possible. They can just post in the activity stream and nothing else happens. When in Admins profile there are no options to post or reply.

When Admin says 'what's on their mind' it goes to user 1 and not 2 also. Be sweet if this went to all users - yet this seems tied to the above problem.

Any tweek there to fix this?

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
9 years 3 months ago - 9 years 3 months ago #267109 by krileon
You can not post on another users stream unless you are A: that user, B: connected to that user, or C: a moderator. A and B must also pass the view access level check for create access. The exception to B is if connections is disabled entirely then it goes strictly based off A, C, and if they pass the create access view access level check. Eventually when CB Privacy is integrated with CB Activity users will be able to set more precisely who can post on their stream.

Recent activity shows the activity of everyone. Module behaves the same as recent activity. Profile activity shows your own activity and the activity of those you are connected to. In order to have what you're wanting your admin needs to be connected to every user. There is no global site wide activity feature and unlikely for one to be implemented at this time.


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.
Last edit: 9 years 3 months ago by krileon.

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

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 3 months ago - 9 years 3 months ago #267115 by jpdenny1
You nailed it Kyle, didn't realise I didn't set up an Auto action for automatic connections to Admins (did this on other site).

It works perfectly once an Admin doesn't post directly with 'what's on your mind?...' to a users profile - as this goes to all users activity stream. But an Admin can post on his own activity stream - which goes to everybody and everybody can reply to this comment. (useful to get info to everybody and it opens up a conversation with everybody)

When a User posts on his/her own activity stream, admin can reply which remains private to the User.


I'll take this, can mess around a bit with it.

Thanks so much, really appreciate the help :-)

Update: I turned off your auto action and the activity seems to function the same!Like it makes no differenceha!Activity is the way forward anyway...

ps.

Eventually when CB Privacy is integrated with CB Activity users will be able to set more precisely who can post on their stream.


Looking forward to this release..

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9
Last edit: 9 years 3 months ago by jpdenny1.
The following user(s) said Thank You: krileon

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
9 years 3 months ago #267190 by krileon
System wide activity feature could be really useful and have added a feature ticket for this for 4.0.0. While it won't be in 3.0.0 it is planned to be implemented in a future release at least.

forge.joomlapolis.com/issues/5376

The idea is it's just a nice button you toggle when making a status post that broadcasts the activity to all streams that allow system activity. This would give a lot of usability to you and/or your moderators for site wide entries.


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.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 3 months ago - 9 years 3 months ago #267191 by jpdenny1
Great Kyle thanks.

I have totally nailed this and feel I should share. My use is basically admins and users. 1 bunch of admins are connected to all users. All admins are connected to all admins (auto actions for team - user and team - team)

I got the lift off from this post: www.joomlapolis.com/forum/153-professional-member-support/219025-solved-cb-conditional-show-tab-only-for-profile-owner?start=6 (essential settings for hiding showing when in own profile)

and CB Activity module saved the day!fitted those comment fields in also.

Activity tab is only viewable for profile owner. This saves being worried about user posting on admins wall - as viewable to everybody, in their streams. Yet I took activity tab away from all admins in the end. I inserted the comment field in a comment tab for admins connected to users. So users can comment but this remains on the profile of the admin connected to the user. These admins can make statements on their profile also - no need for the wall/blog/book.

Suppose the last bit of brilliance was creating a profile I called system. This is connected to all admins. Has it's own comment tab with the comment field and shows the Activity module. Admins can all comment privately to each other in this profile and reply to users on the activity module at the same time. Sweet. Activity module is available to all admins in any profile.
Admins connected to all users can post on stream and goes to all users. Nice will save a load of emailing. And if normal admin posts on the stream it's private to admins. Users can't access profiles their not connected to so normal admins can post on any stream.

There's more to it but that's the jist. So happy I got the core function sorted was bogged down for 4 or 5 days with this. Onwards..Thanks again for help Kyle, the support got me through :-) till next time..

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9
Last edit: 9 years 3 months ago by jpdenny1.
The following user(s) said Thank You: nant, krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum