A module, field type, and class for implementing reusable callouts through a module.
1.4.1 fixes matrix and callouts fields nested within reusable callouts in BigTree 4.5
1.4 adds support for PHP 8 and BigTree 4.5
1.3.6 fixes reporting details in BigTree 4.3 and 4.4
1.3.5 fixes the module view in BigTree 4.4
1.3.4 adds support for BigTree 4.4
1.3.3 adds support for BigTree 4.3
1.3.2 adds support for completely disabling fieldsets when selecting a reusable callout
1.3.1 makes the list of reusable callouts alphabetical
1.3 adds support for BigTree 4.2.17's cross site request forgery protection.
1.2 fixes adding and editing callouts for the first time not properly hooking field type hooks (e.g. the remove button failing to work on an image).
1.1 adds the ability to archive your callouts. BTXReusableCallouts::check will return false for archived callouts. Also added is a report option to show everywhere a reusable callout is in use.
1.0.3 fixes issues with required fields throwing errors as well as making other fields disabled after choosing a reusable callout.
1.0.2 fixes the data column being too small and not supporting any reasonable amount of callout data.
On the developer side, the only thing you will need to do is call BTXReusableCallouts::check() on the callout before drawing it. Example:
// Loads reusable callout data if the user has selected an existing callout BTXReusableCallouts::check($callout); include SERVER_ROOT."templates/callouts/".$callout["type"].".php";
The "check" method asks for a callout by reference and will modify it to return the reused callout data if your user asks to reuse a callout.
When a user adds a new reusable callout, the callout's resources will be checked to see if a resource with "__reusable_callout_id" as an ID and "com.fastspot.reusable-callouts*callout-list" type exists. If it doesn't, the extension will modify the callout to add it to the top of the callout resource form. This field is only drawn when there are available reusable callouts and should not be deleted from your callout resources.