Zum Ende der Metadaten springen
Zum Anfang der Metadaten

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

FunctionDescriptionPerl LoxBerry::SystemPHP loxberry_system.phpMore information
Plugin Global VariablesGlobal Variables for the path to Plugin directories

AVAILABLE

AVAILABLE

PHP: Globals and Constants
System Global VariablesGlobal Variables for the system directories

AVAILABLE

AVAILABLE

 
get_miniserversReads the Miniserver list from general.cfg

AVAILABLE

AVAILABLE

 
get_miniserver_by_ipGet Miniserver number by IP address

AVAILABLE

AVAILABLE

 
get_miniserver_by_nameGet Miniserver number by it's name

AVAILABLE

AVAILABLE

 
get_binariesGet a hash of all system binaries

AVAILABLE

AVAILABLE

 
pluginversionReturn Plugin version of plugin database

AVAILABLE

AVAILABLE

 
plugindataReturns plugin data for a specific plugin

AVAILABLE

AVAILABLE

 
get_pluginsReturns an array of all plugins

AVAILABLE

AVAILABLE

 
lbversionReturns LoxBerry system version

AVAILABLE

AVAILABLE

 
get_ftpportReturns the FTP port of Miniserver (incl. Cloud DNS)

AVAILABLE

AVAILABLE

 
get_localipReturns the current IP address as string

AVAILABLE

AVAILABLE

 
lblanguageReturns LoxBerrys language from GET, POST or system setting

AVAILABLE

AVAILABLE

 
readlanguageCollects the translations and returns a hash/array

AVAILABLE

AVAILABLE

 
lbhostnameReturns current LoxBerry hostname

AVAILABLE

AVAILABLE

 
lbfriendlynameReturns the user set friendlyname

AVAILABLE

AVAILABLE

 
lbwebserverportReturns the Apache2 port of LoxBerry

AVAILABLE

AVAILABLE

 
is_enabledReturns 1/True for fuzzy enabled strings

AVAILABLE

AVAILABLE

 
is_disabledReturns 0/True for fuzzy disabled strings

AVAILABLE

AVAILABLE

 
trimTrims blanks

AVAILABLE

AVAILABLE

PHP: System function
ltrimTrims left blanks

AVAILABLE

AVAILABLE

PHP: System function
rtrimTrims right blanks

AVAILABLE

AVAILABLE

PHP: System function
begins_withReturns true if one string begins with a other string

AVAILABLE

AVAILABLE

PHP: if(strpos($str, "http://") === 0)
currtimeReturns the current time in different formats

AVAILABLE

AVAILABLE

 
check_securepinChecks the submitted securepin against the database

AVAILABLE

N/A

 
reboot_requredSets the reboot required state with optional text.

AVAILABLE

AVAILABLE

 
diskspaceinfoReturns diskspace infos for a specific path or all volumes

AVAILABLE

N/A

 
Usable for pluginsFeatures are supported to be used in Plugins

FULL

FULL

 
Usable for system widgetsSystem widgets are LoxBerrys own configuration "plugins", shown on the Settings page.

FULL

FULL

 

 

LoxBerry::Web vs. loxberry_web.php

FunctionDescriptionPerl LoxBerry::WebPHP loxberry_web.phpMore information
$lbpluginpage, $lbsystempageGlobal vars to LoxBerry's index page

AVAILABLE

AVAILABLE

This should be used if your plugin links back to LoxBerry's Plugin overview
lbheaderPrints the header template including help

AVAILABLE

AVAILABLE

 
lbfooterPrints the footer template

AVAILABLE

AVAILABLE

 
headPrints the template <head> including <body> start tag

AVAILABLE

AVAILABLE

 
pagestartPrints the jQuery Mobile page start template including help

AVAILABLE

AVAILABLE

 
pageendPrints the jQuery Mobile page end template

AVAILABLE

AVAILABLE

 
footPrints the template foot

AVAILABLE

AVAILABLE

 
get_plugin_iconReturns the URI of the plugin icon in specified size

AVAILABLE

AVAILABLE

 
iso_languagesReturns 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 pluginsFunctions can be used in plugins

FULL

FULL

 
Usable for system widgetsSystem 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

FunctionDescriptionPerl LoxBerry::StoragePHP loxberry_storage.phpMore information
get_netsharesReturns an array of all reachable Network SharesAVAILABLE


N/A

Could be used to create a <select>-list with available network shares.
get_netserversReturns an array of all reachable Network Servers (which offers shares)AVAILABLE


N/A


Core-function
get_usbstoragesReturns an array of all conneted USB Storage devicesAVAILABLE


N/A


 Could be used to create a <select>-list with available usb storage devices.
  • Keine Stichwörter