Yes I understand and we'll definitely move to an outside extension by the end of the year.
But for now I'm too busy with our artificial intelligence MoniA (plugin for joomla/wordpress also
)
Thanks for your explanation as I was able to correct most of things to adapt to CB 6
I still have an issue with the router autoactions conflicting with CB 6 routing though. Tried to change the orders of the plugin but no success.
Use of the new routing of CB 6 with /post/id seems fine but I'd like to prepend our param title to the id if that's feasible ?
I had for the autoaction router :
Code:
if ( ( $variables['var2'] !== 'cbactivity' ) || ( ! $variables['var4'] ) || ( ! isset( $variables['var4']['action'] ) ) ) {
return;
}
$queryAction = ( $variables['var4']['action'] ?? '' );
if ( $queryAction !== 'activity' ) {
return;
}
$queryFunc = ( $variables['var4']['func'] ?? 'show' );
if ( $queryFunc !== 'show' ) {
return;
}
$queryId = (int) ( $variables['var4']['id'] ?? 0 );
if ( ! $queryId ) {
return;
}
$activity = new \CB\Plugin\Activity\Table\ActivityTable();
$activity->load($queryId);
if ( ! $activity->getInt( 'id', 0 ) ) {
return;
}
$params = $activity->params() ;
$params['activ'] = htmlspecialchars_decode($params['activ']);
$title = !empty($params['activ']) ? JFilterOutput::stringURLSafe($params['activ']) .'-' : null;
$variables['var3'][] = $title.$queryId;
unset( $variables['var4']['action'] );
unset( $variables['var4']['func'] );
unset( $variables['var4']['id'] );
So ideally if we could retrieve $params if it exists and replace the post id by $title.$queryId that would be great
Is this doable now ?