Alex Cabal
8f17f39e1b
Clean up some PD day code
2024-11-05 16:01:44 -06:00
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
6c8e819316
Implement OpenSearch feed search with FilterEbooks
2024-11-04 13:16:56 -06:00
Mike Colagrosso
807e8410b4
Use array shapes in the PHPDoc
...
This makes the extra documentation unnecessary
2024-11-04 13:16:56 -06:00
Mike Colagrosso
989dcab9f0
Implement FilterEbooks via DB
2024-11-04 13:16:56 -06:00
Mike Colagrosso
44dc65005d
Query Contributors table for GetEbooksByAuthor()
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
c85db527cf
Get ebook from DB for downloads
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
Alex Cabal
6af2717773
Fix broken Unix timestamp formatting
2024-06-25 10:51:48 -05:00
Alex Cabal
97821d0dc3
Remove last traces of date functions in favor of DateTimeImmutable
2024-06-13 13:11:42 -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
c4c8e7353f
Enable strict exception type hint checking in PHPStan and add exception type hints
2024-05-10 20:47:36 -05:00
Alex Cabal
8cc661015c
Add enum for view type and fix some type hints
2024-05-08 11:22:28 -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
7cf3148536
Add safe function
2024-03-16 13:39:36 -05:00
Alex Cabal
bb80fb206d
Remove dead code path
2024-03-16 13:39:03 -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
ff8cc6554d
Catch exception in download script
2024-02-28 09:04:05 -06:00
Alex Cabal
9437beaee9
Add thank-you page to ebook downloads
2024-02-26 13:34:44 -06:00
Mike Colagrosso
0ed064c8f0
Move single collection view to collections/get.php
2024-02-05 13:51:51 -06:00
Mike Colagrosso
d95d9b3349
Refactor Library::FilterEbooks and Template::SearchForm to accept EbookSort
2024-01-30 11:10:05 -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
8a82524de7
Change artwork list to grid view
2024-01-09 11:19:36 -06:00
Mike Colagrosso
6a5c05511a
Add cover art database
...
Co-authored-by: Job Curtis <job.curtis@gmail.com>
Co-authored-by: Alex Cabal <alex@standardebooks.org>
2024-01-03 19:14:04 -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
Mike Colagrosso
e2dd256edc
Add a /collections endpoint
2023-02-16 18:26:34 -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