Softaculous
Softwares    Script Demos    Demo    Admin Demo    Partners       

Software Vendor API A sample package is available in the Downloads Center.

Files/Folders in a Package
  1. info.xml
  2. install.xml
  3. install.php
  4. install.js
  5. upgrade.xml (For Upgrading older versions)
  6. upgrade.php (For Upgrading older versions)
  7. upgrade.js (For Upgrading older versions)
  8. images (A folder containing images related to package description)
  9. Zipped Package
  10. Any other files required to install or upgrade(e.g. SQL File for Database Population)
Each file is described in detail below.

1. info.xml
This file basically contains an explanation of the software, features list, software size, ratings link, demo link, support link, version, minimum SOFTACULOUS version required AND LANGUAGE Strings
<soft xmlns="http://www.softaculous.com">
   <overview>
      <img src="logo.gif" style="float:right" alt="" />{{overview}}
   </overview>
   <features>
      {{features}}
   </features>
   <demo>
      http://www.softaculous.com/demos/example
   </demo>
   <ratings>
      http://www.softaculous.com/software.php?soft=ID
   </ratings>
   <space>
      2745775
   </space>
   <support>
      http://www.example.com
   </support>
   <version>
      1.0.8
   </version>
   <softversion>
      1.0
   </softversion>
   <languages>
      <english-overview>This is the best Software available on planet earth!</english-overview>      
      <english-features>Everything</english-features>
      <english-settings>Board Settings</english-settings>
      <english-name>Board Name</english-name>
      <english-name_exp>The name of the forum</english-name_exp>
      <english-email>Board Email</english-email>
      <english-email_exp>The forums email address</english-email_exp>
      <english-mysql_pre>MySQL Database Prefix</english-mysql_pre>
      <english-utf8>Use UTF-8 Character Set</english-utf8>
      <english-utf8_exp>Use if you are going to work with multiple languages</english-utf8_exp>
      <english-ad_act>Admin Account</english-ad_act>
      <english-ad_name>Admin Username</english-ad_name>
      <english-ad_pass>Admin Password</english-ad_pass>
      <english-ad_email>Admin Email</english-ad_email>
      <english-yes>Yes</english-yes>
      <english-no>No</english-no>
      <english-select>Select</english-select>
      <english-textarea>TextArea</english-textarea>
      <english-err_openconfig>Could not open the Configuration File</english-err_openconfig>
      <english-err_writeconfig>Could not write the Configuration File</english-err_writeconfig>
      <english-err_openmy>Could not open the MySQL Data File</english-err_openmy>
      <english-err_selectmy>The MySQL Database could not be selected.</english-err_selectmy>
      <english-err_myconn>The MySQL Connection could not be established.</english-err_myconn>
      <english-err_makequery>Could not make the query numbered</english-err_makequery>
      <english-err_mynum>MySQL Error No</english-err_mynum>
      <english-err_myerr>MySQL Error</english-err_myerr>
      <english-err_wrongemail>The email address is not valid.</english-err_wrongemail>
      <english-err_boardemail>The Boards Email Adddress is not valid</english-err_boardemail>
      <english-err_ademail>The Admin Email Adddress is not valid</english-err_ademail>
   </languages>
</soft>
Explanation of info.xml
  • <overview></overview> - Should contain a description of the software. You are allowed to use standard HTML Tags but no Javascript. For image tags please just use the image file name for the source and no URL/PATH.
  • <features></features> - Should contain a LIST of features of the software. You are allowed to use standard HTML Tags but no Javascript. For image tags please just use the image file name for the source and no URL/PATH.
  • <demo></demo> - A URL of the demo of the Software located at Softaculous Servers. Softaculous will install demos of the Softwares and provide DEMOS.
  • <ratings></ratings> - A URL of the ratings of the Software maintained by Softaculous. Here also Softaculous will provide the links based on Software IDs assigned.
  • <space></space> - Space in BYTES required for a fresh install of the Software.
  • <support></support> - A link to the Support Center of the Software.
  • <version></version> - The Version of the Software.
  • <softversion></softversion> - The MINIMUM version OF SOFTACULOUS that will be required to install the software. At present please put 1.0
  • <languages></languages> - The Language strings that will be parsed for info.xml, install.xml, upgrade.xml, errors given by install.php, upgrade.php and Language Strings in install.js, upgrade.js
    Above there is an example of defining strings. The format is as follows :
    <language-string_name>The Complete String</language-string_name>

    All these strings will be accessed as {{string_name}} (e.g. shown in OVERVIEW - <overview></overview>). NOTE: English strings are complusory. For any language if a string is missing, the ENGLISH string will be used. If the english string is absent as well the string code - {{string_name}} will be return as only string_name.


