CB Activity 6.0.0 RC 1

Migration code has finally arrived! With CB Activity 6.0.0 RC 1 it can now safely migrate as much as possible from CB Activity 5.0.0. Details below on what can and can not be migrated.

Due to some functionality going away or changing or due to complexity issues some things simply cannot be migrated however I've made best effort to try and migrate as much as possible. Below is what should migrate.

  1. Joomla Menu Streams
  2. Joomla Module Streams
  3. CB Activity Tab
  4. Activity Fields
  5. Comment Fields
  6. Like Fields
  7. Follow Fields
  8. CB Activity Bot Likes and Comments
  9. CB Auto Action Streams
  10. CB Auto Action System Actions

Please keep in mind this isn't a complete list as there's quite a few micro migrations that needed to take place like filling out the liked activity/comments tables, commented on table, etc.. As for what will not migrate it's quite limited and is as follows.

  1. Inline Streams via CB Activity Bot substitutions
  2. Custom activity logging via CB Auto Actions
  3. Mentions from inline to database stored
  4. Hashtags from inline to database stored

That should more or less be it. There's of course new features you should look over and adjust for your streams as well.

Once streams have been migrated it will attempt to locate the stream an activity entry belongs to. If it fails to do so an activity or comment remains in an Orphaned state. This can be filtered on within the Activity and Comments backend views and the Batch Tool can be used to mass assign activity or comments to the stream you believe they belong to.

Migration has fail protection built in as well. Should a migration fail it will error the install, provide the error that caused it to fail, and halt the migration. You can then re-install and resume the migration on the step it failed at. Often failures will purely be due to server resources running out and will depend on how much activity you have. For comparison though migration has been tested on a 1 million row table so it should go smoothly.

As for what's next. Stable! Once we've hopefully gotten some feedback on RC1 we'll release 6.0.0 stable. During this time I will be working on updating CB Auto Actions to be compatible with CB Activity 6.0.0 so you'll be able to promptly update any custom activity logging you may have. You should ideally just need to assign what stream that activity belongs to.

Note for anyone with custom implementations using CB Activity triggers. Many of the triggers have been changed. An updated list of the triggers can be found below for your comparison.

plug_cbactivity\library  
	Parser.php  
		$_PLUGINS->trigger( 'activity_onParse', [ &$this->parsed, $this->string, $this->words, $this->source, $this->stream, $this->context, $this->ignore, $html ] )
