Autoaction type activity and titles

1 month 1 week ago #327398 by activha
Autoaction type activity and titles was created by activha
Hello

I have an autoaction type CB Activity which fires on activity_onAfterCreateStreamActivity and activity_onAfterUpdateStreamActivity

Method : Create
Asset : profile.[var3_user_id].activation.[var3_id].event.[cb:userdata field="cb_marketevents" /]
Title : TITLE [var3_params_activ]
action : celebrating
Message : [var3_params_activ]

I don't have anything in location, links, message or substitutions.

The autoaction is the last one.

This seems to work fine as long as there are no locations nor gallery items in the activity initially created.

If there is a location (address, place), then this autoaction erases it
If there are a gallery item, then the title is not created and replaced by 'added a gallery item'

Can you help me on these two points ?
I'd like to keep the title or at least the specific action as the title, and keep the initial location

Thanks

Please Log in to join the conversation.

1 month 1 week ago #327399 by krileon
Replied by krileon on topic Autoaction type activity and titles
Don't try to use title. It will be removed in CB Activity 6.0.0. The title is meant to be set programmatically based off the asset. It's not meant to be stored and is a leftover from a much earlier release of CB Activity. If you want a specific title set you'll need to use the activity_onDisplayStreamActivity and adjust the $title variable (var2).

$_PLUGINS->trigger( 'activity_onDisplayStreamActivity', array( &$row, &$title, &$date, &$message, &$insert, &$footer, &$menu, $stream, $output ) ) );


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 to join the conversation.

1 month 1 week ago #327406 by activha
Replied by activha on topic Autoaction type activity and titles
You mean adjusting the variable with a php like this ?
$variables['var2']='mon titre est [var1_params_activ]';

this correctly output if I try to print it but there is no return in the title of the activation.

And If there is any photo uploaded in the gallery I still get : user has shared a photo instead of user $title

How can I achieve this ?

Please Log in to join the conversation.

1 month 1 week ago #327422 by krileon
Replied by krileon on topic Autoaction type activity and titles

You mean adjusting the variable with a php like this ?

Yes, but you need to be sure under Parameters that you selected Variable 2 in References.

And If there is any photo uploaded in the gallery I still get : user has shared a photo instead of user $title

As I've already explained by using the API and modifying the title. That is the only option you have. That's exactly what CB Gallery is doing.

With CB Activity 6.0.0 you should be able to more easily have custom activity display purely from template files. Basically what is planned is to extend the "core" template files with support for custom activity. So for example the Joomla article activity parsing is in /core/display/article the idea is to support /core/custom/display/article and if it exists it can be used to override or extend existing article activity parsing. In this new usage the template structure will be based off the asset. For example lets say my asset is "event.123" then my template would be /core/custom/display/event as "event" is the "target". If my asset is "profile.123.event.456" then the path would in theory be /core/custom/display/profile/event.

So with the above in mind please be sure any custom assets you use adhere to the standard. Yours currently isn't quite 6.0.0 compatible. The asset structure can be described as follows.

target_source . target_type . target_id . object_source . object_type . object_id . verb

In both target and object the source is optional. Lets break down some core asset examples to give an idea of what happens.

cbgroupjive.group.10.join

That would become as follows.

target_source = cbgroupjive
target_type = group
target_id = 10
verb = join

groupjive.group.10.gallery.photos.30352.comment

Would become the following.

target_source = cbgroupjive
target_type = group
target_id = 10
object_source = gallery
object_type = photos
object_id = 30352
verb = comment

A verb_id is parsed, but not technically officially supported. So technically "comment" could be "comment.123" with 123 being the comment id and thus verb id. If target and object are one in the same do not supply both, but only supply target.

So with the above in mind your current asset usage will treat "event.ID" as the verb, which it's not. What is the significance of "activation.[var3_id]" and is it really needed? It sounds like that is actually the verb. So the below would make more sense.

profile.[var3_user_id].event.[cb:userdata field="cb_marketevents" /].activation.[var3_id]

That would give you a custom template structure of the following in 6.0.0.

/core/custom/display/profile/event


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 to join the conversation.

1 month 1 week ago #327425 by activha
Replied by activha on topic Autoaction type activity and titles
Forgot to add the var2 in reference :-(

Thanks for all the explanations regarding CB 6 and assets.

Activations are activities made by the user with a special purpose in mind. They will need to be commented and shared, sometimes corrected with more images and corrected locations.

profile.[var3_user_id].event.[cb:userdata field="cb_marketevents" /].activation.[var3_id] seems a good idea

Please Log in to join the conversation.

1 month 1 week ago #327434 by krileon
Replied by krileon on topic Autoaction type activity and titles

Activations are activities made by the user with a special purpose in mind. They will need to be commented and shared, sometimes corrected with more images and corrected locations.

Ok, then it sounds like activation is indeed the verb so I do recommend trying to migrate those to my above recommended format.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.193 seconds

Facebook Twitter LinkedIn