From 63c705082f09554cd55ed1c09f8e5f40a6e6749b Mon Sep 17 00:00:00 2001 From: Chris Pinkham Date: Thu, 17 Jan 2019 22:06:12 -0800 Subject: [PATCH] Initial commit of plugin template. --- about.php | 17 +++++++++ content.php | 1 + help.php | 1 + menu.inc | 79 ++++++++++++++++++++++++++++++++++++++++ output.php | 1 + pluginInfo.json | 31 ++++++++++++++++ scripts/fpp_install.sh | 4 ++ scripts/fpp_uninstall.sh | 4 ++ scripts/postStart.sh | 4 ++ scripts/postStop.sh | 4 ++ scripts/preStart.sh | 4 ++ scripts/preStop.sh | 4 ++ status.php | 1 + 13 files changed, 155 insertions(+) create mode 100644 about.php create mode 100644 content.php create mode 100644 help.php create mode 100644 menu.inc create mode 100644 output.php create mode 100644 pluginInfo.json create mode 100755 scripts/fpp_install.sh create mode 100755 scripts/fpp_uninstall.sh create mode 100755 scripts/postStart.sh create mode 100755 scripts/postStop.sh create mode 100755 scripts/preStart.sh create mode 100755 scripts/preStop.sh create mode 100644 status.php diff --git a/about.php b/about.php new file mode 100644 index 0000000..174bece --- /dev/null +++ b/about.php @@ -0,0 +1,17 @@ +

+
+ Template Plugin Info +
+
+
+ Template Plugin Developed By:
+
+ John Doe (jdoe)
+
+ Git Repository
+ Bug Reporter
+
+
+
+
+
diff --git a/content.php b/content.php new file mode 100644 index 0000000..c81f1d6 --- /dev/null +++ b/content.php @@ -0,0 +1 @@ +Template Plugin Content Setup Page Placeholder diff --git a/help.php b/help.php new file mode 100644 index 0000000..bae27a5 --- /dev/null +++ b/help.php @@ -0,0 +1 @@ +Template Plugin Help Page Placeholder diff --git a/menu.inc b/menu.inc new file mode 100644 index 0000000..cd06fd8 --- /dev/null +++ b/menu.inc @@ -0,0 +1,79 @@ + 'Template - Status', + 'type' => 'status', + 'page' => 'status.php', + 'wrap' => 1 + ), +# Array( +# 'text' => 'Template - Content Setup', +# 'type' => 'content', +# 'page' => 'content.php', +# 'wrap' => 1 +# ), +# Array( +# 'text' => 'Template - Output', +# 'type' => 'output', +# 'page' => 'output.php', +# 'wrap' => 1 +# ), + Array( + 'text' => 'Template - Help', + 'type' => 'help', + 'page' => 'help.php', + 'wrap' => 1 + ), + Array( + 'text' => 'Template - Home', + 'type' => 'help', + 'page' => 'https://github.com/FalconChristmas/fpp-plugin-Template', + 'wrap' => 1 + ), + Array( + 'text' => 'Template - About', + 'type' => 'help', + 'page' => 'about.php', + 'wrap' => 1 + ) +); + +############################################################################## +# Display the menu entries for this plugin. +# +# It is expected that two variables are alread set: +# $plugin - contains the name of the current plugin directory/repoName +# $menu - contains the name of the menu section/type +foreach ($menuEntries as $entry) +{ + if ($entry['type'] != $menu) + continue; + + if (preg_match('/^http.?:\/\//', $entry['page'])) + { + printf("
  • %s
  • \n", + $entry['page'], $entry['text']); + } + else + { + $nopage = ''; + if (isset($entry['wrap']) && ($entry['wrap'] == 0)) + $nopage = '&nopage=1'; + + printf("
  • %s
  • \n", + $plugin, $entry['page'], $nopage, $entry['text']); + } +} +?> diff --git a/output.php b/output.php new file mode 100644 index 0000000..1ac4cb7 --- /dev/null +++ b/output.php @@ -0,0 +1 @@ +Template Plugin Outputs Page Placeholder diff --git a/pluginInfo.json b/pluginInfo.json new file mode 100644 index 0000000..e255c6c --- /dev/null +++ b/pluginInfo.json @@ -0,0 +1,31 @@ +{ + "repoName": "fpp-plugin-Template", + "name": "Template Plugin for FPP Plugin developers", + "author": "John Doe (jdoe)", + "description": "This template plugin is designed to make it easier for plugin authors to create new FPP Plugins. You can manually clone the git repository or install the Template Plugin and then go to the plugin's config page and use the form to copy the template into a new plugin directory.", + "homeURL": "https://github.com/FalconChristmas/fpp-plugin-Template", + "srcURL": "https://github.com/FalconChristmas/fpp-plugin-Template.git", + "bugURL": "https://github.com/FalconChristmas/fpp-plugin-Template/issues", + "versions": [ + { + "minFPPVersion": 2.0, + "maxFPPVersion": 0, + "branch": "master", + "sha": "" + } + ], + "dependencies": { + "plugins": [ + "fpp-plugin-CoolPlugin1", + "fpp-plugin-CoolPlugin2" + ], + "packages": [ + "system-package-name1", + "system-package-name2" + ], + "scripts": [ + "Control/script-repository-script1", + "PixelOverlay/script-repository-script2" + ] + } +} diff --git a/scripts/fpp_install.sh b/scripts/fpp_install.sh new file mode 100755 index 0000000..beb9b0b --- /dev/null +++ b/scripts/fpp_install.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# fpp-plugin-Template install script + diff --git a/scripts/fpp_uninstall.sh b/scripts/fpp_uninstall.sh new file mode 100755 index 0000000..b178eeb --- /dev/null +++ b/scripts/fpp_uninstall.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# fpp-plugin-Template uninstall script + diff --git a/scripts/postStart.sh b/scripts/postStart.sh new file mode 100755 index 0000000..c150a7f --- /dev/null +++ b/scripts/postStart.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "Running fpp-plugin-Template PostStart Script" + diff --git a/scripts/postStop.sh b/scripts/postStop.sh new file mode 100755 index 0000000..0471a84 --- /dev/null +++ b/scripts/postStop.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +#echo "Running fpp-plugin-Template PostStop Script" + diff --git a/scripts/preStart.sh b/scripts/preStart.sh new file mode 100755 index 0000000..4de7bca --- /dev/null +++ b/scripts/preStart.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "Running fpp-plugin-Template PreStart Script" + diff --git a/scripts/preStop.sh b/scripts/preStop.sh new file mode 100755 index 0000000..30f3ece --- /dev/null +++ b/scripts/preStop.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +#echo "Running fpp-plugin-Template PreStop Script" + diff --git a/status.php b/status.php new file mode 100644 index 0000000..7e0db48 --- /dev/null +++ b/status.php @@ -0,0 +1 @@ +Template Plugin Status Page Placeholder