Adding FPP Menu Entries
We allow menu entries into each of the top-level menus. These are drawn in the UI menus if your plugin incorporates a specially named file for each menu entry. To include something in the "Status/Control" menu, you must include a file named "status_menu.inc". The contents of this file should be a list element and link with text. The menu styling will happen automatically as it will be included within the proper menu's unordered list.
|Status/Control||Content Setup||Output Setup||Help|
- You're writing a plugin called "RDS Plugin"
- Your plugin's repository name is "rds_plugin" (passed to plugin.php's "plugin" parameter)
- You want a menu entry titled "RDS Setup" under "Output Setup" that will link to your plugin's "rds_setup.php" page for configuration
<li><a href="plugin.php?plugin=rds_plugin&page=rds_setup.php">RDS Setup</a></li>
Of course, you must have a file named "rds_setup.php" in your plugin as well, so that when you click the menu entry, your page is drawn.
Adding FPP Plugin Pages
You can write pages that will be drawn using plugin.php. The main page takes care of the main UI details such as the menu entries, session support, header, footer, etc. Your page will only need to include the content within the "bodyWrapper" div of the main FPP UI layout.
To access your page you must use plugin.php and include at least two GET variables.
- plugin - This is the directory name of your plugin. It will be the same as the name of your git repository.
- page - The name of the page within your plugin directory to be included.
The daemon supports callbacks during execution. These are useful to get data from the daemon without having to query the FPPD socket or running your own daemon to parse certain details.