From c8c8ae753d3b93d7f544e167461c3a6425999a24 Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 13 Oct 2021 23:21:53 +0200 Subject: [PATCH 1/3] Disable Discord/Email Credit Messages if not set This is a quick and dirty way I suppose? But it works and makes Companys that dont give away free servers not look that dumb --- app/Notifications/WelcomeMessage.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/app/Notifications/WelcomeMessage.php b/app/Notifications/WelcomeMessage.php index 6f30e032..380d7bd1 100644 --- a/app/Notifications/WelcomeMessage.php +++ b/app/Notifications/WelcomeMessage.php @@ -38,6 +38,8 @@ class WelcomeMessage extends Notification implements ShouldQueue return ['database']; } + + /** * Get the array representation of the notification. * @@ -46,12 +48,34 @@ class WelcomeMessage extends Notification implements ShouldQueue */ public function toArray($notifiable) { + function AdditionalLines() + { + $AdditionalLine = ""; + if(Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL') != 0) { + $AdditionalLine .= "Verifying your E-Mail Adress will grant you ".Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL')." additional Credits
"; + } + if(Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') != 0) { + $AdditionalLine .= "Verifying your Mail will also increase your Server Limit by " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . "
"; + } + $AdditionalLine .="
"; + if(Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') != 0) { + $AdditionalLine .= "You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits
"; + } + if(Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') != 0) { + $AdditionalLine .= "Verifying Discord will also increase your Server Limit by " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . "
"; + } + + return $AdditionalLine; + } + return [ 'title' => "Getting started!", 'content' => "

Hello {$this->user->name}, Welcome to our dashboard!

Verification
-

Please verify your email address to get " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL') . " extra credits and increase your server limit to " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . "
You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits and to increase your server limit again with " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . "

+

Please remember that you can verify your E-Mail Adress and Link/Verify your Discord-Account + ".AdditionalLines()." +

Information

This dashboard can be used to create and delete servers.
These servers can be used and managed on our pterodactyl panel.
If you have any questions, please join our Discord server and #create-a-ticket.

We hope you can enjoy this hosting experience and if you have any suggestions please let us know!

From 8b963f170cf12fb1a11b3be810ac1edab54b2048 Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 13 Oct 2021 23:26:18 +0200 Subject: [PATCH 2/3] Update WelcomeMessage.php --- app/Notifications/WelcomeMessage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Notifications/WelcomeMessage.php b/app/Notifications/WelcomeMessage.php index 380d7bd1..77255e66 100644 --- a/app/Notifications/WelcomeMessage.php +++ b/app/Notifications/WelcomeMessage.php @@ -67,13 +67,14 @@ class WelcomeMessage extends Notification implements ShouldQueue return $AdditionalLine; } - + return [ 'title' => "Getting started!", 'content' => "

Hello {$this->user->name}, Welcome to our dashboard!

Verification
-

Please remember that you can verify your E-Mail Adress and Link/Verify your Discord-Account +

Please remember that you can verify your E-Mail Adress and Link/Verify your Discord-Account

+

".AdditionalLines()."

Information
From 306536206b02e586ffe80254e8c19d8cab33be3e Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 13 Oct 2021 23:29:42 +0200 Subject: [PATCH 3/3] Update WelcomeMessage.php --- app/Notifications/WelcomeMessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Notifications/WelcomeMessage.php b/app/Notifications/WelcomeMessage.php index 77255e66..d6abaf70 100644 --- a/app/Notifications/WelcomeMessage.php +++ b/app/Notifications/WelcomeMessage.php @@ -57,7 +57,7 @@ class WelcomeMessage extends Notification implements ShouldQueue if(Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') != 0) { $AdditionalLine .= "Verifying your Mail will also increase your Server Limit by " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . "
"; } - $AdditionalLine .="
"; + $AdditionalLine .="
"; if(Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') != 0) { $AdditionalLine .= "You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits
"; }