2. install.xml
This file defines that Softaculous is to COPY and INSTALL the Software or just COPY the Software and provide a link from where the Installation would be completed by the Software it self. So there are TWO Types of install files possible.
A) SOFTACULOUS INSTALLS the Software
The code is as follows :
<softinstall xmlns="http://www.softaculous.com">
   <settings>
      <group>
         <heading>{{settings}}</heading>
         <input type="text" name="sn" size="30" value="My Board">
            <head>{{name}}</head>
            <exp>{{name_exp}}</exp>
         </input>
         <input type="text" name="board_email" size="30" value="board" softmail="true">
            <head>{{email}}</head>
            <exp>{{email_exp}}</exp>
            <handle>__email_address</handle>
         </input>
         <input type="text" name="dbprefix" size="20" value="name_">
            <head>{{mysql_pre}}</head>
            <optional>true</optional>
         </input>
         <input type="checkbox" name="utf8" value="on">
            <head>{{utf8}}</head>
            <exp>{{utf8_exp}}</exp>
         </input>
      </group>
      <group>
         <heading>{{ad_act}}</heading>
         <input type="text" name="admin_username" size="30" value="admin">
            <head>{{ad_name}}</head>
         </input>
         <input type="text" name="admin_pass" size="30" value="pass">
            <head>{{ad_pass}}</head>
            <handle>__admin_pass</handle>
         </input>
         <input type="text" name="admin_email" size="30" value="admin" softmail="true">
            <head>{{ad_email}}</head>
            <handle>__email_address</handle>
         </input>
         <input type="select">
            <select name="test_select">
               <option value="yes">{{yes}}</option>
               <option value="no">{{no}}</option>
            </select>
            <head>{{select}}</head>
         </input>                  
         <input type="textarea">
            <textarea name="test_area" cols="30" rows="10">sdsd</textarea>
            <head>{{textarea}}</head>
         </input>
      </group>
      <group>
         <heading>hidden</heading>
         <input type="hidden" name="cookie" value="">
            <handle>__cookiename</handle>
         </input>
      </group>
   </settings>
   <db>mysql</db>
   <files>
      <exclude>uni.php</exclude>
      <exclude>unid.php</exclude>
      <include>avatars/*</include>
   </files>
</softinstall>
Explanation of install.xml
  • <softinstall></softinstall> - Tells that SOFTACULOUS will Copy and Install the SOFTWARE. NOTE : Softaculous will ALWAYS PREFER <softinstall></softinstall>.
  • <settings></settings> - All settings for which input from the user is required.
  • <group></group> - This is just to CATEGORISE/GROUP a set of settings e.g. Admin Settings, Software Settings etc. Helps in better presentation!
  • <heading></heading> - This is the NAME/HEADING of the Group of Settings. A Software Vendor can give any Heading as per the Group of Settings. However the heading :
    <heading>hidden</heading>
    is given special recognition as the HIDDEN Settings Group. These are those settings which are hidden from the user and are posted during SUBMISSION. This is OPTIONAL and all INPUT Types must be hidden in this group.
  • <input></input> - The INPUT Tag is for obtaining the users input. The above code contains an e.g. of all types of Input Tags allowed by Softaculous. But please dont close with />. Each input tag is closed with a </input>. Also the name of the input tag is PARSED by Softaculous as the ID. e.g. Softaculous will make <input type="text" name="name"></input> to <input type="text" name="name" id="name"></input>. No style tags are allowed.
    Following are the possible types:
    • <input type="text"></input> - The normal HTML input text tag. It has an additional OPTIONAL parameter - softmail="true" which helps Softaculous to append the domain selected by the user to each input field having softmail="true".
    • <input type="checkbox"></input> - The normal HTML input checkbox tag. It can also take the parameter - softmail="true".
    • <input type="select"></input> - Its a special Softaculous tag. No name should be specified in the input tag. The name will be specified in the select tag. The <select name="select_name"></select> would go within <input type="select"></input>. The select tag is the normal HTML select tag with options! Here also the ID would be PARSED from the name of the SELECT TAG.
    • <input type="textarea"></input> - Its a special Softaculous tag. No name should be specified in the input tag. The name will be specified in the TEXTAREA tag. The <textarea name="textarea_name">TEXT</textarea> would go within <input type="textarea"></input>. The textarea tag is the normal HTML textarea tag with cols and rows! Here also the ID would be PARSED from the name of the TEXTAREA TAG.
    • <input type="hidden"></input> - The normal HTML input hidden tag. It should be specified only in the Group having <heading>hidden</heading>. It can also take the parameter - softmail="true".
  • <head>{{string}}</head> - The head/human readable name of an INPUT Tag. This is NOT to be given in <input type="hidden"></input>.
  • <exp>{{string}}</exp> - An explanation of the INPUT Tag. This is OPTIONAL.
  • <handle>__function_name</handle> - This is OPTIONAL. Its basically the name of a Software Vendor defined PHP function which will be called to further process the data of an INPUT Tag. It can be given to all types of INPUT Tags.
  • <db>mysql</db> - The database type required by the software. At present only MySQL is supported. This tag is optional and should be used only if the software requires a Database.
  • <files></files> - This is OPTIONAL. It can be used to INCLUDE/EXCLUDE specific files to be copied during installation from the ZIPPED Software Package. e.g. If there is a file uni.php in the ZIPPED Software Package and it is NOT to be copied it can be excluded using <exclude>uni.php</exclude>. Similarly all files in a folder can be excluded using <exclude>foldername/*</exclude>. By DEFAULT, that is, when no file tag is used. All files and folders are INCLUDED!
B) SOFTACULOUS COPIES the Software
The code is as follows :
<softcopy xmlns="http://www.softaculous.com">
   <setuplocation>install.php</setuplocation>   
   <files>
      <exclude>uni.php</exclude>
      <exclude>unid.php</exclude>
      <include>avatars/*</include>
   </files>
</softcopy>
Explanation of install.xml
  • <softcopy></softcopy> - Means that SOFTACULOUS will JUST Copy the SOFTWARE.
  • <setuplocation>location</setuplocation> - As SOFTACULOUS will JUST Copy the SOFTWARE and installation will be done by the software itself, this will specify the relative URL to which the user must go to CONTINUE with the setup. e.g. <setuplocation>install.php</setuplocation> or <setuplocation>install/index.php</setuplocation>
  • <files>location</files> - The files tag can also be used in the same fashion.


3. install.php
This file will be called if SOFTACULOUS is to INSTALL the Software. Softaculous is just concerned with the function __install(). A Software Vendor can do whatever they want to install the software. All settings DEFINED in install.xml will be available in an ARRAY $__settings. Please check the Sample Package for the files Code. There are explanations of each function in the SAMPLE install.php file. A Software Vendor can use the PRE Defined functions in the SAMPLE install.php file for the INSTALLATION Process. This file will be under strict control from Softaculous as it can damage Softaculous files or the server.

4. install.js
This file will be called if SOFTACULOUS is to INSTALL the Software. It is just to check the Data that has been provided by a user before the FORM is submitted. Softaculous is just concerned with the function formcheck(). The names of <input></input> tags will be available as IDs for this purpose. Please check the SAMPLE install.js

5. upgrade.xml
This file is useful when there are newer versions of Softwares. It will enable users to upgrade from older version to newer versions by the click of a button. Here also we have two options :
A) SOFTACULOUS UPGRADES the Software
This file is similar to install.xml with a few minor changes:
<softupgrade xmlns="http://www.softaculous.com">
   <settings>
      <group>
         <heading>{{settings}}</heading>
         <input type="text" name="board_email" size="30" value="board" softmail="true">
            <head>{{email}}</head>
            <exp>{{email_exp}}</exp>
            <handle>__email_address</handle>
         </input>
      </group>
   </settings>
   <files>
      <exclude>uni.php</exclude>
      <exclude>unid.php</exclude>
      <include>avatars/*</include>
   </files>
</softupgrade>
Here the difference from install.xml is only that <softupgrade></softupgrade> is the XML tag instead of <softinstall></softinstall>. And <db></db> is not allowed. Rest everything is the same. You can use <files></files> tag effectively for preventing overwriting of IMPORTANT files in the software.

B) SOFTACULOUS COPIES the Software
Here also SOFTACULOUS will just copy the files and provide a link where the upgradation process is to be continued. The code is as follows :
<softcopy xmlns="http://www.softaculous.com">
   <setuplocation>upgrade.php</setuplocation>   
   <files>
      <exclude>uni.php</exclude>
      <exclude>unid.php</exclude>
      <include>avatars/*</include>
   </files>
</softcopy>
This file is completely the same as the LATER install.xml that is just to copy the
  • <softcopy></softcopy> - Means that SOFTACULOUS will JUST Copy the SOFTWARE.
  • <setuplocation>location</setuplocation> - As SOFTACULOUS will JUST Copy the SOFTWARE and upgradation will be done by the software itself, this will specify the relative URL to which the user must go to CONTINUE with the upgradation. e.g. <setuplocation>upgrade.php</setuplocation> or <setuplocation>upgrade/index.php</setuplocation>
  • <files>location</files> - The files tag can also be used in the same fashion.


6. upgrade.php
This file will be called if SOFTACULOUS is to UPGRADE the Software. Softaculous is just concerned with the function __upgrade(). A Software Vendor can do whatever they want to upgrade the software. All settings DEFINED in upgrade.xml and settings such as Software Path, URL, Database Name, Password, Username, older version number will be available in an ARRAY $__settings. Please check the Sample Package for the files Code. There are explanations of each function in the SAMPLE upgrade.php file. A Software Vendor can use the PRE Defined functions in the SAMPLE upgrade.php file for the UPGRADATION Process. This file will be under strict control from Softaculous as it can damage Softaculous files or the server!

7. upgrade.js
This file will be called if SOFTACULOUS is to UPGRADE the Software. It is just to check the Data that has been provided by a user before the FORM is submitted. Softaculous is just concerned with the function formcheck(). The names of <input></input> tags will be available as IDs for this purpose. Please check the SAMPLE upgrade.js

8. images (Folder)
This folder will contain images that will be required in the and tag in info.xml .

9. Zipped Package
The Zipped Package and the name should be software_name.zip.

10. Other Files
Any other files required to install or upgrade(e.g. SQL File for Database Population) .


We hope that this Softaculous API is easy to use and covers most aspects to make it simple for the Software Vendor to make a Installation Package. If you have any suggestions then please let us know.