From fc12ebadc8db34e39b18703148bab97340fb6f6a Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 9 Mar 2021 12:29:13 -0300 Subject: [PATCH] Grettings message for Dashboard --- bl-plugins/welcome/languages/en.json | 7 ++++ bl-plugins/welcome/metadata.json | 11 ++++++ bl-plugins/welcome/plugin.php | 53 ++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 bl-plugins/welcome/languages/en.json create mode 100644 bl-plugins/welcome/metadata.json create mode 100644 bl-plugins/welcome/plugin.php diff --git a/bl-plugins/welcome/languages/en.json b/bl-plugins/welcome/languages/en.json new file mode 100644 index 00000000..2c899ffb --- /dev/null +++ b/bl-plugins/welcome/languages/en.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Welcome", + "description": "Shows a greeting message in the dashboard." + } +} \ No newline at end of file diff --git a/bl-plugins/welcome/metadata.json b/bl-plugins/welcome/metadata.json new file mode 100644 index 00000000..c287c379 --- /dev/null +++ b/bl-plugins/welcome/metadata.json @@ -0,0 +1,11 @@ +{ + "author": "Bludit", + "email": "", + "website": "https://plugins.bludit.com", + "version": "4.0.0", + "releaseDate": "2021-03-02", + "license": "MIT", + "compatible": "4.0", + "type": "dashboard", + "notes": "" +} \ No newline at end of file diff --git a/bl-plugins/welcome/plugin.php b/bl-plugins/welcome/plugin.php new file mode 100644 index 00000000..d0d42543 --- /dev/null +++ b/bl-plugins/welcome/plugin.php @@ -0,0 +1,53 @@ +username(); + $user = new User($username); + $name = ''; + if ($user->nickname()) { + $name = $user->nickname(); + } elseif ($user->firstName()) { + $name = $user->firstName(); + } + + $labelGoodMorning = $L->g('good-morning'); + $labelGoodAfternoon = $L->g('good-afternoon'); + $labelGoodEvening = $L->g('good-evening'); + $labelGoodNight = $L->g('good-night'); + + return << +

Welcome

+ + + + EOF; + } + +} \ No newline at end of file