Commit graph

116 commits

Author SHA1 Message Date
Sébastien Lucas a6b52887ff Refactoring again 2014-01-08 16:54:11 +01:00
Sébastien Lucas 91aa062860 Big refactoring of the Json handling, I followed what I did from OPDS. It doesn't still feel right but I think it's better. 2014-01-07 21:22:35 +01:00
Sébastien Lucas 3f5dd74361 Begin to reorganize a little book.php. Still a mess. 2014-01-07 09:27:02 +01:00
Sébastien Lucas 9a15d0e1a4 Integrate a little better the typeahead search in the normal search page. Heavily based on At-Libitum work. re #34 2013-12-22 18:40:03 +01:00
Sébastien Lucas 7e8a1fefdb unused variable. re #34 2013-12-17 22:56:04 +01:00
Sébastien Lucas c71f443356 The ignored categories is now in the customize UI page. re #34
It's far from complete but it works. I'll have to check the strings consistancy.
2013-12-17 22:45:51 +01:00
Sébastien Lucas 19dcd73585 Rename the ignored parameter. re #34 2013-12-17 20:56:41 +01:00
Sébastien Lucas 6cc0d5b1bc The multidatabase search is now the same as the normal autocomplete search. re #34 2013-12-16 21:27:04 +01:00
Sébastien Lucas 30ae05c595 Minor refactoring. re #127 2013-12-15 14:25:57 +01:00
Sébastien Lucas 27c7743995 Fix the thumbnail generation in case the same width is asked and a some unit test. re #127 2013-12-15 14:23:45 +01:00
Sébastien Lucas b0660b0814 Factorize the thumbnail generation and move it to the class Book. re #127 2013-12-14 21:49:55 +01:00
Sébastien Lucas cd626b25ef Factorize a little more the DB handling. re #127 2013-12-14 18:25:32 +01:00
Sébastien Lucas a1cb83eea9 Refactor the detection of the case when no database has been selected. re #127 2013-12-14 11:30:42 +01:00
Sébastien Lucas 8a3cc9ed5c Properly use constants. re #127 2013-12-14 10:59:22 +01:00
Sébastien Lucas 2a20fa688e Typo. re #123 2013-12-09 09:16:37 +01:00
Sébastien Lucas 7ba85d150b Add a new config item to ignore a category in search. Simplify the queries. re #123 2013-12-08 21:01:17 +01:00
At-Libitum 79c2c431cc publisher category did not get included in regular search.
added publisher "exists (select ..." as 4th or branch to SQL_BOOKS_QUERY

added argument placeholder as 4th to the various calls to getBooksByQuery.

re #123
2013-12-08 15:43:23 +01:00
Sébastien Lucas 002c7596ea Changing the number of book per pages changed the search with multiple database. Reported by At-Libitum. fix #124 2013-12-07 21:17:38 +01:00
Sébastien Lucas 0f09ef5f8c Remove trailing spaces 2013-12-05 10:52:51 +01:00
At-Libitum f87963ea8a Merge git://github.com/seblucas/cops
Conflicts:
	test/pageTest.php - RESOLVED
2013-12-02 14:53:10 +01:00
At-Libitum d540cba22a renamed constant and removed some accidental tabs. 2013-11-30 16:21:52 +01:00
Sébastien Lucas 56647a44eb Change the link name for ebook download to be the book format (instead of download). Proposed by At Libitum. fix #119 2013-11-30 15:36:49 +01:00
At-Libitum 9efcd661a0 **2012-11-22**
**Added global support for publishers**

Files modified:

*base.php*

-   changed class Entry,

	-   adding a constant ```cops:publishers``` to the icon array for the feed.

-   changed class Page

	-   added branches to the page selector switch

-   changed Page->public function InitializeContent

	-   added call to pull publisher count from database

-   changed class PageAllBooks

	-   changed it so ```getCurrentOption``` is actually used...

-   added page descendant class ```PageAllPublishers```

	-   handles pulling the publishers category from database

-   added page descendant class ```PagePublisherDetail```

	-   handles pulling the books per publisher data from database

-   changed class PageQueryResult

	-   added constant and switches for publisher search scope

-   abstract class Base

	-   added constants for the publisher pages

*book.php*

-   added require statement for publisher.php
-   added ```SQL_BOOKS_BY_PUBLISHER``` query to retrieve books by publisher.

-   changed class Book

	-   added query constant
	-   added publisher item
	-   added test in case no known publisher
	-   added publishername and url array elements for the JSON output
	-   added public function ```getPublisher```
	-   added public static function ```getBooksByPublisher``` to fire the query

-   changed function getJson

	-   added publisher category to search
	-   added publishername (single) and publishertitle(plural) localization entries to i18n translation array

*index.php*

-   added require statement for publisher.php

*lang/Localization_en.json

-   added new localization entries for publisher labels (see below)
```
"publisher.alphabetical.many":"Alphabetical index of the {0} publishers",
"publisher.alphabetical.none":"Alphabetical index of absolutely no publisher",
"publisher.alphabetical.one":"Alphabetical index of the single publisher",
"publisher.name":"Publisher",
"publisher.title":"Publishers",
"publisherword.many":"{0} publishers",
"publisherword.none":"No publisher",
"publisherword.one":"1 publisher",

"search.result.publisher":"Search result for *{0}* in publishers",
```

