This article shows the differences of functionality of LoxBerry's Perl modules and LoxBerry's PHP modules. It is mainly meant as a quick reference for module developers.
The functions and variables are developed as similar as possible, but differences of the call syntax is unavoidable. Because the PHP modules are new, Perl legacy code was avoided in the PHP code.
LoxBerry::System vs. loxberry_system.php
Function | Description | Perl LoxBerry::System | PHP loxberry_system.php | More information |
---|---|---|---|---|
Plugin Global Variables | Global Variables for the path to Plugin directories | AVAILABLE | AVAILABLE | PHP: Globals and Constants |
System Global Variables | Global Variables for the system directories | AVAILABLE | AVAILABLE | |
get_miniservers | Reads the Miniserver list from general.cfg | AVAILABLE | AVAILABLE | |
get_miniserver_by_ip | Get Miniserver number by IP address | AVAILABLE | AVAILABLE | |
get_miniserver_by_name | Get Miniserver number by it's name | AVAILABLE | AVAILABLE | |
get_binaries | Get a hash of all system binaries | AVAILABLE | AVAILABLE | |
pluginversion | Return Plugin version of plugin database | AVAILABLE | AVAILABLE | |
plugindata | Returns plugin data for a specific plugin | AVAILABLE | AVAILABLE | |
get_plugins | Returns an array of all plugins | AVAILABLE | AVAILABLE | |
lbversion | Returns LoxBerry system version | AVAILABLE | AVAILABLE | |
get_ftpport | Returns the FTP port of Miniserver (incl. Cloud DNS) | AVAILABLE | AVAILABLE | |
get_localip | Returns the current IP address as string | AVAILABLE | AVAILABLE | |
lblanguage | Returns LoxBerrys language from GET, POST or system setting | AVAILABLE | AVAILABLE | |
readlanguage | Collects the translations and returns a hash/array | AVAILABLE | AVAILABLE | |
lbhostname | Returns current LoxBerry hostname | AVAILABLE | AVAILABLE | |
lbfriendlyname | Returns the user set friendlyname | AVAILABLE | AVAILABLE | |
lbwebserverport | Returns the Apache2 port of LoxBerry | AVAILABLE | AVAILABLE | |
is_enabled | Returns 1/True for fuzzy enabled strings | AVAILABLE | AVAILABLE | |
is_disabled | Returns 0/True for fuzzy disabled strings | AVAILABLE | AVAILABLE | |
trim | Trims blanks | AVAILABLE | AVAILABLE | PHP: System function |
ltrim | Trims left blanks | AVAILABLE | AVAILABLE | PHP: System function |
rtrim | Trims right blanks | AVAILABLE | AVAILABLE | PHP: System function |
begins_with | Returns true if one string begins with a other string | AVAILABLE | AVAILABLE | PHP: if(strpos($str, "http://") === 0) |
currtime | Returns the current time in different formats | AVAILABLE | AVAILABLE | |
check_securepin | Checks the submitted securepin against the database | AVAILABLE | N/A | |
reboot_requred | Sets the reboot required state with optional text. | AVAILABLE | AVAILABLE | |
diskspaceinfo | Returns diskspace infos for a specific path or all volumes | AVAILABLE | N/A | |
Usable for plugins | Features are supported to be used in Plugins | FULL | FULL | |
Usable for system widgets | System widgets are LoxBerrys own configuration "plugins", shown on the Settings page. | FULL | FULL |
LoxBerry::Web vs. loxberry_web.php
Function | Description | Perl LoxBerry::Web | PHP loxberry_web.php | More information |
---|---|---|---|---|
$lbpluginpage, $lbsystempage | Global vars to LoxBerry's index page | AVAILABLE | AVAILABLE | This should be used if your plugin links back to LoxBerry's Plugin overview |
lbheader | Prints the header template including help | AVAILABLE | AVAILABLE | |
lbfooter | Prints the footer template | AVAILABLE | AVAILABLE | |
head | Prints the template <head> including <body> start tag | AVAILABLE | AVAILABLE | |
pagestart | Prints the jQuery Mobile page start template including help | AVAILABLE | AVAILABLE | |
pageend | Prints the jQuery Mobile page end template | AVAILABLE | AVAILABLE | |
foot | Prints the template foot | AVAILABLE | AVAILABLE | |
get_plugin_icon | Returns the URI of the plugin icon in specified size | AVAILABLE | AVAILABLE | |
iso_languages | Returns all or only translated ISO 639-1 languages | AVAILABLE | N/A | PHP: As this feature is primary for LoxBerry-Core, no PHP feature is planned |
Navigation Bar (Perl) | Prints navigation on top of the page | AVAILABLE | AVAILABLE | |
Usable for plugins | Functions can be used in plugins | FULL | FULL | |
Usable for system widgets | System widgets are LoxBerrys own configuration "plugins", shown on the Settings page. | FULL | LIMITED | System help files currently not supported (untested). |
LoxBerry::Storage vs. loxberry_storage.php
Function | Description | Perl LoxBerry::Storage | PHP loxberry_storage.php | More information |
---|---|---|---|---|
get_netshares | Returns an array of all reachable Network Shares | AVAILABLE | N/A | Could be used to create a <select>-list with available network shares. |
get_netservers | Returns an array of all reachable Network Servers (which offers shares) | AVAILABLE | N/A | Core-function |
get_usbstorages | Returns an array of all conneted USB Storage devices | AVAILABLE | N/A | Could be used to create a <select>-list with available usb storage devices. |