The Old Man Posted October 5, 2020 Posted October 5, 2020 Hello, Please can you confirm from a newbie perspective whether it is possible to use a 3rd party PHP SDK such as Amazon SDK within a Marketplace acceptable plug-in? If so, if you have multiple plugins or apps that use it, does it get stored in one 'shared place' to avoid unnecessary duplicates? Or would namespacing it be advisable. What would be the preferred best practice? Many thanks.
Solution bfarber Posted October 6, 2020 Solution Posted October 6, 2020 You generally won't be able to include a third party library like that in a plugin, because you can't easily include extra files like that in a plugin. You would need to use an application instead to include a third party library. The only way to "share" the library would be to have one application that contains the shared library and each of your other applications that uses the library just makes sure the shared application is installed. if( !\IPS\Application::appIsEnabled('shared_application') ) { die( "Sorry you need this other application installed first" ); } The Old Man 1
The Old Man Posted October 10, 2020 Author Posted October 10, 2020 Great, thanks @bfarber So aside from PHP SDKs, if I just wanted to use some 3rd party JS and CSS files within a plugin or app, they go inside plugins/myplugin/dev/js or css? Thank you.
bfarber Posted October 12, 2020 Posted October 12, 2020 Yes, that's right. Or you can put them in as resources and manually load them. The Old Man 1
Recommended Posts