HowTo: Package a Module for the Marketplace

  • Overview

    There are 3rd Party Developers who sell things in the Jamroom Marketplace.

    This document is for them.

    It goes over the steps to package your module for delivery in the marketplace in a way that utilizes the backup and upgrade systems within Jamroom.

    It should be very simple, but for the sake of completeness, its documented here.
  • Create your Module on your Jamroom install

    Before packaging your module for the marketplace, first you need to develop your module into a working state on your own Jamroom install.

    Once the module is working on your local server, then it can be exported from there into a package file by the Developer Tools module.
    Its important to have a working module on your own system and package it from there.

    This howto covers the point from having a working module ready to be released to everyone, to getting it available in the marketplace for one click installation.
  • Developer Tools Settings

    In the Developer Tools module in your Jamroom installs ACP there is a tab labelled "Jamroom.net Developer Settings"
  • screenshot of the "Jamroom.net Developer Settings" tab in the ACP
  • This tab is located at:
    ACP -> DEVELOPER -> DEVELOPER TOOLS -> GLOBAL CONFIG

    You must have entered your Developer Settings before the Package Module tool will become available to use.

    The "Developer Prefix" must be the one set at Jamroom.net under your "Profile Settings" tab.
  • Screenshot of the Profile settings tab on for 'The Jamroom Network' here on jamroom.net
  • The 'Developer Prefix' is chosen by you to identify your modules and should be unique to you as a Jamroom Developer. 'The Jamroom Network' has chosen the developer prefix jr to identify our modules.

    So a module named:
    jrAudio

    Is easily understandable as the 'Audio' module produced by 'The Jamroom Network' and if someone was to clone it, or release their own 'Audio' module they would use a different prefix.

    eg:
    ujAudio (if ultrajam was to build an audio module)
    Only modules in the system that begin with your prefix will be shown in the Package Module tool provided by the Developer Tools.
  • The Package Module Tool

    In the Developer Tools module there is a 'Package Module' tool.

    This tool is provided for 3rd party developers to get their module ready for release in the Jamroom Marketplace.
  • screenshot of the Package Module tool in the Developer Tools TOOLS section
  • screenshot of the Package Module tool with some notes
  • Select the module you want to create/update in the marketplace from the "Module To ZIP". (Only your modules will be shown)

    Then select the license you want to release the module under. If the module is open source and free, then select the "Mozilla Public License version 2.0" as the "Module License".

    Otherwise, if you want to charge for the module, select the "Jamroom Commercial License"

    Then click the CREATE MODULE ZIP button to have a .zip file created for your module.

    This will add the chosen license to the source code of each of your files, then create a .zip file that you can download.
  • Download the modules package

    A zip file will be created for you titled by the name of the module and its version number.

    When you want to release an upgrade to your module, increment the version number in your modules include.php file.

    Each include.php file will have a _meta() function that looks like this:
    (below sample is from the jrAudio module)

    /**
     * meta
     */
    function jrAudio_meta()
    {
        $_tmp = array(
            'name'        => 'Audio',
            'url'         => 'audio',
            'version'     => '1.7.0',
            'developer'   => 'The Jamroom Network, ©' . strftime('%Y'),
            'description' => 'Create and stream Audio files such as songs and audio books',
            'category'    => 'profiles',
            'license'     => 'jcl'
        );
        return $_tmp;
    }
  • In the code above, when a new version of the jrAudio file is released and it is just a few minor changes, the changes are noted in the changelog.txt and the version number is incremented from 1.7.0 to 1.7.1 and subsequent updates would go:
    1.7.1
    1.7.2
    1.7.3
    ....
    1.7.9
    1.7.10
    1.7.11
    ...
    1.7.21
    1.7.22

    If it was a major change then the major version number would be incremented
    1.8.0

    And if there was significant change with the whole system, the primary version number would change
    2.0.0

    Any version number that is higher than the current version number would be considered an upgrade and all of the Jamroom systems who use that module would be informed that there was an upgrade done to it when the package is upgraded to the marketplace.

    They could then click the button and the newer version would replace the older version that they have installed and it would be archived to be reverted to if required.
  • Upload to the Marketplace

    Download the packaged module that you have just created to your pc, then visit your profile on jamroom.net and navigate to the 'Marketplace'
  • screenshot of the Marketplace tab for the 'The Jamroom Network' profile
  • If the module you have just packaged is already in the Marketplace of your profile, then locate it and click the update button. If not, click the create button.
  • Upload your Package file

    Click on the "Select Zip File" to upload the newer version of your Marketplace item.

    Once the upload has completed, click the SAVE CHANGES button.
  • screenshot of the 'Select Zip File' button
  • Done

    Jamroom users who are running your module will be able to get the newer version when they visit their System Updates tab and can choose to update all the new modules, or select just which they want to update to.
  • screenshot of the System Updates tab of the Marketplace module
  • Private Channels

    As a 3rd party developer you have the ability to create channels for your module distribution and give sites access to those channels.

  • screenshot of a 3rd party developer account with created channels
  • When you upload a module to the marketplace you will be asked which channel it belongs in. Select one of your created channels if you intend the module only to be used by site that have been invited to access it.

Tags