Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 5, 20204 yr 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.
October 6, 20204 yr Solution 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" ); }
October 10, 20204 yr Author 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.