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