Making Custom Package

From Softaculous Wiki
Jump to: navigation, search

Software Vendor API

A sample package is available here : File:Sample.zip

For testing your Custom Script on your localhost before uploading it to your server you can download AMPPS and install it:
http://www.ampps.com/download

For example we have chosen the Script Name My_Custom_Script and Softaculous name of the script cust

NOTE : The files should be placed the the /path/to/scripts/SOFTNAME/ directory with the same name as the Softaculous name you choose for adding the script in Softaculous. In this case /var/softaculous/cust/*

Files/Folders used by the Package

1. info.xml

2. install.xml

3. install.php

4. install.js

5. Zipped Package (name should be cust.zip)

6. SQL file for database population (optional) (name should be cust.sql)

7. fileindex.php

8. upgrade.xml (For Upgrading older versions) (optional)

9. upgrade.php (For Upgrading older versions) (optional)

10. upgrade.js (For Upgrading older versions) (optional)

11. images (A folder containing images related to package description)

12. Any other files required to install or upgrade


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://URL-to-the-script-DEMO/
   </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>
      4.0.6
   </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

  1. <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.
  2. <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.
  3. <demo></demo> - A URL of the demo of the Software.
  4. <ratings></ratings> - A URL of the ratings of the Software maintained by Softaculous. Softaculous will provide the links based on Software IDs assigned.
  5. <space></space> - Space in BYTES required for a fresh install of the Software.
  6. <support></support> - A link to the Support Center of the Software.
  7. <version></version> - The Version of the Software.
  8. <mod></mod> - Value of mod should be 1 when you are making new package.
  9. <softversion></softversion> - The MINIMUM version Of SOFTACULOUS that will be required to install the software. At present please put 4.0.6
  10. <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 compulsory. 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 shows the install form, 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 itself. 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">Sample</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>
   <cron>
	<min>{rand(0,59)}</min>
	<hour>8</hour>
	<day>*</day>
  	<month>*</month>
	<weekday>*</weekday>
	<command>/usr/bin/php -q [[softpath]]/cron.php</command>
   </cron>
   <files>
      <exclude>uni.php</exclude>
      <exclude>unid.php</exclude>
      <include>avatars/*</include>
   </files>
</softinstall>


Explanation of install.xml

1 <softinstall></softinstall> - Tells that SOFTACULOUS will Copy and Install the SOFTWARE. NOTE : Softaculous will ALWAYS PREFER <softinstall></softinstall>.

2 <settings></settings> - All settings for which input from the user is required.

3 <group></group> - This is just to CATEGORIZE/GROUP a set of settings e.g. Admin Settings, Software Settings etc. Helps in better presentation!

4 <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.

5 <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".

6 <head>(string)</head> - The head/human readable name of an INPUT Tag. This is NOT to be given in <input type="hidden"></input>.

7 <exp>(string)</exp> - An explanation of the INPUT Tag. This is OPTIONAL.

8 <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. The function should be defined in the install.php Softaculous will look for the function with the name same as the value of this handle tag here it is __function_name. Softaculous will pass the value posted in the form to this function and then you can make the required changes.

9 <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.

10 <cron></cron> - This is OPTIONAL. This is used to add a scheduled CRON command to be executed for a script. Eg: If a script needs a cron.php executed you can use this tag to add a CRON command.

  • <min>{rand(0,59)}</min> - This generates a random integer between 0 and 59. This can be changed on the install form by the user. Make sure you use the correct start and end values. Since this is a minutes tag we used 0 - 59.
  • <hour>8</hour> - This will set 8 as the hour by default. This can be changed on the install form by the user.
  • <day>*</day> - This will set * as the day by default i.e. everyday. This can be changed on the install form by the user.
  • <month>*</month> - This will set * as the month by default i.e. each month. This can be changed on the install form by the user.
  • <weekday>*</weekday> - This will set * as the weekday by default i.e. everyweek. This can be changed on the install form by the user.
  • <command>/usr/bin/php -q [[softpath]]/cron.php</command> - This will be the cron command that needs to be executed at the specified time. This cannot be changed on the install form by the user. You can use the variables in $__settings array in the [[ ]] tags. So in this command [[softpath]] will be replaced with the path of the installation. You can similarly use [[softurl]], etc

11 <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, i.e when no file tag is used All files and folders in the zipped package 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.
This should also include the functions that you have used in the handle tag in the install.xml file. For Eg : We used __admin_pass as a handle in the install.xml so the install.php should contain a function with the same name i.e. __admin_pass and it will get the value passed from the form as the parameter and you can make the function to hash the password string as you require it.


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. Zipped Package

The Zipped Package that is required to be unzipped and the name should be software_name.zip here we will use cust.zip.


6. SQL file

To populate the database that the script requires the name should be software_name.sql here we will use cust.sql. This should contain the SQL commands to be executed for eg: CREATE, INSERT, etc The dynamic values can be replaced by variables in [[ ]] tags which are defined in the $__settings array for eg: Timestamp, URL, PATHs.


7. fileindex.php

This file should contain the files and folders which are present in the root of the installation. This file will be used while removing an installation and only the files and folders present in this file will be removed from the root and the remaining files will be intact.


8. 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.


9. 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!



10. 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


11. images (Folder)

This folder will contain images that will be displayed in the script overview and required in the overview tag in info.xml .


12. Other Files

Any other files required to install or upgrade. These could be the configuration files in the package which contains the dynamic values which can be replaced by the variables in [[ ]] tags defined in the $__settings array.


Explanation of Important functions

  • sconfigure($parameter1, $parameter2, $parameter3) - This function is used to copy the contents of the file in the package parse the values in [[ ]] tags and place it whereever required.
    • 1st Parameter (required) = String $parameter1 is the file to be configured.
    • 2nd Parameter (optional) = String $parameter2 is the relative path (after the /path/to/installation/) where you want to configure the file.
    • 3rd Parameter (optional) = Int $parameter3 is the value 1 if you want to give absolute path in the 2nd parameter.


  • sdb_import($parameter1) - This function is used to execute the database queries.
    • 1st Parameter (required) = String $parameter1 is the Absolute path of the file which contains the database queries to be executed.


  • sdb_export($parameter1, $parameter2, $parameter3, $parameter4, $parameter5) - Export a database to a file
    • 1st Parameter (required) = string $parameter1 is the MySQL Host
    • 2nd Parameter (required) = string $parameter2 is the MySQL User
    • 3rd Parameter (required) = string $parameter3 is the MySQL User password
    • 4th Parameter (required) = string $parameter4 is the Database Name
    • 5th Parameter (required) = string $parameter5 is the path of the file where the data is to be saved.


  • schmod($parameter1, $parameter2, $parameter3) - This function is used to CHMOD the files or folders
    • 1st parameter (required) = string $parameter1 is the Path to file or directory to CHMOD
    • 2nd Parameter (required) = Int $parameter2 is the permission to be given for eg: 0777, 0755, etc
    • 3rd Parameter (optional) = Int $parameter3 is the value 1 if you wish to CHMOD recursively (directories only)


  • smkdir($parameter1, $parameter2) - This function is used to create directories
    • 1st Paraneter (required) = string $parameter1 is the Path of directory to be created
    • 2nd Parameter (required) = Int $parameter2 is the permission to be given for eg: 0777, 0755, etc


  • sversion_compare($parameter1, $parameter2, $parameter3) - Softaculous Version Compare, fixes a bug with '+' as the last character
    • 1st Paraneter (required) = The first version
    • 2nd Paraneter (required) = The second version
    • 3rd Paraneter (optional) = string $parameter3 is By default NULL or operators of the original version_compare() function


  • sdbpass() - Generate a random DB Password.


  • srandstr($parameter1) - Generate a random string for the given length
    • 1st Paraneter (required) = int $parameter1 is the number of characters that should be returned


  • sparse($parameter1) - Will parse the $parameter1 given with the GLOBAL $__settings made available during Install and Update
    • 1st Paraneter (required) = string $parameter1 is the string that needs to be parsed


  • sshell_exec($parameter1) - This is meant to be used by install.php, upgrade.php, etc.
    • 1st Paraneter (required) = string $parameter1 is the command to be executed.


  • sdb_query($parameter1, $parameter2, $parameter3, $parameter4, $parameter5) - Execute Database queries
    • 1st Parameter (required) = string $parameter1 is the Database Queries seperated by a SEMI COLON (;)
    • 2nd Parameter (required) = string $parameter2 is the Database HOST.
    • 3th Parameter (required) = string $parameter4 is the Database User Name.
    • 4th Parameter (required) = string $parameter5 is the Database User Password.
    • 5rd Parameter (required) = string $parameter3 is the Database Name.


  • sunzip($parameter1, $parameter2, $parameter3, $parameter4, $parameter5) - A Function to unzip a ZIP
    • 1st Parameter (required) = string $parameter1 is the path to ZIP File.
    • 2nd Parameter (required) = string $parameter2 is the Final destination where the file will be unzipped.
    • 3rd Parameter (optional) = int $parameter3 is the value 1 if you want to Overwrite existing files.
    • 4th Parameter (optional) = array $parameter4 includes the files of the given pattern.
    • 5th Parameter (optional) = array $parameter5 excludes the files of the given pattern.


  • sfile($parameter1) - Read file contents from the DESTINATION. Should be used when an installations file is to be fetched. For local package file, use the PHP file() function. The main usage of sfile is for import or upgrade.
    • 1st Parameter (required) = string $parameter1 is the path to the File.


  • swget($parameter1, $parameter2) - Get a file from the WEB
    • 1st Parameter (required) = string $parameter1 is the URL to get the file.
    • 2nd Parameter (optional) = string $parameter2 is the path of the file or directory if you want to save it here


  • sreplace($parameter1, $parameter2, $parameter3) - Search and replace text in a file THAT is in the INSTALLATION and not from the LOCAL package file
    • 1st Parameter (required) = string $parameter1 is the path of the file or directory.
    • 2nd Parameter (required) = string $parameter2 is a regular expression / string to replace.
    • 3rd Parameter (required) = string $parameter3 is the value to replace / the value found in the search to replace with.


  • srm($parameter1) - Deletes RECURSIVELY the path given in the INSTALLATION folder only and not in the PACKAGE
    • 1st Parameter (required) = string $parameter1 is the path of the file or directory.


  • sfile_exists($parameter1) - Check whether a file or directory exists at the INSTALLATION level ONLY, not in the PACKAGE
    • 1st Parameter (required) = string $parameter1 is the path of the file or directory.


  • sis_dir($parameter1) - Check whether the path is a directory
    • 1st Parameter (required) = string $parameter1 is the path of the file or directory.


  • srename($parameter1, $parameter2) - Renames / Moves a file / directory at the INSTALLATION only. This is meant to be used by install.php, upgrade.php, etc.
    • 1st Parameter (required) = string $parameter1 is the path of the old file or directory.
    • 2nd Parameter (required) = string $parameter2 is the path of the new file or directory.


  • swrite($parameter1, $parameter2, $parameter3) - Create a FILE and write DATA into it. If you want to overwrite, then specify $overwrite = 1
    • 1st Parameter (required) = string $parameter1 is the Path of the file.
    • 2nd Parameter (required) = string $parameter2 is the DATA to be written.
    • 3rd Parameter (optional) = int $parameter3 is the value 1 if you want to Overwrite existing files.


  • scopy($parameter1, $parameter2) - Copies files from source (PACKAGE DIR) to destination (INSTALLATION). This is meant to be used by install.php, upgrade.php, etc. Cannot be used to copy files from INSTALLATION to INSTALLATION
    • 1st Parameter (required) = string $parameter1 is the source path of the file.
    • 2nd Parameter (required) = string $parameter2 is the destination path of the file where source is to be copied.


  • sunlink($parameter1) - Deletes a file. This is meant to be used by install.php, upgrade.php, etc.
    • 1st Parameter (required) = string $parameter1 is the Path of the file.



Explanation of Important Variables

Note: The following variables should be global in the function where you wish to use them.

  • $__settings (array)
Array
(
    [softdomain] => DOMAIN NAME
    [softdirectory] => DIRECTORY of Installation(empty if installed in root)
    [softpath] => PATH/TO/INSTALLATION
    [softurl] => URL/TO/INSTALLATION
    [softdb] => DATABASE NAME
    [softdbuser] => DATABASE USER
    [softdbhost] => DATABASE HOST
    [softdbpass] => DATABASE PASSWORD
    [admin_username] => ADMIN USERNAME filled in the Form (if any)
    [admin_pass] => Encrypted ADMIN Password filled in the Form (if any)
    [admin_email] => ADMIN EMAIL filled in the Form (if any)
)
  • $software (array)
Array
(
    [name] => NAME Of the Script being installed
    [softname] => Softaculous name of the script being installed
    [desc] => Description of the script being installed
    [cat] => CATEGORY OF SCRIPT BEING INSTALLED
    [type] => TYPE OF SCRIPT BEING INSTALLED
    [ver] => VERSION OF SCRIPT BEING INSTALLED
    [path] => PATH/TO/SCRIPT/PACKAGE
    [spacereq] => Space required in Bytes
)
  • $error (array) = You can use this variable if you want to display any errors. If this array is not empty the installation will not be completed.

Eg: $error[] = 'THIS IS AN ERROR';

Once the package is ready you may refer to the guide to Adding Custom Scripts.

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.