diff --git a/lib/Constants.php b/lib/Constants.php index 361837bf..4456181f 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -98,6 +98,13 @@ define('PD_STRING', 'January 1, ' . (PD_YEAR + 1)); define('DONATION_HOLIDAY_ALERT_ON', time() > strtotime('November 15, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y'))); define('DONATION_ALERT_ON', DONATION_HOLIDAY_ALERT_ON || rand(1, 4) == 2); -define('DONATION_DRIVE_ON', false); -define('DONATION_DRIVE_COUNTER_ON', false); +// Controls the progress bar donation dialog +const DONATION_DRIVE_ON = false; +const DONATION_DRIVE_START = 'December 11, 2023 00:00:00 America/New_York'; +const DONATION_DRIVE_END = 'January 7, 2024 23:59:00 America/New_York'; + +// Controls the countdown donation dialog +const DONATION_DRIVE_COUNTER_ON = false; +const DONATION_DRIVE_COUNTER_START = 'May 2, 2022 00:00:00 America/New_York'; +const DONATION_DRIVE_COUNTER_END = 'May 8, 2022 23:59:00 America/New_York'; diff --git a/templates/DonationCounter.php b/templates/DonationCounter.php index bc325c52..9017e59b 100644 --- a/templates/DonationCounter.php +++ b/templates/DonationCounter.php @@ -1,7 +1,7 @@ format('F j'); $timeLeft = $now->diff($end); $timeString = ''; @@ -66,10 +68,10 @@ else{ } $stretchOn = false; -if($stretchTarget > 0 && $current >= $target){ +if($stretchTarget > 0 && $totalCurrent >= $baseTarget){ $stretchOn = true; - $totalCurrent = $current + $stretchCurrent; - $totalTarget = $target + $stretchTarget; + $stretchCurrent = $totalCurrent - $baseTarget; + $totalTarget = $baseTarget + $stretchTarget; } ?> @@ -83,14 +85,14 @@ if($stretchTarget > 0 && $current >= $target){
days > 5){ ?> -

Help us reach new patrons by

+

Help us reach new patrons by

-

left to help us reach new patrons!

+

left to help us reach new patrons!

-

Help us meet our stretch goal of new patrons by

+

Help us meet our stretch goal of
new patrons by

@@ -98,18 +100,18 @@ if($stretchTarget > 0 && $current >= $target){

0

/

-

+

- + -

When we started this drive, we set a goal of Patrons Circle members by . Thanks to the incredible generosity of literature lovers from all walks of life, we hit that goal in just over a week!

+

When we started this drive, we set a goal of Patrons Circle members by . Thanks to the incredible generosity of literature lovers from all walks of life, we hit that goal in just over a week!

Since there are still weeks left in our drive, we thought we’d challenge our readers to help us reach our stretch goal of patrons, so that we can start the year off on a rock-solid financial footing. Will you help us with a donation, and support free and unrestricted digital literature?

-

It takes a huge amount of resources and highly-skilled work to create and distribute each of our free ebooks, and we need your support to keep it up. That’s why we want to welcome new patrons by . It’s our patrons who keep us on the stable financial footing we need to continue producing and giving away beautiful ebooks.

+

It takes a huge amount of resources and highly-skilled work to create and distribute each of our free ebooks, and we need your support to keep it up. That’s why we want to welcome new patrons by . It’s our patrons who keep us on the stable financial footing we need to continue producing and giving away beautiful ebooks.

Will you become a patron, and support free and unrestricted digital literature?