APS scripts
Ispmanager supports Application Package Standard (APS) format web scripts of standards 1.0, 1.1, 1.2. By default, the repository containing the latest versions of CMS and other software is connected. To connect your own repository, you need to add the following path in the ispmanager configuration file (by default /usr/local/mgr5/etc/ispmgr.conf) :
ApsExtRepository <the path to the XML description of the repository>
Example:
ApsExtRepository http://my.web.aps/repo.xml
Configuring web scripts
To configure edit the /usr/local/mgr5/etc/templates/aps_settings.xml file.
Example of aps_settings.xml
<doc>
<imagemapping defimg="aps.png">
<apsimg name="Drupal">drupal.png</apsimg>
<apsimg name="joomla">joomla.png</apsimg>
<apsimg name="WordPress">wordpress.png</apsimg>
<apsimg name="Prestashop">prestashop.png</apsimg>
<apsimg name="phpBB">phpbb.png</apsimg>
</imagemapping>
<updaterules>
<onupdate name="Drupal" type="latest"/>
<onupdate name="joomla" type="latest" quantity="1"/>
<onupdate name="WordPress"/>
<onupdate name="Prestashop" quantity="2"/>
<onupdate name="phpBB" force="yes"/>
</updaterules>
<defverrules>
<defver name="Drupal"/>
<defver name="joomla" type="latest"/>
<defver name="WordPress"/>
<defver name="Prestashop"/>
<defver name="phpBB"/>
</defverrules>
</doc>
The "imagemapping" section describes the images of the web scripts. The images can be seen by user in the Web scripts form (in Settings) and CMS (in Sites). The "defimg" attribute defines the default image that is used if no image with the script name is found. The images must be in PNG format of 32*32 dpi and located in /usr/local/mgr5/skins/common/img directory. Each "apsimg" element contains an image name for the web script, the name of which is specified in the "name" attribute.
"updaterules" section — describes the rules of updating the list of available to the user web scripts. Each "onupdate" element contains an update rule for a web script.
- name — the name of the web script to which the rule applies;
- type — type of automatic package selection: Possible values: "latest" — Use the latest, most recent versions; "earliest" — Use the oldest, earliest versions; "definite" — use a specific version. If the attribute value is "definite", specify the version of the web script in the "onupdate" element value. For example: aps_settings.xml file
<onupdate name="Drupal" type="definite">7.31-36</onupdate>
If no type is specified, the default value "latest" is used.
- quantity - the number of web scripts packages. Applies if the "type" attribute is set to "latest" or "earliest". With a value other than one, the specified number of packages will be allowed. For example, a combination of type="latest" and quantity="3" will resolve to the last three versions of web script packages. If no quantity is specified, the default value is "1";
- force - without specifying this attribute rule sets are applied only if there are no packages left in the list of packages of a particular web script available to users. The value of the attribute specified as "yes" (force="yes") allows the versions of allowed packages to be overridden according to the rule during each update. Previously available versions may become unavailable.
The "defverrules" section describes how to select the "default" version of a package from the list of versions available to users. Each "defver" element contains a rule for automatically selecting the default version. "defver" element attributes:
- name — the name of the web script to which the rule applies;
- type — type of automatic package selection: Possible values: "latest" — Use the latest, most recent versions; "earliest" — Use the oldest, earliest versions; "definite" — use a specific version. If the attribute value is "definite", specify the version of the web script in the "onupdate" element value. For example: aps_settings.xml file If no type is specified, the default value "latest" is used.
<onupdate name="Drupal" type="definite">7.31-36</onupdate>
The rules from the "defverrules" section are also applied when the administrator handles web script permissions for users. For example, if the administrator prohibits the use of a version of a web script by users and there are more versions available in the list, then one of them will be automatically selected as the default version according to the rules from the "defverrules" section.