This module provides an integration point between Drupal7 and FlippingBook (http://flippingbook.com/). Flippingbook is a very used software to make digital publication from any document you have (.doc, .pdf...).
It includes a submodule "Flipping Book Reference" that provides a new field that references Flippingbooks inserted. You can add a flippingbook reference field to your fieldable entity (nodes, users, taxonomy,...) choosing the field widget you prefer and what kind of display you want of this field. Colorbox is just supported.
Available Field widget type
- Checkboxes
- Select list
- Textfield with autocomplete
Available Field Display formats
- Title with or without link to the flippingbook
- Flippingbook ID
- URL as plain text
- Colorbox link (you need colorbox module enabled and "colorbox_load" variable checked)
Manual Review of other projects
https://drupal.org/node/2209529#comment-8886771
https://drupal.org/node/2264953#comment-8886833
https://drupal.org/node/2281943#comment-8886881
Project Location
https://drupal.org/sandbox/bmeme/2190049
Repository
http://drupalcode.org/sandbox/bmeme/2190049.git
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/bmeme/2190049.git flipping_book
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | fb_product_guide_correct.zip | 8.42 MB | bmeme |
| #7 | Screen Shot 2014-06-09 at 11.41.10.png | 33.36 KB | bmeme |
| #6 | flipbook-review.png | 61.31 KB | jdvc |
| Screen Shot 2014-02-07 at 14.53.59.png | 22.51 KB | bmeme | |
| Screen Shot 2014-02-07 at 14.48.53.png | 55.42 KB | bmeme |
Comments
Comment #1
bmeme commentedComment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxbmeme2190049git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
bmeme commentedComment #4
bmeme commentedComment #5
bmeme commentedWe added a list of 3 contributions we've done on other projects.
We passed our module on "PAReview" software and fixed code errors. The remaining errors are false positives.
Waiting feedback :)
Comment #6
jdvc commentedYou should display the max upload size for the drupal installation on the flipping book upload form. Otherwise if a user tries to upload a flipping book larger than their post_max_size setting, the form fails silently. And it seems most of these flip books are pretty large?
Or configure a warning message if the flip book exceeds the Drupal sites max file upload size.
Second, could you provide an example of a flipping book zip file to test with? I'd rather not sign up for the flipping book site just to test this module... that could be why nobody has reviewed yet.
Other than that, the actual code looks pretty good.
Comment #7
bmeme commented- Displayed the max upload size for Drupal on the flipping book upload form (see my last screenshot attached to this issue)
- Uploaded an example of FlippingBook file. It was generated by the last version of FlippingBook Publisher (trial downloadable by http://flippingbook.com/). But the module can support all versions of published flippingbook.
By the way: I changed the folder tree of the module putting the flipping_book.module and the flipping_book_reference.module at the same folder level to avoid the "PDO Exception: Data too long [blablabla]" for filename column on drupal "system" table if you put this module in a very nested folder structure (ex: sites/all/modules/contrib/some/other/path/flipping_book/modules/flippingbook_reference).
Now it really rocks :)
Let me know.
Comment #8
klausiRemoving review bonus tag, you have not done any review of other project applications as requested on the review bonus page? It is nice that you contribute patches to other modules, but this program is about making progress with project applications. Feel free to review some and then add the review bonus again!
Comment #9
joachim commentedYour missing the git clone instructions on the project application.
Description should be a sentence in the present tense; also don't use 'Drupal' in the UI. Eg, 'Provides integration with yada yada'.
Having a package named after yourself seems weird.
That seems a bit of an unrelated dependency.
Would it not be possible to use the regular files table for these, specifying the type?
Administer and Manage are pretty much synonyms! How on earth is the poor admin user to know which permission means what?
This hook should go in a views.inc file to improve performance.
Not sure those docs are correct... ;)
Overall there seems to be good attention to detail, though I do wonder whether the whole project could be made much simpler if it used Drupal core's managed file table & possibly also file reference field.
Comment #10
bmeme commented- Modified .info removing packages and changing description:
- Changed permissions in this way:
But we maintained two different permissions to logically separate administration of the module, which is usually performed by a site-admin, and the action to add one or more flipping book file(s), which is usually provided by a site-editor.
- Moved hook_views_data into flipping_book.views.inc file
- Corrected docs errors.
- Leaved transliteration as dependency. Tranliteration is very useful to sanitize uploaded filename and we need all filenames do not show spaces or special characters, otherwise the module will not work as expected. We used in our module the "transliteration_clean_filename" method, contained in transliteration module. We obviously could "copy&paste" this method in our code, but I think this is absolutely NOT the best way
- Regarding the possible use of the Drupal tables "file_usage" and "file_managed" to storage of our flipping_book, we believe it is preferable to have a custom schema because the zipfile the user uploads is not what we need to manage, rather than its contents. Once you upload the zipfile and it is unpacked, the file no longer makes sense to be managed by the system. Therefore we preferred to separate this logic from the default files management in Drupal.
Comment #11
joachim commented> But we maintained two different permissions to logically separate administration of the module, which is usually performed by a site-admin, and the action to add one or more flipping book file(s), which is usually provided by a site-editor.
That makes sense. It's just the naming of the permissions that was confusing. Though:
That should be plural, surely?
> Leaved transliteration as dependency. Tranliteration is very useful to sanitize uploaded filename and we need all filenames do not show spaces or special characters, otherwise the module will not work as expected.
It's useful, but is it essential? If I don't already have Transliteration module on my site, I don't want to be forced to install it just for this.
> We obviously could "copy&paste" this method in our code, but I think this is absolutely NOT the best way
Agreed! However, you could consider having a so-called 'soft dependency'. That is, use module_exists() and call functions from Transliteration module if the module exists.
Comment #12
bmeme commentedComment #13
bmeme commentedComment #14
bmeme commentedComment #15
bmeme commentedComment #16
bmeme commentedComment #17
bmeme commentedAdded three (new) project reviews :)
Comment #18
bmeme commented- Done three new project reviews, and added again the issue tag "PAReview: review bonus" as suggested by klausi
- Removed transliteration as dependency, used a soft dependency instead and added a custom helper to clean the directory filename as suggested by joachim
- Changed permission label to accomplish plural: "Upload Flipping Books" as suggeste by joachim.
Comment #19
mpdonadioAutomated Review
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Look these through. I think some are false positives, eg the views class names. Nothing looked too problematic, though.
Manual Review
Update the README to say transliteration is optional.
Why is the dir part of the PK on the schema? The unique key is also redundant as PK needs to be unique by definition. Also don't
see why the dir needs to be a key, is it used as a query condition?
define('FLIPPING_BOOK_REFERENCE_COLORBOX', module_exists('colorbox') && variable_get('colorbox_load', FALSE));I don't know if either module_exists() or variable_get() is totally safe to use at the top level in all circumstances. I would turn this into
a proper variable via an admin form.
In the formatter view for 'flipping_book_reference_colorbox', pass the URL options via options instead of building yourself.
In _flipping_book_reference_options, is the html_entity_decode() to get around #1919338: Select widget (from the options module) prone to double encoding ?
Does flipping_book_reference_autocomplete() needs a drupal_exit()?
flipping_book_delete_confirm_submit() has a watchdog w/o an explicit level. I would set one.
flipping_book_management_form_submit() can use REQEUST_TIME instead of time().
User #attached instead of drupal_add_css() in flipping_book_management_form
flipping_book_delete() is missing the @return from the docblock
This is a very well written module with good use of comments that explain *why* something is being done and not just *what* is being done.
I also explicltly tested XSS in the titles and didn't get any alerts in the node view and the default view that is provided.
I see nothing to prevent RTBC here. As the module is fairly big, I am asking @heddn for a second look if he has time.
Comment #20
mpdonadioOK, now I can assign this to @heddn to take a look at this if he has time.
Comment #21
bmeme commented> Update the README to say transliteration is optional.
> flipping_book_delete_confirm_submit() has a watchdog w/o an explicit level. I would set one.
> flipping_book_management_form_submit() can use REQEUST_TIME instead of time().
> User #attached instead of drupal_add_css() in flipping_book_management_form
> flipping_book_delete() is missing the @return from the docblock
Done!
You can pull the latest commit to see these fixes.
Comment #22
bmeme commented>Why is the dir part of the PK on the schema? The unique key is also redundant as PK needs to be unique by definition. Also don't see why the dir needs to be a key, is it used as a query condition?
Yes, you're right, it doesn't need. Removed "dir" as PK.
>define('FLIPPING_BOOK_REFERENCE_COLORBOX', module_exists('colorbox') && variable_get('colorbox_load', FALSE)); I don't know if either module_exists() or variable_get() is totally safe to use at the top level in all circumstances. I would turn this into a proper variable via an admin form.
Removed. In spite of constant, we use directly the conditions into the if.
>In the formatter view for 'flipping_book_reference_colorbox', pass the URL options via options instead of building yourself.
Ok done.
> In _flipping_book_reference_options, is the html_entity_decode() to get around #1919338: Select widget (from the options module) prone to double encoding ?
We have to have a check. We were "inspired" by the code of node_reference to write this piece of code :)
> Does flipping_book_reference_autocomplete() needs a drupal_exit()?
Ok added
Pull again the latest commit :)
Comment #23
heddnAutomated Review
Location file [flipping_book] - .../views/views_handler_field_flipping_book_link.inc
Problem synopsis Unused parameter $values (at line 54)
Manual review
The starred items (+) are fairly big issues. The rest of the comments in the code walkthrough are recommendations.
None of these are release blockers. Thanks for your contribution, bmeme!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #24
bmeme commentedThanks to all.
We yet fixed these:
> (*) The exported view uses a non-English language.
> Should use decode_entities() rather than html_entity_decode() in _flipping_book_reference_options().