Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 27, 20196 yr Hi, is there any way to include extra file with plugin? e.g. mtasa php sdk? (https://github.com/multitheftauto/mtasa-php-sdk/releases)
January 28, 20196 yr This is not possible - you would either need to Use an application instead (where you can ship whatever files you want) Code your plugin crafty so that it will download the files to the local disk automatically if they're not present. You may run into trouble maintaining this down the road, but it's a potential option if you're in a bind.
January 28, 20196 yr Author 4 minutes ago, bfarber said: Code your plugin crafty so that it will download the files to the local disk automatically if they're not present. You may run into trouble maintaining this down the road, but it's a potential option if you're in a bind. that's the problem, i don't know how to do that and i don't want to make app for this, because it's not to much to do within plugin
January 29, 20196 yr Since this is just a small library, can't you just paste the whole file in your hook? You would have to do some changes to it I guess, but that should work. Having multiple classes in a hook is not an issue, as far as I know. @Daniel F or @bfarber can confirm. And if that's an issue, take the methods and add it to your existing class.
January 29, 20196 yr Author 5 hours ago, Martin A. said: Since this is just a small library, can't you just paste the whole file in your hook? You would have to do some changes to it I guess, but that should work. Having multiple classes in a hook is not an issue, as far as I know. @Daniel F or @bfarber can confirm. And if that's an issue, take the methods and add it to your existing class. hm, that's good idea, thanks. I'll try!
January 29, 20196 yr WELL, to be honest, since it's a 3rd party library and since you want to keep it up2date ( at least I hope you're going to follow the repo and update your submission when they fix a critical issue t:D ) it would really be much easier to just create an application. It's less trouble to create an application and include the 3 files, instead of having to c&p them into your releases. My 0.02$ Disclaimer: The plugin approach won't be the reason that such a marketplace submission is declined, but it's IMO just easier and cleaner.
January 29, 20196 yr Author 1 minute ago, Daniel F said: WELL, to be honest, since it's a 3rd party library and since you want to keep it up2date ( at least I hope you're going to follow the repo and update your submission when they fix a critical issue t:D ) it would really be much easier to just create an application. It's less trouble to create an application and include the 3 files, instead of having to c&p them into your releases. My 0.02$ Disclaimer: The plugin approach won't be the reason that such a marketplace submission is declined, but it's IMO just easier and cleaner. yeah, maybe but i still want to make plugin out of this, if i fail, i'll make app 🙂
January 29, 20196 yr Author alright, i see that making plugin will be much difficult than app. Let's say that i will make app out of this, any idea how to inlude sdk file from resources folder to widget? I never done this so i don't know..
January 29, 20196 yr As it's a PHP library, you would put their SDK library into the application/(name)/sources/ folder and then just do this in your controller/code @include( \IPS\ROOT_PATH . '/applications/yourapp/sources/path/file.php' ); replacing /path/file.php appropriately.
January 29, 20196 yr Author 6 minutes ago, bfarber said: As it's a PHP library, you would put their SDK library into the application/(name)/sources/ folder and then just do this in your controller/code @include( \IPS\ROOT_PATH . '/applications/yourapp/sources/path/file.php' ); replacing /path/file.php appropriately. thanks!
Archived
This topic is now archived and is closed to further replies.