CB Auto Actions 7.0.0

CB Auto Actions 7.0.0 is officially completed. Some great new features have been added, new auto actions, new system actions, and large performance improvements! Check out all the great new stuff below.

 

First up is a new feature called Variable Loop. What this does is takes the selected variable and if it's an array OR a Traversable class it will loop that variable through the action. The value in this is some triggers send an array of objects that can be acted on to modify those objects. This is a vital functionality to being able to add, remove, or modify rows dynamically in CB Activity and CB Gallery. This is something a few plugins already do under the hood in order to enforce access checks on some activity entries. That same functionality is now extended to CB Auto Actions allowing you to remove, add, or alter those activity rows from custom actions. This is configured easily under the Parameters tab of your action. If the variable isn't an array or Traversable it simply ignores it and continues on normally.

That brings us to a few new system actions added. There are now system actions for displaying, saving, and authorization of CB Activity and CB Gallery privacy. Yup, that means individual privacy controls per activity entry, per gallery album, and per gallery media. These are all enabled by default and of course require CB Privacy. Using the new looping functionality we're able to remove those rows under the hood through auto actions.

The looping functionality doesn't stop there. If you set User to Manually and your selected variable (e.g. Variable 1) is an array or Traversable of user objects it'll loop each user through the auto action. This means a trigger could in theory contain a list of users and the auto action could act on that list of users per user. This will be important in a future release when notification system actions are added, but you can take advantage of this functionality now in custom actions.

Next up is the new Output tab. Previously auto actions had to determine how they output individually. This was specifically in the CB Activity and Code actions. This however was limited and resulted in double coding. The output for auto actions is now global. This means the output can be controlled for any action. In addition to this you can now output using PHP. So you can actually modify what is being output with custom coding! This is absolutely vital to certain actions since they need to add their output to a variable and not just return what was output by the auto action.

That brings us to some more new system actions. CB GroupJive - Stream and CB GroupJive - Gallery. Let those titles sink in a little bit. To be short and sweet you can turn those two system actions on and have a CB Activity stream and CB Gallery gallery per group instantly. The next CB GroupJive build includes access checks for both. This is possible with the power of the new Output parameters.

Now for some improvements to existing actions. The CB Paid Subscriptions action can now dynamically generate coupon codes. This can prove to be very useful in allowing user generated coupons for family subscription type usecases. A new Piwik action has been added for easy tracking (all done through the RESTful API). CB Gallery action can now output a gallery instead of just adding albums or media. CB AntiSpam can now display and validate Captcha. CB Privacy can now display, save, and validate Privacy controls (now you can put privacy controls anywhere you like!). The variable limit has increased from 10 to 15 allowing CB Auto Actions to handle more complex triggers.

Finally we're to another important matter. Performance. CB Auto Actions before 7.0.0 loads every actions PHP file into memory so it can wait to be called. This is gone. Every action is properly namespaced classes now, which allows them to be called and loaded on demand. This reduces the memory footprint of CB Auto Actions greatly. In addition to this a SQL index has been created to optimize the trigger loading query making it super fast! Format functions also received a performance boost as it now won't bother running through the large format function REGEXP if a format function usage doesn't even exist in the string.

Did you think I was done? Nope! Saved the best feature for last. CB Auto Actions can now act on Joomla events. Yup, you read that right. Prefix the trigger with joomla_ and it'll bind to that Joomla event. A few core Joomla events are already included in the dropdown. Please be careful with this though as some Joomla events fire all over the place and it could be easy to break things. This is not route events from Joomla to CB. Your auto action is actually binding directly to the Joomla event it self like a native event bind! There's a new system plugin included with CB Auto Actions that ensures CB Auto Actions is loaded on every page to allow for the binding.

You can check out all the features and fixes in CB Auto Actions 7.0.0 below. Hope everyone will enjoy the new changes and look forward to reading your feedback.

https://forge.joomlapolis.com/projects/cb-cbautoactions/issues?query_id=94

Facebook Twitter Google LinkedIn