Jump to content

Community

  • We are moving our Documentation to our new Guides area.

    As articles are moved they will be deleted. Please start following the new guides. We look forward to publishing all our new guides soon!

  • Sign in to follow this  

    Update Checking (*)


    Mark

    IPS Community Suite can periodically check for updates to your application, plugin or theme and present a message in the Admin CP if an update is available.

    When creating your application, plugin or theme you can specify a URL. IPS Community Suite will send a request to the specified URL periodically with a "version" parameter specifying the current version ID number. For example, if you specify the URL as:

    http://www.example.com/myapp/check.php

    And someone is using a version of your application with the version ID "10002", then the request will be sent to:

    http://www.example.com/myapp/check.php?version=10002

     

    This URL should return with a JSON-encoded object with the following properties:

    • version specifying the human-readable version number (e.g. "2.0.0") of the latest version available
    • longversion specifying the version ID number (e.g. "20000") of the latest version available
    • released specifying the unix timestamp of the date that version was released
    • updateurl specifying the URL where the administrator can download the update

    For example, you might return something like this:

    {
        "version": "2.0.0",
        "longversion": 20000,
        "released": 1423841958,
        "updateurl": "http://www.example.com/myapp/download"
    }

     

    For a live example, the URL for checking for updates to the IPS Community Suite itself is:

    http://remoteservices.invisionpower.com/updateCheck

    You can visit this URL to see what is returned for the IPS Community Suite.

    groups2.PNG

    copy.PNG

    Sign in to follow this  


    User Feedback

    Recommended Comments

    Would be nice if this functionality could be auto-provided by the IPS Marketplace, but at least the PHP script to do so on your own site is a no-brainer:

     

    <?php

      header('Content-type: application/json');

      $arr = array (
        "version" => "2.0.0",
        "longversion" => 20000,
        "released" => 1423841958,
        "updateurl" => "http://www.example.com/myapp/download"
      );

      echo json_encode($arr);
    ?>

     

    Share this comment


    Link to comment
    Share on other sites

×
×
  • Create New...