$html = LBWeb::loglist_button_html( @params );
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.
This function is available starting with LoxBerry V1.2.1. If you use that function, set this minimum version in your plugin.cfg.
This function only works for logfiles created by the PHP LBLog or the LoxBerry::Log Perl module. It does not work for individual logfiles not created by these modules.
The function returns a string with HTML code that directly can be printed to your webpage.
Without parameter, it prints a button "List all logfiles" that opens a website which lists all logfiles of your plugin.
Using the NAME parameter, you can filter to specific Logfiles with the NAME log group. (e.g. if you created your log with 'name' =>'daemon').
To give parameters to the function, use an array with named parameters. To send an array, inside the brackets of the function parameters
loglist_button_html() open and close the array with square brackets
. See the examples below.
All parameter names are case-sensitive and written in capital letters.
NAME is the loggroup name used with LoxBerry::Log. If you have created a logfile with LoxBerry::Log::new( name => 'daemon'), use 'NAME' => 'daemon' to open the list filtered by name = daemon.
If you omit the NAME parameter, the list will show all logfiles of your plugin.
Package is not required in the case of a plugin. By default, this is (like with LoxBerry::Log) the $lbpplugindir-Variable.
Core-Developers have to use the PACKAGE parameter.
By default, LoxBerry labels the button with the language-specific "List all logfiles" phrase.
To change the default label, use the LABEL parameter.
|DATA_MINI||x||By default, the function uses the jQuery Mobile tag data-mini="true". To have the full-sized button, send 'DATA_MINI' => "0".|
|DATA_ICON||x||By default, the function uses LoxBerry's default icon from jQuery Mobile, "action" (data-icon="action"). To change the icon, send the icon name here.|
Returns a string that is the HTML code for the Loglist button. Simply echo the result of the function to your webpage.
Returns undef, if the call failed.