This is my first attempt at getting involved in some project development, so bear with me if I get it wrong. Note especially that I set this issue up as a task assigned to me; please correct me if I have misdone.
In http://drupal.org/node/217909, the request for a Drupal 6 version of this module morphed into a discussion about how BR should be restructured in the newest Drupal. The upshot is a request to put together a BR schema and see how the older version would map into the new. This D6 version might see implementation in CCK and Views.
My immediate thought with regard to a schema for this module is that there are two entities rolled into this module: the review itself, and the object that is being reviewed. I am making this pedestrian observation because if these two entities are separated in the module, it would make a number of scenarios possible.
- First, it would be easier to add review functions to other objects than books.
- Second, it would make the review definition itself much more simple.
- Third, it would make it possible to add multiple reviews to the same item.
Taking this approach for the module as it is, we end up with:
CREATE TABLE review (
nid int(10) unsigned NOT NULL,
objid int(10) unsigned NOT NULL,
rating int(1) NOT NULL default 0,
synopsis text,
contents text,
review text,
...
);
Then, for the book itself:
CREATE TABLE bookreview_books (
nid int(10) unsigned NOT NULL,
booktitle varchar(255) NOT NULL default '',
cover varchar(255) NOT NULL default '',
publisher varchar(255) NOT NULL default '',
copyright varchar(255) NOT NULL default 0,
isbn varchar(255) NOT NULL default '',
price varchar(255) NOT NULL default '',
pages varchar(255) NOT NULL default 0,
...
);
[As a professional librarian, I wonder whether this is the best dataset to capture for books, but I will set this aside for the time being.]
There will still be a need for an 'authors' table:
CREATE TABLE bookreview_creators (
cid int(10) unsigned NOT NULL auto_increment,
nid int(10) unsigned NOT NULL,
creator varchar(255) NOT NULL default '',
weight tinyint DEFAULT '0',
...
);
The details about linking these entities is beyond my ability; I have incredible faith in others to make it happen!
David
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | screenshot-book-review.png | 641.87 KB | Fanaile |
| #32 | bothmybibs.zip | 30.17 KB | sunfish62 |
| #30 | bibauth-6.x.2-alpha.tar.gz | 70 KB | sunfish62 |
| #30 | bibinfo-6.x.2-alpha.tar.gz | 70 KB | sunfish62 |
| #26 | bibinfo-6.x.0-alpha.tar_.gz | 70 KB | sunfish62 |
Comments
Comment #1
sunfish62 commentedOkay. I have created the three CCK Types above, but I am not convinced I am barking up the right tree. I attach a zip file with exports of the three types. I am aware that this is not much, but honestly, I do not really know what I am doing. For example, I do not like that I have to enter the different pieces (Authors, Books and Reviews) in that particular order, separately. I would like to be able to select an existing book (if it's there), but add a new book (and its authors) on the fly. I checked out Addnode to allow this, but it is not D6 compatible yet.
So, in the absence of input from the community, I will continue to muddle this along. If ANYONE has suggestions for me, by all means, give them to me!
David
Comment #2
smscotten commentedSunfish, thanks for this! Your musing about whether it's the best dataset is something I'd like to hear more about. Someone in another thread, for example, claims to use the body and review fields for different purposes. I'd like to evaluate and incorporate any of this kind of feedback now rather than going back and changing things later.
I think the idea of creating a generalized review type that can be recustomized by things other than books is excellent. We'll be splitting the project into two separate projects to do that; I'll look into what we need to do to make that happen. It also would allow us to focus on the core and get something more fundamental delivered.
Comment #3
smscotten commentedJust to mention some prior art so that we don't needlessly reinvent any wheels, there is http://drupal.org/project/marc which purports to import the standard format for bilbliographic records for libraries.
There is a movie review module for d4. A generalized review type would be helpful for anyone "left behind" by that module.
Also, lets (meaning I will but encourage you too as well) take a look at the existing Review module http://drupal.org/project/review . If that can be the foundation for the book review, that would be perfect. Looks like the Review module doesn't have a d6 version either, so we'd get to kill a couple of birds with one stone.
Comment #4
sunfish62 commentedNice to see someone using the standard, yes.
Personally, though, I find the MARC formats to be a cumbersome dataset with enough detail to describe anything, if you can navigate the thousands of pages of documentation. Having built local databases using the MARC formats as a basis, I can vouch for their exhaustive nature. Having the level of detail that the MARC formats include will undoubtedly overwhelm the average Drupal book reviewer, nor do I see (looking at the MARC Drupal project) how the average user will obtain MARC records to populate their site. I will look at that project with more vigor shortly, though, because I *know* that it would be easier if I could just steal from them! I have contacted the project maintainer to see what's up.
Another approach altogether would be to figure out some way to extract appropriate metadata from remote sites, rather than store all that info in multiple places. Wouldn't it be cool just to have some way of pulling in the book/movie/web page info from some authoritative site on the fly and pump it into your own site without having to key it in? This would be like the stock portfolio widgets that retrieve price quotes based on the ticker symbol. Local sites would get out of the business of ensuring the accuracy of metadata that others are being paid to create and manage. This would simplify the module's data storage (although the complexity factor might be an issue). This was what I was thinking of WRT the dataset...
If we were to follow that, some big changes would be needed. But it would broaden the scope of the module!
I will take a look at the Review module as well.
Thanks for feedback.
David
Comment #5
sunfish62 commentedOh--
I meant to say that I took the approach in the Review content type that since the type is Review, the Body element of the node should contain the Review of the item. That flies in the face of one of the comments on the other thread. I'd like more info from that person about how the Body element and the Review element would be used differently, since I don't really understand the distinction being made. To me, if I am using a Review node type, the Body of the node will contain the review. I guess by extension, the Body element of the Author type should probably contain the name, making *that* type pretty darn basic!
As a point of information, I would also consider the Title element of a review to be different from the title of the item being reviewed. So if I am reviewing T is for Trespass, I could use that as the title if I wanted, or I could put a different title altogether, like "Grafton Does it Again". Tied into this is the thought that some sort of embedded Item Description segment that would be derived from the item node itself and put at the top (or bottom?) of the review. The item itself would thus be responsible for determining the content of this segment. This would further the goal of having a generic review module that could review anything.
David
Comment #6
sunfish62 commentedDuplicate. Oops.
Comment #7
smscotten commentedThis is basically a "me too" post, but yes, your thinking and mine coincide. I don't see the need for the "review" and the "review body" to be different. It seems just confusing, and adding in an additional field is easy enough for anyone that wants more data than the module permits. That said, I'm perfectly open to hearing why both are necessary. I'm pretty sure at least some renaming is needed to avoid confusion.
Agreed also that the book title should be distinct from the review title. I modified my d5 bookreview to include this, which wasn't hard because it looked as though the module originally had both fields but one set was commented out for some reason.
Thanks for looking into the MARC project. I'm totally ignorant and only accidentally stumbled upon the Drupal MARC project while I was looking to see if there was a general review module.
Comment #8
AstaC commentedI am the person from the other thread I believe. As I said in that thread I use both body and review. Atleast I think so. I use one to write a synopsis of the book, that is what it is about and the other one for my review.
Comment #9
smscotten commentedHi AstaChattare--
Currently a "vanilla" install of Book Review includes the following textarea fields:
Synopsis: A synopsis of the book being reviewed. (For example, the text on the back cover, or inside front cover of most books.)
Contents: The table of contents from the book being reviewed.
Review: This is the actual book review.
Body: (nothing specified)
I'm not suggesting that we eliminate the "Synopsis" field but rather that "Review" be removed, as its content should in my view be stored in the node's body.
Comment #10
smscotten commentedSome further information just to clarify:
D5 introduced an optional body field for all content types. D4.x did not have this. So when the D5 Book Review module port was done (I'm assuming) the extra "body" appeared.
Comment #11
sunfish62 commentedUpdate:
I have been examining the Z39.50 module as well as the MARC module to see what they have to offer or how they might be used here. I am not a big fan of keying in redundant data, and if there were some way to pull in data from an authoritative source (such as a library website), that would be ideal. It may, however, be unrealistic to expect that to work in the short term (especially when the Z39.50 module has no active supporters to migrate to D6).
Since I have clearly hit a block going down this route, I will back away from it and see whether I can move forward with a more basic approach (darn! there go my plans for world domination!).
In the basic way, I see having a Book Type, with the fields I listed above, and a Review Type that links to the Book Type. Because the reviewer will be inputting Book info at the same time as the review, the AddNode module (or one of the other modules that support this input mode) will be a required dependency.
There should only be the one input form. There will be the need for a full review view, a teaser view, and a one-line view.
Further suggestions are welcome.
Comment #12
domesticat commented[Fellow librarian here. Subscribing.]
Comment #13
summit commentedHi Great thread, hopefully also for Drupal 5 CCK.
May be a stupid remark.
But this is the list of fields in mine perspective for the cck-implementation:
This way these CCK fields can be used with other contenttypes also and a synopsis, review, table of content or ISBN or anything else can be added to filmreview , website review etc... and not only a bookreview.
greetings,
Martijn
Comment #14
sunfish62 commentedMartijn--
If you look at the first post, you will see each of these data elements included there. We have also discussed the fact that a Review node would use the Body element to store the actual review itself.
But you raise a point about CCK that I do not understand. You speak of "CCK fields," and I have seen the many references and modules for CCK on the site here, but I admit that do not understand what is meant by the terminology. Can you explain to me what a "CCK field" is, and how it gets used or implemented? Maybe I would go down that route, if I understood why it would be better than simply having text fields to hold the data.
Thanks.
David
Comment #15
summit commentedHi David,
In my opinion CCK are fields which can be added to all contenttypes, the standard ones like story, blog, but also CCK build contenttypes.
CCK fields are modular fields with specific attributes which can be used than everywhere in contenttypes.
For example the phone field (http://drupal.org/project/phone) , or link field (http://drupal.org/project/link) .
Greetings,
Martijn
Comment #16
sunfish62 commentedOkay. I think I understand a little better now when considered for a single field. But your Review CCK field seems to roll three data elements into one (one of these, the Item Reviewed element, would in all likelihood be a complex data element itself). That parallels modules like that Address CCK module, but from what I can see, this involves actual programming in the Drupal realm--an area that exceeds my expertise. If I find time to figure out how that might work, I could try, but my past experience in this has shown the Drupal programming fog to be too thick for my abilities.
To return to your list:
Synopsis: This would be a straightforward text field, and I don't see why a special CCK field type would be necessary.
ISBN might qualify for special treatment, but it is a complicated animal that can be 10 or 13 characters which can be split into substrings of variable length. The only validation I would feel comfortable providing would be to strip out characters other than digits and 'Xx' and verifying that the resulting length was either 10 or 13 characters. A quick perusal of the Phone Number module suggests this to be eminently hackable (taking right from that). Would/Could there be some feature for allowing an automatic Amazon or library lookup based on this? I don't know, but think it would be cool to be able to put in the ISBN and automatically have that display in the final review as a link to the site admin's chosen destination. That is something I have no idea about accomplishing, though.
Contents: personally, I think that including a contents field would be overkill. My primary focus is on a review, and not the contents of the book. I know that in some domains (technical, if I am not mistaken) it is more common to provide the table of contents in a review. But that would not be my primary focus here. I am certainly open to having something like this, but from my end, it's a complication that slows me down even more than I have been so far.
Review: Setting up a complex CCK field for Review, beyond a basic node type content type is (as I mentioned above) probably beyond my abilities. Again, from my perspective, I am defining a node Type Review, whose Body would therefore be the Review.
Price: Again, from my perspective, the price of an item is outside the requirements of a review, and can be obtained from other sources (like Amazon) better than from my fingers. That said, I note the existence of http://drupal.org/project/currency_cck and http://drupal.org/project/money which purport to provide the kind of features you want. Not being a CCK maven, I am not sure how one integrates these beasts with this one...
David
Comment #17
yesct commentedI am very much interested in the idea of being able to enter an isbn and have other fields like author, title, etc filled in from another source (amazon, other?)
Are there leads on this?
Comment #18
AstaC commentedSince I can do nothing on my own I should probably not have too many opinions. But since I am a user of this module I still can make some remarks. I live in Sweden and use a Swedish version of this module. I wouldn't like to have anything filled in by Amazon since we have no Swedish Amazon. I wouldn't mind such a possibility if it is possible NOT to use it.
Something I would wish for is a possibility to, in admin view, choose which field you want to use. Today I have done it by simply put comment marks around some code.
I too, do not use content field. Don't use price either.
Comment #19
allie commentedAs someone who is using the review form rather heavily, I will throw in my 2 cents. For what it is worth
A summary or book blurb may even be a spoiler for a book review, so summary field should be optional.
It would be nice if PUBLISHER were a searchable field. This set configuration:
by title (SEE http://novelspot.net/bookreview ) is not particularly useful. (We
have a cumbersome index set up.)
Also, currently we are losing old reviews. They are just disappearing, and we don't know why or how to prevent it. if you feel like helping us, we'd appreciate it.
Comment #20
nickvu2 commentedsubscribing =)
Comment #21
smscotten commentedThe more I dive in to this, the more I think the bookreview module can be abandoned in favor of a "book" (or "printed_book" since the "book" module in core does something quite different) CCK field and the review module.
I'm putting together my bookreviews right now with CCK, the amazon module, and the fivestar module. Perhaps a minimal bookreview module could be made that integrates these and makes the assembled nodetype automatically, but rebuilding a bookreview content type from the ground up seems like a lot of duplication of effort for little gain.
AstaChattare makes an interesting point in comment #18 that argues in favor of a separate "literary unit" (again, "book" if the name hadn't already been used) fieldtype instead of the amazon module, but between you and me, the amazon module is doing a decent job for me.
Thoughts?
Comment #22
sunfish62 commentedSplicer--
My point in starting this thread was to explore how to create a CCK book review implementation for Drupal 6, so we are in total agreement here. The big questions are: what information goes into this module, and what can be handled by others? There seems to be a consensus that a lot of what is in the current module is actually not necessary in a new generation BR module. I will probably opt for a less is more approach.
@AstaChattare: I wouldn't worry about being forced to use Amazon data, as anything like that would require some programming skills (on which I am remarkably deficient). I sincerely doubt that I will be able to get much beyond figuring out what information to capture, and where to put it in Drupal. All the auto-derive stuff for me is icing on a cake that I still haven't got a recipe for.
WRT indexing: that's way beyond me.
I have begun to take this up again, after having been diverted by installation profiles messes for quite some time. I hope to be able to get some kind of simple book review node type going on my machine, and when I do, I'll try to get that out here as well.
No promises though...
Comment #23
sunfish62 commentedI will upload my first version to handle review information shortly for public consideration. I have taken the Addresses CCK module and unceremoniously hacked it into holding basic bibliographic information. Given my (lack of) higher programming skills, I fully expect this to be buggy and not very feature-rich, but my initial tests succeeded in creating a node type that used the bundled fields on input forms and subsequent display.
For this exercise, I set up the following fields in the bundle: Title, Edition, PubPlace, PubName, PubDate, Pagination, and ISBN. I purposely kept it simple at this point, and stuck to the most basic data elements used to describe books. These are all basic text fields, with no fancy lookups or other bells or whistles. I expect at another point to use the FullNames CCK module to handle authors. Since I *really* don't know what I am doing, I am rather happy that I got it this far.
Issues that I see still remaining:
* The form layout needs work
* What about theming?
* Philosophically, is this really a review, or is it a book description to which one can attach a review?
* How do old reviews get into this?
* Is this in fact a usable approach?
I look forward to feedback and further discussion!
David
Comment #24
smscotten commentedDavid--
Yes, we're on the same page here. I'd suspected this should be CCK-based all along, but my recent post was my final surrender and waving of the white flag regarding the scope of the project.
Unless it's an integrated book and review, there's no point in saying we're moving forward with the bookreview module. I've already used nodetype to turn all my bookreviews into stories (after pasting relevant info into the body) then turning those stories into a new cck bookreview which is little more than a story node with an Amazon CCK field added in. For the moment I'm satisfied with the approach, but there is still more I'm going to want to do.
I think what you're working on is mostly the right approach, but I'd want it to stand alone without a review so that we can then use the review module in conjunction.
Back in d5 there was a module that would automatically turn a custom CCK type into a module. I wonder if that ever got moved forward to d6... That might be the shortcut we're looking for.
That still leaves the question of how old reviews get into the new form and I don't have anything like an easy answer, but it will be possible even though it may not be pretty. One of the things I know the least about is the way in which Drupal module upgrades do db schema updates using update.php. Even if I come up with a method that transfers from the old schema to the new set of schemas using the APIs, packaging it in a way that handles the old tables while the new API is loaded, that terrifies me. Maybe it's not as bad as I'm thinking, but yikes.
Comment #25
sunfish62 commentedOkay, here's a first pass. Give it a try!
David
Comment #26
sunfish62 commentedI am uploading a different file; after some consideration, I came to the realization that what I had created here was more a bundled Bibliographic Description dataset rather than a Book Review, hence the renamed file and content.
Moving forward, I envision linking several CCK entities (this one, the FullName, and FiveStar for starters) together to create a review environment. Maybe then I could use a version of CCK Create Install to generate a loadable CCK-based book review...
Comment #27
Fanaile commentedHi;
I would love to help test either of these files out; however I can't open them. Every time I try I get an error that reads "invalid archive directory" and nothing shows.
Comment #28
sunfish62 commentedHuh. I note that there seems to be an extra trailing underscore in the names, but the archive opens fine for me nonetheless. How are you going about trying to open them?
David
P.S. -- I'm glad someone's looking at this...
P.P.S. -- The basic contents of both files is essentially the same. You really only need the second one...
Comment #29
Fanaile commentedI tried with the second file first; downloaded the file then right clicked and selected "Open with Winzip" - which works with every other module file I download.
Almost instantly the error message appears and says "Invalid Archive Directory". When I press "OK" Winzip continues to open but nothing appears in the listing at all.
In the meantime I have gone ahead and constructed a Book Review content type for my site using CCK - but I would very much rather use a module that's all put together like this. :)
Comment #30
sunfish62 commentedWell, I will try again. While I am at it, I will include my stab at an author cck field type. Also, here is my sense of where the original bookreview fields will go (for someone who understands how an upgrade would go):
Original bookreview table had: nid, booktitle, cover, publisher, copyright, isbn, price, pages, rating, synopsis, contents, review
Original bookreview_authors had: aid, nid, author, weight
Original bookreview_links had: lid, nid, booklink, description, weight
The bibinfo field type provides: Title, Edition, Place, Publisher, Date, Pagination, ISBN
The bibauth includes: LastName, FirstName, Dates, bio
CCK or some other submodule will provide linkage between authors and books
The Fivestar and Voting modules provide the rating
The Link module provides: URL, Description
FIELDS I HAVE NOT MAPPED:
cover, price, synopsis, contents
The Migration strategy will have to map fields as follows:
bookreview::nid --> content_type_bibinfo::nid
bookreview::booktitle --> content_type_bibinfo::bktitle
bookreview::publisher --> content_type_bibinfo::bkpub
bookreview::copyright --> content_type_bibinfo::bkdate
bookreview::isbn --> content_type_bibinfo::isbn
bookreview::pages --> content_type_bibinfo::bkpages
bookreview::review --> node_revisions::body
I'm fuzzy about the author info; the old review didn't separate names; perhaps the new additions are overkill...
Comment #31
Fanaile commentedI'm so sorry; I still can't get either file to open.
I hope we can figure out why I'm having such trouble opening these files. From what you describe, it sounds perfect for my new site (http://the-fiction-addiction.com).
I've been using Drupal for a long time, at least 2 years. But sadly I've not felt competant enough to really contribute to writing or developing modules. I'd like to change that and this module seems perfect as it would be tested pretty thoroughly on my site - which is all book reviews, lol.
Comment #32
sunfish62 commentedWell, here is a basic zip file version with both modules in it.
Comment #33
Fanaile commentedTHat worked! :) Thank you.
I'm installing it now to start testing and see what I can find. Thanks again!
Naomi
Comment #34
sunfish62 commentedGreat!
Some notes: the two modules give you two CCK data types: bibauth and bibinfo, which roll together the various fields. You need to take these two types and create a parent node type (like, say NaomiReview), that aggregates the types into a review. That's where the FiveStar, Link, and NodeReferrer modules come in. Putting these together will give you most of the original BookReview fields (as I noted) as a single node type. That's been my first goal.
It will then be necessary to build views for the node type. Since I am not really all that versed in CCK & views, I haven't done much on that front.
So you see, my work is really just the start of this. I hope a jolt from someone else will get this moving along.
Thanks!
David
Comment #35
Fanaile commentedHi David;
sorry it took me so long to get back to you.
Other than having a few issues with the fivestar fields I created, this seems to be working out fine. I'm going to attach a screen shot of the create content > book review page so you can see how the biblio field(s) line up. I'm not sure if they're off center because of the theme I'm using or if it's something that can be fixed.
But, everything else seems to be great. None of my members have reported any issues or problems with filling anything out or getting them to post, and no one's received any errors yet...
Naomi
Comment #36
Fanaile commentedOpps, forgot to attach the file. Here you go.
Comment #37
sunfish62 commentedNaomi--
Thanks for trying it out. The layout that you see was as far as I got; fixing it is part of the to do list. I suspect that fiddling around with views is the way to remedy the layout, but I do not know for sure.
I don't see the author info on the screenshot you provided; had you not gone down that route yet?
FWIW, I have also been fiddling around with a PHP class that will use the ISBN to retrieve book information from library servers using Z39.50, in the hopes that someone else will be able to use the class with AJAX to autopopulate a book review form with data taken from the library server of your choice. I've gotten the class to successfully retrieve data from a Library of Congress server and parse it into a local array to match with the bibinfo and bibauth CCK fields. Since I know nearly nothing about AJAX, I hope that someone else will be able to take the data and use it.
Cheers,
David
Comment #38
Fanaile commentedOkay; Sorry this took me so long.
At the time of the screenshot, I had not yet placed the author info. I placed that last night.
Everything looks fine with it until I fill in any information in the author info field though. After I fill in the author names and dates and save, the page skews and the footer gets moved to the top of the page and the sidebars get moved down below the content.
Any ideas?
Comment #39
summit commentedHi,
Are these screenshots of the bibinfo module? Does it get it's own project page?
greetings,
Martijn
Comment #40
Fanaile commentedHi Summit;
Yes, the screen shot is of the bibinfo module.
As far as whether or not it's getting its own project page, I'm not sure since authinfo and bibinfo are both for the Book Review that David has been working on; but it might be a good idea to give each of them a separate project page so we can list their separate issues more clearly now that it's gotten this far.
Naomi
Comment #41
sunfish62 commented@Naomi-- I looked at your site, but didn't have time to actually get to see the troubles with the author part of this.
Interesting idea to separate this into a new project, although it's never been my intention to start or maintain a Drupal project. Before this were done, however, I think it would be important to address the basic formatting troubles that have been observed with the code as it stands. As I've said numerous times, I am essentially a monkey beating at the keyboard when it comes to understanding the Drupal Way. If someone could tell me how I would make the input form nicer to look at (themes? css? in the module code? waving my sprinkle dust wand at the screen?), I would try to do that. Perhaps then this could be put out on its own.
I'm reticent, though, because I really would like to see a Book Review package to be easily available. Splitting it up into constituent elements is good for programming, but bad for end users, and if separating this part out takes energy away from getting a D6 Book Review package, I think that's bad. Even if we have all the pieces (with a Book entity, an Author entity, FiveStar, etc.), someone has to get them all playing together nicely.
David
P.S. FWIW, I wrote a php object that extracts bibliographic information from a remote library Z39.50 server and returns it as an associative array and have been trying to merge that into the CreateFromWeb module to populate the bibinfo CCK entity, but I've run into some technical glitches. When it finally does work, it will be possible to put in an ISBN, and auto-populate the rest of the information from that library source.
Comment #42
schildi commentedHello David
I am really interested in this feature. I just fiddled around with the z39.50 module but it seems to be unmaintained.
I would like to have a look at your php object (if possible). My site is still running D5, but let me know if I can help.
Regards
Comment #43
sunfish62 commentedschildi--
The Z39.50 project is unmaintained, and will not be updated to Drupal 6 unless someone else takes it on. I put my code out under the CreateFromWeb issue lists (see http://drupal.org/node/404274).
My hope is that someone else (perhaps you?) can decipher the CreateFromWeb code and figure out how to make my code work with that; I could NOT get the returned data to go into the form.
Alas, it is increasingly looking like no one is willing to help me put this together into a viable module for D6. The big issues remain 1) the design of the layout, and 2) addressing migration issues for moving from earlier versions to this one. I unfortunately have neither the skill nor the time to push this further.
Comment #44
schildi commentedI will have a look at your code and check what has to be done to bring the Z39.50 module to D6.