Skip to content

About HRCloud2 Apps

zelon88 edited this page Dec 27, 2016 · 16 revisions

HRCloud2 Apps

Apps, just like on any platform, are the bread-and-butter of what you do on a specific device. With HRCloud2 Apps for your server, you can serve content to your users with simply crafted PHP, JScript, and HTML. HRCloud2 can install, uninstall, display, and manage your Apps, as well as scan them for viruses to keep your server safe.

HRCloud2 allows admins to add and remove Apps from simple archive packages through the AppLauncher page with just a few clicks. Almost any archive format is supported so long as the contents meet the criteria for an HRCloud2 App (see below). It also allows controlled exposure of installed Apps to specific users (Admin or non-Admin Apps supported).

As with all other HRCloud2 features and functionality, App developers are not expected to interact with a database. HRCloud2 utilizes as much "noSQL" philosophy as possible. To that end, none of the default apps require database results to function. It is highly reccomended (although not required) that App developers refrain from storing App related data in the WordPress database.

What makes an App... An app?

Apps can be any language, but there are some special requirements that HRCloud2 scans for when looking for installed Apps. These requirements are in place to protect you, your server, your users, and the trust between end-users and developers.

The App Format

  1. An "App" must have a .php file with the SAME EXACT name as the directory for the App. (Ex: Notes/Notes.php or Calculator/Calculator.php)

  2. The "App.php" file must contain the following lines of code, adjusted for your App....

/*//

HRCLOUD2-PLUGIN-START

App Name: text

App Version: text

App License: text

App Author: text

App Description: text

App Integration: 0 or 1

App Permission: 0 (Admin), 1 (non-Admin)

HRCLOUD2-PLUGIN-END

//*/

  1. Your App MUST be open-source, with publicly available source code, a link to the official HRCloud2 Github repo, and a license that satisfies GPLv3. (if you want to distribute it or monetize it in any way).

  2. If you choose to distribute your file to others, it MUST be distributed in an archive file containing ONLY ONE FOLDER named WITH ONLY the name of the included App. (HRCloud2 will NOT launch an App with a mis-matched Directory/Naming structure)

  3. Any App documentation or Readme files MUST be included INSIDE the app folder, NOT ALONGSIDE IT in the distribution archive. This ensures the Apps directory stays clean. (as extra files add time to HRCloud2's scans)

  4. An App can contain as many files as it wants, but it CAN NOT contain an "index.html" file. Any index.html files in your App will be discarded and replaced by HRCloud2 for security. Your "App/App.php" file is effectively an App's index file. Developers can build their own libraries and include or require them into their Apps.

  5. An App can have an Icon file that is any size .png file, however it will be re-sized to 48px X 48px when displayed in the AppLauncher. App Icons must be located in the root App directory and have the EXACT SAME name as the "App.php" file and the App directory. If no App Icon is included with an App, a default App Icon is used instead.

  6. If one or more of these conditions are not met, HRCloud2 may not detect or properly install your App.

  7. The HRCloud2 AppLauncher window is 810px wide. The HRCloud2 AppLauncher launches apps in their own scrollable 650px wide custom browser windows. You should try to optimize your any Apps you develop for these resolutions. The chance always exists that a user could choose to launch the app in a full-screen window themselves. Try to develop flexible, responsive, and simple HRCloud2 Apps.