Metainformationen zur Seite
LBSystem::get_plugins
$pluginarray = LBSystem::get_plugins();
Returns an array with all installed plugins, including version information and icon uri.
This table describes the keys to read from plugin database, and the log level of the LB module functions LoxBerry::System::get_plugins and LoxBerry::System::plugindata (Perl), and LBSystem::get_plugins and LBSystem::plugindata (PHP).The parameters of each plugin can be read with the following keys:
Hash-Variable pro Array-Zeile | Inhalt | DB-Spalte |
PLUGINDB_NO | Plugin Number | |
PLUGINDB_MD5_CHECKSUM | The MD5 Hash generated of Author and E-Mail | 0 |
PLUGINDB_AUTHOR_NAME | The Plugin author name | 1 |
PLUGINDB_AUTHOR_EMAIL | The authors email address | 2 |
PLUGINDB_VERSION | The version of the plugin | 3 |
PLUGINDB_NAME | The short name of your plugin | 4 |
PLUGINDB_FOLDER | The installation folder of your plugin. Usually it is equal to NAME, but on uniqueness problems, it will be different | 5 |
PLUGINDB_TITLE | The common title of your plugin | 6 |
PLUGINDB_INTERFACE | This is the interface version of the plugin interface (currently 1.0 or 2.0) | 7 |
PLUGINDB_AUTOUPDATE | 0 … Plugin does not provide automatic updates 1 … Updates disabled 2 … Notify about Updates 3 … Automatic Updates to release versions 4 … Automatic Updates to prerelease versions | 8 |
PLUGINDB_RELEASECFG | URL to the plugin's Release Config file. This file contains the new version and the download url for the ZIP archive for new releases. Used in conjunction with AutoUpdate (see above) | 9 |
PLUGINDB_PRERELEASECFG | URL to the plugin's Pre-Release Config file. This file contains the new version and the download url for the ZIP archive for new prereleases. Used in conjunction with AutoUpdate (see above) | 10 |
PLUGINDB_LOGLEVEL | Log Level 0-7 (Tabelle siehe unten) If set to -1, this indicates PLUGINDB_LOGLEVELS_ENABLED = 0 | 11 |
PLUGINDB_LOGLEVELS_ENABLED | 0 … Plugin does not use the loglevel setting from the user in plugin management 1 … Plugin uses the loglevel setting from plugin management | |
PLUGINDB_ICONURI | This is the calulated http URI of the plugin icon (e.g. for <img>). This is not a local filesystem path, but a webserver path | |
PLUGINDB_COMMENT | Only set if the line is a comment from plugindb |
Log Levels
The Log Levels are leant on the syslog log levels:
Level | Name | Shortcut | Use when |
0 | Emergency | LOGEMERGE | … your LoxBerry burns |
1 | Alert | LOGALERT | … if the critical information also needs to be pushed to the user |
2 | Critical | LOGCRIT | … when user intervention is needed to continue operation |
3 | Error → Default value | LOGERR | … when an error occurs but |
4 | Warning | LOGWARN | … when something is strange but does not stop operation |
5 | Notice | LOGOK | … is to inform the user that something went ok |
6 | Informational | LOGINF | … additional infos to any status |
7 | Debug | LOGDEB | … for heavy debugging that a user normally don't need. |
If a user select Level 3 (Error), he get's all messages from severity 0 to severity 3. If the user selects 5, he will get everything from 0 to 5.
Usage
require_once "loxberry_system.php"; $plugins = LBSystem::get_plugins(); foreach($plugins as $plugin) { echo "Nr. {$plugin['PLUGINDB_NO']}: {$plugin['PLUGINDB_TITLE']} version {$plugin['PLUGINDB_VERSION']} Icon-URI: {$plugin['PLUGINDB_ICONURI']}\n"; }