*templates\bookdetail.html*

-   added publisher label and item to bookdetail popup

*test\bookTest.php*

-   added indices and names of publishers added to testdatabase as comment
-   added test function ```testGetBooksByPublisher```
-   changed test function testGetBookById to add assertion for publisher name
-   changed test function testTypeaheadSearch to add search on partial publisher name.

*test\pageTest.php*

-   changed test function testPageIndex to insert publisher category and adjust page indices
-   changed test function testPageIndexWithCustomColum to adjust for the changed page indices
-   added test function testPageAllPublishers
-   added test function testPagePublishersDetail
-   added test function testPageSearchScopePublishers

*test\BaseWithSomeBooks\metadata.db*

-   added 5 publishers spread across all 14 books, replacing the original publisher Feedbooks

Files added:

*publisher.php*
2013-11-22 22:08:09 +01:00
Sébastien Lucas 26f5b36563 Don't work on php 5.3. 2013-11-22 15:42:50 +01:00
Sébastien Lucas 76d739b1f6 Fix some warnings. 2013-11-22 15:33:22 +01:00
Sébastien Lucas 185c59ce15 Fix some warnings and errors caused by the previous commit. re #34 2013-11-22 15:22:03 +01:00
Sébastien Lucas 58c48a71a8 Handle better search of multiple databases at once. Optimize a little typeahead search. re #34 2013-11-22 14:41:56 +01:00
At-Libitum 8db9489e07 Added support for optional flat-list display of "All Books"
Files modified:

config_default.php

base.php

changed class PageAllBooks to test for configuration option "cops_titles_split_first_letter".
Used getCurrentOption to prepare for making Split Letter options configurable in web GUI

book.php

added SQL_BOOKS_ALL query to have a flat-list datasource not grouped by first letter.
added const SQL_BOOKS_ALL to class Book
added public static function "getBooks", called from Base::PageAllBooks to retrieve the flat-list
2013-11-08 17:53:11 +01:00
Sébastien Lucas fa5ec6cb58 Fix the ids in OPDS feed to produce a valid feed. fix #104 2013-10-25 07:59:27 +02:00
Sébastien Lucas 1e51f11c6d Send the header only once .... not proud about it. re #34 2013-10-13 22:00:35 +02:00
Sébastien Lucas 3e98615ea9 Cleanly handle suggestion title. re #34 2013-10-06 18:58:16 +02:00
Sébastien Lucas 877940a651 Clean the new search. re #34 2013-09-28 21:00:25 +02:00
Sébastien Lucas b39cbeebc8 Prepare new search. re #34 2013-09-28 20:58:50 +02:00
Sébastien Lucas 3943205b58 Change the search to look into tags and series (in addition to book title and author).
re #34, #47, #78
2013-09-27 17:13:31 +02:00
Sébastien Lucas 18decb3cc1 Localize a missing string (cog alternate text). re #37 2013-09-17 16:30:19 +02:00
Sébastien Lucas bf0bb3170d Handle when $config['cops_recentbooks_limit'] is <= 0. fix #94 2013-09-13 09:54:19 +02:00
Sébastien Lucas 5a87d62ee8 Fix JS problem on IE < 9.0. fix #89 2013-09-06 09:18:41 +02:00
Sébastien Lucas 9d117220c4 Handle better when server side rendering is enabled. re #82 2013-09-05 08:41:40 +02:00
Sébastien Lucas c96a0bfbcf Add the version in the about box. fix #86 2013-08-27 10:02:56 +02:00
Sébastien Lucas 13b16163d3 Add several ways to handle thumbnails. re #5 2013-08-26 21:15:54 +02:00
Sébastien Lucas 7e5841e265 Prepare for serverside rendering. 2013-08-20 15:50:03 +02:00
Sébastien Lucas 784a39e957 Add again the series Index in the book list. Reported by fatzgenfatz 2013-07-29 14:19:20 +02:00
Sébastien Lucas c84cec9516 Fix language if it is not found in the i18n. Reported by le_ 2013-07-29 10:10:54 +02:00
Sébastien Lucas 3ca1d1d3df Cleanly fix the problems with line feed 2013-07-22 14:29:32 +02:00
Sébastien Lucas f5b9492e06 Remove all new lines after the end of PHP files. Fix a bug causing corrupt images with Wheezy. fix #81 2013-07-20 13:35:51 +02:00
Sébastien Lucas f408a71f80 Properly test if the file requested (cover or book) exists and send a 404 if it doesn't. Should fix #70 2013-07-07 10:15:49 +02:00
Sébastien Lucas e840d4cf70 Change the way images are shown. re #77
Jpeg quality is lowered but resolution is two times higher.
The image is then reduced with CSS.
The default value is changed.
2013-07-04 22:37:27 +02:00
Sébastien Lucas d3ce31c6be Move from Xhtml to Html. re #73 2013-06-25 08:40:08 +02:00
Sébastien Lucas e833172e99 Add emailing. re #53 2013-06-21 21:31:49 +02:00
Sébastien Lucas aa376d63b2 simplify again. re #73 2013-06-17 22:30:09 +02:00