loxberry_web.php is intended to use with and generate to the plugin webinterface.
loxberry_web.php automatically loads loxberry_system.php, so it is not needed to give both libs.
It's not required to add a path to the PHP library.
|Returns the library version of loxberry_web.php|
|LBWeb::$lbpluginpage||Returns the absolute URI (w/o host) to the LoxBerry Plugin overview page. Use this link if you provide any "Back" links to the main menu. This is not a local path but an URI.|
|LBWeb::$lbsystempage||Returns the absolute URI (w/o host) to the LoxBerry Settings overview page. This is not a local path but an URI.|
Most functions are in the class
LBWeb, therefore they need to be called with
LBWeb::function(). Some functions are in the main namespace and therefore don't require the
LBWeb prefix. The title of every function in this documentation and the examples shows how to call it.
Most function names and features are identical to the Perl sibling LoxBerry::Web with PHP adjusted syntax. The PHP module also introduces a LoxBerry-own, minimalistic template feature that is used to parse the Perl HTML::Template templates for header and footer (and it is awesome fast against it's Perl brother!). You won't see much of this feature, but it can be used also for own templates.
See the examples to start using loxberry_web.php
Returns HTML code for a logfile button. This function accepts parameters from LBLog / LoxBerry::Log to open the lastest logfile, and also directly a logfile name.
Returns ready HTML code for the plugin loglevel dropdown list. The loglevel setting of the html is saved in the LoxBerry plugin database, therefore this is the same selection as in the plugin management and Log Manager.
Returns HTML code for a button to a list of logfiles. This function accepts parameters from LBLog / LoxBerry::Log to show all logfiles of your plugin, and also can filter to a log group name with the NAME parameter.
Returns HTML of the logfile list to directly show the overview of your logfiles in your plugin. It is thought to show the list on navigating a Logfiles tab ($navbar), but you can integrate the HTML where you like.
Returns the URL to a webpage showing a list of your plugins logfiles. This function accepts parameters from LBLog / LoxBerry::Log to show all logfiles of your plugin, and also can filter to a log group name with the NAME parameter.
Returns ready HTML code for a Miniserver dropdown list. You can pre-select the current configured Miniserver from a config file.
Using the PHP functions LBWeb::header or LBWeb::pagestart, it is possible to add a customized navigation bar to your plugin. The navigration bar can be used for internal and external links, and also can show notification bullets. With the navigation bar it is very easy to split up settings to multiple pages.