Commit graph

105 commits

Author SHA1 Message Date
Alex Cabal
163ada3b09 Add placeholders for public domain day ebooks 2024-11-04 21:17:09 -06:00
Alex Cabal
60f0ea16cb Formatting tweaks 2024-11-04 13:31:17 -06:00
Mike Colagrosso
9a4da8f961 Fix PHPStan errors for CollectionType enum
Use the `value` property of PHP enums to get the underlying string for functions that expect a string.

Followup to #392
2024-11-04 13:16:56 -06:00
Mike Colagrosso
2d5e66f2f2 Get carousel books from the DB 2024-11-04 13:16:56 -06:00
Mike Colagrosso
ee29c526f8 Add a CollectionMembership class 2024-11-04 13:16:56 -06:00
Mike Colagrosso
415faeb19d Remove unused import that should have been in #371 2024-11-04 13:16:56 -06:00
Mike Colagrosso
1fd3688621 Use Ebook::GetByIdentifier() to read ebooks 2024-11-04 13:16:56 -06:00
Mike Colagrosso
b176a68d4d Replace TextSinglePageSizeNumber and TextSinglePageSizeUnit with TextSinglePageSizeFormatted 2024-11-04 13:16:56 -06:00
Mike Colagrosso
2098b265a8 Rename the constructor Ebook::__construct() to static Ebook::FromFilesystem()
Also added `GetFoo()` methods for all the derived properties like `GetUrl()`, `GetHasDownloads()`, etc. Removed that logic from the constructor so that it's reusable in `Ebook::FromFilesystem()` and `Ebook::GetByIdentifier()`
2024-11-04 13:16:56 -06:00
Mike Colagrosso
f605a4df60 Rename Created and Updated in PHP code to EbookCreated and EbookUpdated to match the schema 2024-11-04 13:16:56 -06:00
Mike Colagrosso
41b130195f Change size checks (like bigger than 3 MB) to use TextSinglePageByteCount, not number and units 2024-11-04 13:16:56 -06:00
Alex Cabal
19cf14c1aa Add automatic donation drives 2024-10-17 11:58:25 -05:00
Alex Cabal
eec79712fc Use a NOW constant instead of new DateTimeImmutable objects, and tweak how some donation drive dates work 2024-10-15 22:21:12 -05:00
Mike Colagrosso
008ffc8ccd Fix PHPStan errors 2024-06-29 15:27:30 -05:00
Robin Whittleton
60300807f4 Speed up reading of “More books” links
The links are fine on their own, don’t need to be announced as the covers.
2024-05-30 21:35:12 -05:00
Alex Cabal
a9eab552ab Flesh out some PHPDocs, and consistently name enums 2024-05-14 15:40:56 -05:00
Alex Cabal
70ae877dd8 Bump PHPStan check level to max and add final round of type hints 2024-05-13 10:48:05 -05:00
Alex Cabal
110c091a7b Define some constants to make HTTP input code less wordy 2024-05-12 12:29:30 -05:00
Alex Cabal
ee7c8343dd Convert some constants to enums 2024-05-11 21:51:06 -05:00
Alex Cabal
7c8463d297 Add <link rel="canonical"> to some pages 2024-05-08 11:01:18 -05:00
Alex Cabal
e55fecaaa2 Switch from DateTime to DateTimeImmutable across codebase 2024-04-13 14:05:14 -05:00
Alex Cabal
835ea7c767 Add note explaining Kindle epub 'support' to download page 2024-03-19 13:48:16 -05:00
Alex Cabal
1adc1dfe1e Add @nofollow attribute to ebook download links to prevent crawlers 2024-03-12 11:36:09 -05:00
Alex Cabal
9437beaee9 Add thank-you page to ebook downloads 2024-02-26 13:34:44 -06:00
Mike Colagrosso
09b4385100 Convert SOURCE_ constants to an enum 2024-01-30 11:10:05 -06:00
Alex Cabal
ca3fc6dbfd Refactor HttpInput::Str and rename some exceptions for consistency 2024-01-18 11:21:05 -06:00
Alex Cabal
f7ff76bf7d Rename some Formatter functions for clarity 2024-01-17 16:04:30 -06:00
Alex Cabal
042816cf45 Use auto_prepend_file INI directive to prepend Core.php to all web requests automatically 2023-07-15 15:17:20 -05:00
Alex Cabal
8127f0c7e2 Remove unused exception variables, now that this is possible with PHP8 2023-06-06 21:00:12 -05:00
Alex Cabal
10f4cc1418 Tweak non-US-PD warning before ebook downloads 2023-03-10 14:52:06 -06:00
Alex Cabal
04759aa17b Add size warning when single-page download is larger than 1MB 2023-01-13 16:42:57 -06:00
Alex Cabal
7c2de0ed5c Fix bug where More Details section was not apearing in ebook detail page when there is no Wikipedia URL 2022-11-15 10:36:32 -06:00
Alex Cabal
98850bd475 Fix possible infinite loop when building ebook carousel 2022-07-28 13:51:35 -05:00
Alex Cabal
7f50f00b42 work 2022-07-10 00:55:24 -05:00
Alex Cabal
011cd747f1 Convert newsletter to use Users table as base 2022-07-04 12:09:49 -05:00
Alex Cabal
6c8414f844 Update PropertiesBase to new patterns and improve static analysis checks 2022-06-30 13:23:05 -05:00
Alex Cabal
c2cf6ef455 Change 'modified' property to 'updated' for consistency 2022-06-29 18:55:51 -05:00
Alex Cabal
dbefba6b94 Change 'timestamp' properties on objects to more descriptive names 2022-06-29 17:19:28 -05:00
Alex Cabal
70a80d0e02 Add system to retrieve and manage donations in a local database 2022-06-20 14:05:27 -05:00
Alex Cabal
ed4ef9c646 On ebook detail page, split 'more details' section into 'more details' and 'sources' 2022-06-15 16:45:01 -05:00
Alex Cabal
173386dddf Define variable 2022-05-10 11:25:45 -05:00
Alex Cabal
e5c2e0d5fc Add grant giveaway donation dialog 2022-05-09 15:45:31 -05:00
Alex Cabal
5985939cd5 Make 'more ebooks' carousel in ebook detail page show ebooks from a random tag of the current ebook 2022-04-30 13:19:02 -05:00
Alex Cabal
b0197d189a Add newsletter management functionality 2022-03-20 17:46:47 -05:00
Alex Cabal
bf2f5e10c3 Add Kobo FAQ 2022-03-13 21:50:40 -04:00
Alex Cabal
bbe89b0baf Add donation drive scaffolding 2022-02-15 20:43:19 -06:00
Alex Cabal
24b8c6ca54 Refine 3D book structure/CSS 2022-01-23 16:04:03 -06:00
Alex Cabal
864d6836d3 Add 3D book figure to ebook download pages 2022-01-23 12:09:47 -06:00
Alex Cabal
3c2819081d Better exception matching 2022-01-08 19:59:33 -06:00
Alex Cabal
f7d6ff2c09 Tweak wording in 'improve this ebook' block 2021-12-18 13:24:23 -06:00