mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 01:22:23 -04:00
Schedule new patron drive
This commit is contained in:
parent
23a893f46b
commit
c4bff3f613
2 changed files with 14 additions and 4 deletions
|
@ -80,8 +80,8 @@ define('DONATION_ALERT_ON', DONATION_HOLIDAY_ALERT_ON || rand(1, 4) == 2);
|
|||
|
||||
// Controls the progress bar donation dialog
|
||||
const DONATION_DRIVE_ON = true;
|
||||
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';
|
||||
const DONATION_DRIVE_START = 'May 20, 2024 00:00:00 America/New_York';
|
||||
const DONATION_DRIVE_END = 'June 3, 2024 23:59:00 America/New_York';
|
||||
|
||||
// Controls the countdown donation dialog
|
||||
const DONATION_DRIVE_COUNTER_ON = false;
|
||||
|
|
|
@ -9,8 +9,18 @@ $baseTarget = 50;
|
|||
$stretchCurrent = 0;
|
||||
$stretchTarget = 20;
|
||||
|
||||
// Hide the alert if the user has closed it
|
||||
if(!DONATION_DRIVE_ON || ($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) || $GLOBALS['User'] !== null || $now > $end){
|
||||
// Hide the alert if...
|
||||
if(
|
||||
!DONATION_DRIVE_ON // The drive isn't running
|
||||
||
|
||||
($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) // If the user has hidden the box
|
||||
||
|
||||
$GLOBALS['User'] !== null // If a user is logged in
|
||||
||
|
||||
$start > $now // If the drive hasn't started yet
|
||||
||
|
||||
$now > $end // If the drive has ended
|
||||
){
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue