mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 12:26:39 -04:00
Show donation alert 25% of the time on ebook detail pages
This commit is contained in:
parent
153de5d450
commit
faad55ed1f
5 changed files with 20 additions and 9 deletions
|
@ -36,9 +36,10 @@ const SOURCE_FADED_PAGE = 9;
|
|||
const AVERAGE_READING_WORDS_PER_MINUTE = 275;
|
||||
|
||||
define('PD_YEAR', intval(gmdate('Y')) - 96);
|
||||
const DONATION_ALERT_ALWAYS_ON = false;
|
||||
const DONATION_ALERT_ON_DURING_HOLIDAYS = true;
|
||||
define('DONATION_ALERT_ON', DONATION_ALERT_ALWAYS_ON | (DONATION_ALERT_ON_DURING_HOLIDAYS && (time() > strtotime('December 1, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y')))));
|
||||
|
||||
define('DONATION_HOLIDAY_ALERT_ON', time() > strtotime('December 1, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y')));
|
||||
define('DONATION_ALERT_ON', rand(1, 4) == 2);
|
||||
|
||||
// No trailing slash on any of the below constants.
|
||||
const SITE_URL = 'https://standardebooks.org';
|
||||
const SITE_ROOT = '/standardebooks.org';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue