Steps for creating a new plugin

    • 75 posts
    March 19, 2018 3:47 PM EDT


    1) Developer SDK
    I'm generating the skeletons of my plugins via "Create a Package". Since it creates a .tar file for each plugin, I assume my next step is to add the plugin skeleton through the Manage PLugins page of the admin?
    Y / N

    2) Adding pieces
    Whether the answer above was yes or no (in such case I had to decompressed the .tar file and to add all folders and files manually) a lot of elements are obviously missing and I will have to add them bit by bit as I develop.


    I assume that throughout the development, as I add controllers, models etc, I will be adding tables to the DB manually, as well as elements inside the manifest.php file. Correct? Y/N


    I also assume that I can leave alone: the instal.php file, the my.sql file and the json file inside /packages, as those seem to be only involved during initial installation of a completed plugin
    Correct? Y/N


    Or do I also have to keep constantly updating the instal.php file, the my.sql file and the json file inside packages?

    • Moderator
    • 6923 posts
    March 20, 2018 5:22 AM EDT

    Did you check the Hello World example? It should help a bit.

    Did you see this tutorial, http://kb.scripttechs.com/creating-a-socialengine-widget/ which is a very basic tutorial of the steps to make a simple plugin. Yes, you do install the first skeleton via package manager so that the script can build the package when you are done. It will update the json.

    I use Netbeans which makes developing these much easier. 

    Why are you manually adding any files or folders to the .tar? It creates the base package. You then open the manifest and put the file locations in that so that when the package is built, it also includes the extra files/folders.

    Get my free plugins in the certified marketplace (ScriptTechs). Many of them have included the english translation file which is located in the languages/en folder. As such, the file is declared in the manifest file and the package builder automagically includes it when it builds the package for export and it's then included in the json file as well.

    I haven't had to do any with database entries so I can't help much with that. 

    • 3 posts
    July 1, 2018 1:10 PM EDT
    Donna said:

    Did you see this tutorial, http://kb.scripttechs.com/creating-a-socialengine-widget/ which is a very basic tutorial of the steps to make a simple plugin.

     

    It's a wigdget ;-)

     

    I'm going to write a plugin based on i.e. "Album". What is the simplest way to "clone" this module to avoid writing from scratch?

     

    Jacek


    This post was edited by Jacek Swierczek at July 1, 2018 1:11 PM EDT
    • Moderator
    • 6923 posts
    July 2, 2018 4:52 AM EDT

    Yes it's a widget, a simple plugin which I said above and I wrote to be a help as there was no tutorial at all for making even a simple widget. It's in the plugin manager. It's not a Module. You have widgets and modules in the plugin SDK. We went over that in another thread.It's different here than in other scripts where you have Plugins and Blocks. 

    So, you want to write a Module. But rather than write it, you want to clone the Album module. I would guess you would use a search/replace to rename everything to whatever your Module is. https://support.socialengine.com/php/customer/portal/articles/1638402-technical-overview?b_id=4311 the tech overview might help you some. 

    You won't be able to sell or post this plugin in the marketplace or distribute it as you would be using the entire Album module and just changing the name.

    • 3 posts
    July 2, 2018 2:35 PM EDT

    I'm just looking for a more expanded example than HelloWorld. :-)

     

     

    • Moderator
    • 6923 posts
    July 2, 2018 4:08 PM EDT

    That is the only one we have other than my basic tutorial which should help with settings for your plugin. Otherwise, it's best to learn by looking at what is in the plugins you have.