plug_cbactivity\library\Controller  
	ActivityController.php  
		$_PLUGINS->trigger( 'activity_onDisplayActivityStreamEdit', [ $rowStream, &$row, &$form[
			'url'				=>	'',
			'menu'				=>	[],
			'inputs'			=>	[],
			'buttons'			=>	[],
			'actions'			=>	[],
			'features'			=>	[],
			'message_required'		=>	false,
			'message_limit'			=>	0,
			'new'				=>	false,
			'collapsed'			=>	false,
			'captcha'			=>	'',
			'captcha_invisible'		=>	false,
			'reactions'			=>	'',
			'stickers'			=>	'',
			'emotes'			=>	'',
			'themes'			=>	'',
			'themes_classes'		=>	'',
			'themes_styles'			=>	'',
			'links_preview'			=>	'',
			'system'			=>	false,
			'tooltips'			=>	[],
		] ] )
		$_PLUGINS->trigger( 'activity_onDisplayActivityStreamNew', [ $rowStream, &$row, &$form[
			'url'				=>	'',
			'menu'				=>	[],
			'inputs'			=>	[],
			'buttons'			=>	[],
			'actions'			=>	[],
			'features'			=>	[],
			'message_required'		=>	false,
			'message_limit'			=>	0,
			'new'				=>	true,
			'collapsed'			=>	false,
			'captcha'			=>	'',
			'captcha_invisible'		=>	false,
			'reactions'			=>	'',
			'stickers'			=>	'',
			'emotes'			=>	'',
			'themes'			=>	'',
			'themes_classes'		=>	'',
			'themes_styles'			=>	'',
			'links_preview'			=>	'',
			'system'			=>	false,
			'tooltips'			=>	[],
		] ] )
		$_PLUGINS->trigger( 'activity_onBeforeUpdateStreamActivity', [ $rowStream, $source, &$row, $old ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateStreamActivity', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterUpdateStreamActivity', [ $rowStream, $source, $row, $old ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateStreamActivity', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteActivityStreamTag', [ $rowStream, $row, &$tag ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteActivityStreamTag', [ $rowStream, $row, $tag ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateActivityStreamTag', [ $rowStream, $row, &$tag ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateActivityStreamTag', [ $rowStream, $row, $tag ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteActivityStreamMention', [ $rowStream, $row, &$mention ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteActivityStreamMention', [ $rowStream, $row, $mention ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateActivityStreamMention', [ $rowStream, $row, &$mention ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateActivityStreamMention', [ $rowStream, $row, $mention ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteActivityStreamHashtag', [ $rowStream, $row, &$hashtag ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteActivityStreamHashtag', [ $rowStream, $row, $hashtag ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateActivityStreamHashtag', [ $rowStream, $row, &$hashtag ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateActivityStreamHashtag', [ $rowStream, $row, $hashtag ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamDelete', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamDelete', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamPublish', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamPublish', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamHide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamHide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamUnhide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamUnhide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeFollowStreamActivity', [ $rowStream, $source, &$follow, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterFollowStreamActivity', [ $rowStream, $source, $follow, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeUnfollowStreamActivity', [ $rowStream, $source, &$follow, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterUnfollowStreamActivity', [ $rowStream, $source, $follow, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeBookmarkStreamActivity', [ $rowStream, $source, &$bookmarked, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterBookmarkStreamActivity', [ $rowStream, $source, $bookmarked, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeUnbookmarkStreamActivity', [ $rowStream, $source, &$bookmarked, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterUnbookmarkStreamActivity', [ $rowStream, $source, $bookmarked, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamHide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamHide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityStreamReport', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityStreamReport', [ &$rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateStreamActivity', [ $rowStream, $activity, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateStreamActivity', [ $rowStream, $activity, $row ] )
		$_PLUGINS->trigger( 'activity_onQueryActivityFilter', [ $this->stream, $selectedFilter, $asset, &$assets, &$assetsWhere, $hashtag, $mentioned, $search ] )
		$_PLUGINS->trigger( 'activity_onQueryActivity', [ $this->stream, &$select, &$join, &$where ] )
		$_PLUGINS->trigger( 'activity_onLoadActivity', [ $this->stream, &$rows ] )
		$_PLUGINS->trigger( 'activity_onLoadActivity', [ $this->stream, &$rows ] )
	CommentsController.php  
		$_PLUGINS->trigger( 'activity_onDisplayCommentStreamEdit', [ $rowStream, &$row, &$form[
			'url'				=>	'',
			'menu'				=>	[],
			'inputs'			=>	[],
			'buttons'			=>	[],
			'actions'			=>	[],
			'features'			=>	[],
			'guest'				=>	false,
			'message_limit'			=>	0,
			'new'				=>	false,
			'collapsed'			=>	false,
			'captcha'			=>	'',
			'captcha_invisible'		=>	false,
			'reactions'			=>	'',
			'stickers'			=>	'',
			'emotes'			=>	'',
			'links_preview'			=>	'',
			'system'			=>	false,
			'tooltips'			=>	[],
		] ] )
		$_PLUGINS->trigger( 'activity_onDisplayCommentStreamNew', [ $rowStream, &$row, &$form[
			'url'				=>	'',
			'menu'				=>	[],
			'inputs'			=>	[],
			'buttons'			=>	[],
			'actions'			=>	[],
			'features'			=>	[],
			'guest'				=>	false,
			'message_limit'			=>	0,
			'new'				=>	true,
			'collapsed'			=>	false,
			'captcha'			=>	'',
			'captcha_invisible'		=>	false,
			'reactions'			=>	'',
			'stickers'			=>	'',
			'emotes'			=>	'',
			'links_preview'			=>	'',
			'system'			=>	false,
			'tooltips'			=>	[],
		] ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamUpdate', [ $rowStream, $source, &$row, $old ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamCreate', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamUpdate', [ $rowStream, $source, $row, $old ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamCreate', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteCommentStreamMention', [ $rowStream, $row, &$mention ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteCommentStreamMention', [ $rowStream, $row, $mention ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateCommentStreamMention', [ $rowStream, $row, &$mention ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateCommentStreamMention', [ $rowStream, $row, $mention ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamDelete', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamDelete', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamPublish', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamPublish', [ $rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamHide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamHide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamUnhide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamUnhide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamHide', [ $rowStream, $source, &$hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamHide', [ $rowStream, $source, $hidden, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeCommentStreamReport', [ $rowStream, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterCommentStreamReport', [ &$rowStream, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onQueryComments', [ $this->stream, &$select, &$join, &$where ] )
		$_PLUGINS->trigger( 'activity_onLoadComments', [ $this->stream, &$rows ] )
		$_PLUGINS->trigger( 'activity_onLoadComments', [ $this->stream, &$rows ] )
	NotificationsController.php  
		$_PLUGINS->trigger( 'activity_onQueryNotifications', [ &$select, &$join, &$where ] )
		$_PLUGINS->trigger( 'activity_onLoadNotifications', [ &$rows ] )
		$_PLUGINS->trigger( 'activity_onLoadNotifications', [ &$rows ] )
plug_cbactivity\library\Entity  
	ActivityEntity.php  
		$_PLUGINS->trigger( 'activity_onBeforeActivityEntitySave', [ &$this, &$update, &$loadBy ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityEntityStore', [ $this, &$activity ] )
		$_PLUGINS->trigger( 'activity_onBeforeActivityEntityDelete', [ &$this, &$comments, &$likes, &$follows, &$notifications ] )
		$_PLUGINS->trigger( 'activity_onAfterActivityEntityDelete', [ $this, $assets, $wildcards, $find, $findAssets ] )
	AssetEntity.php  
		$_PLUGINS->trigger( 'activity_onAssetPrepare', [ &$this->asset, &$assetsUserId, &$this->data ] )
		$_PLUGINS->trigger( 'activity_onAssetExtract', [ $this, &$parts ] )
		$_PLUGINS->trigger( 'activity_onAssetSource', [ $this, &$source, $origin, $type, $id ] )
		$_PLUGINS->trigger( 'activity_onAssetContext', [ $this, &$context, $source, $origin, $type, $id ] )
		$_PLUGINS->trigger( 'activity_onAssetAccess', [ $this, $type ] )
		$_PLUGINS->trigger( 'activity_onAssetCreateAccess', [ $this, $type ] )
		$_PLUGINS->trigger( 'activity_onAssetModerateAccess', [ $this, $type ] )
		$_PLUGINS->trigger( 'activity_onAssetModerators', [ $this, $type ] )
	NotificationEntity.php  
		$_PLUGINS->trigger( 'activity_onBeforeNotificationEntityStore', [ &$this, &$update, &$updateRecipients, &$loadBy ] )
		$_PLUGINS->trigger( 'activity_onAfterNotificationEntityStore', [ $this, &$notification ] )
		$_PLUGINS->trigger( 'activity_onBeforeNotificationEntityDelete', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterNotificationEntityDelete', [ $this, $assets, $wildcards, $find, $findAssets ] )
plug_cbactivity\library\Helper  
	ActivityHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayActivity', [ &$stream, &$row, &$layout[
			'title'		=>	&$title,
			'caret'		=>	&$caret,
			'date'		=>	&$date,
			'message'	=>	&$message,
			'content'	=>	&$content,
			'media'		=>	&$media,
			'header'	=>	&$header,
			'footer'	=>	&$footer,
			'menu'		=>	&$menu,
			'compact'	=>	&$compact,
			'isDetails'	=>	false,
			'isNew'		=>	$isNew,
			'isRow'		=>	$isRow,
			'isModal'	=>	$isModal,
			'isInline'	=>	$isInline,
			'isSimple'	=>	$isSimple,
			'isEmbed'	=>	$isEmbed,
		] ]
	CommentsHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayComments', [ &$stream, &$row, &$layout[
			'date'		=>	&$date,
			'message'	=>	&$message,
			'content'	=>	&$content,
			'media'		=>	&$media,
			'footer'	=>	&$footer,
			'menu'		=>	&$menu,
			'depth'		=>	$depth,
			'isDetails'	=>	false,
			'isRow'		=>	$isRow,
			'isInline'	=>	$isInline,
			'isSimple'	=>	$isSimple,
			'isEmbed'	=>	$isEmbed,
		] ]
	FollowedHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayFollowed', [ &$row, &$layout[
			'type'	=>	&$type,
			'image'	=>	&$image,
			'title'	=>	&$title,
			'url'	=>	&$url,
		] ]
	FollowingHelper.php  
		$_PLUGINS->trigger( 'activity_onBeforeFollowAsset', [ $asset, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterFollowAsset', [ $asset, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeUnfollowAsset', [ $asset, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterUnfollowAsset', [ $asset, $source, $row ] )
	GalleryHelper.php  
		$_PLUGINS->trigger( 'gallery_onLoadFolders', [ &$rows, $gallery ] )
		$_PLUGINS->trigger( 'gallery_onLoadItems', [ &$rows, $gallery ] )
		$_PLUGINS->trigger( 'gallery_onGalleryAccess', [ &$gallery, &$access ] )
	HiddenHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayHidden', [ &$row, &$layout[
			'title'	=>	&$title,
			'link'	=>	&$link,
		] ]
	LikedHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayLiked', [ &$row, &$layout[
			'type'	=>	&$type,
			'image'	=>	&$image,
			'title'	=>	&$title,
			'url'	=>	&$url,
		] ]
	LikesHelper.php  
		$_PLUGINS->trigger( 'activity_onBeforeLikeAsset', [ $asset, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterLikeAsset', [ $asset, $source, $row ] )
		$_PLUGINS->trigger( 'activity_onBeforeUnlikeAsset', [ $asset, $source, &$row ] )
		$_PLUGINS->trigger( 'activity_onAfterUnlikeAsset', [ $asset, $source, $row ] )
	NotificationsHelper.php  
		$_PLUGINS->trigger( 'activity_onDisplayNotification', [ &$row, &$layout[
			'title'		=>	&$title,
			'caret'		=>	&$caret,
			'date'		=>	&$date,
			'message'	=>	&$message,
			'content'	=>	&$content,
			'actions'	=>	&$actions,
		] ]
	PrefetchHelper.php  
		$_PLUGINS->trigger( 'activity_onPrefetch', [ $type, &$rows, $late ] )
plug_cbactivity\library\Table  
	ActivityStreamTable.php  
		$_PLUGINS->trigger( 'activity_onActivityStreamAccess', [ $this ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamCreateAccess', [ $this ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamDeleteAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamEditAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamPublishAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamReportAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamShareAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamModerateAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onActivityStreamModerators', [ $this, $row ] )
	ActivityTable.php  
		$_PLUGINS->trigger( 'activity_onBeforeUpdateActivity', [ &$this, $old ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateActivity', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterUpdateActivity', [ $this, $old ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateActivity', [ $this ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteActivity', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteActivity', [ $this ] )
	CommentStreamTable.php  
		$_PLUGINS->trigger( 'activity_onCommentStreamAccess', [ $this ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamCreateAccess', [ $this ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamDeleteAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamEditAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamPublishAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamReportAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamModerateAccess', [ $this, $row ] )
		$_PLUGINS->trigger( 'activity_onCommentStreamModerators', [ $this, $row ] )
	CommentTable.php  
		$_PLUGINS->trigger( 'activity_onBeforeUpdateComment', [ &$this, $old ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateComment', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterUpdateComment', [ $this, $old ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateComment', [ $this ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteComment', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteComment', [ $this ] )
	NotificationTable.php  
		$_PLUGINS->trigger( 'activity_onBeforeUpdateNotification', [ &$this, $old ] )
		$_PLUGINS->trigger( 'activity_onBeforeCreateNotification', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterUpdateNotification', [ $this, $old ] )
		$_PLUGINS->trigger( 'activity_onAfterCreateNotification', [ $this ] )
		$_PLUGINS->trigger( 'activity_onBeforeDeleteNotification', [ &$this ] )
		$_PLUGINS->trigger( 'activity_onAfterDeleteNotification', [ $this ] )
plug_cbactivity\templates\default\following  
	container.php  
		$_PLUGINS->trigger( 'activity_onDisplayFollow', [ $row, $asset ] )
plug_cbactivity\templates\default\likes 
	container.php
		$_PLUGINS->trigger( 'activity_onDisplayLike', [ $row, $asset ] )
plug_cbactivity\templates\default\tags
	container.php
		$_PLUGINS->trigger( 'activity_onDisplayTag', [ $row, $activity ] )

Be particularly mindful of the changes to the onDisplay triggers as their layout data no longer fills dozens of variables. It's now contained in a single array variable. This is to allow in the future for easier adding/removing of layout data to the triggers.

Facebook Twitter LinkedIn