Version 1.x depended on Biblio module, and the current 2.x-DEV version does not.
I am not so convinced the module should require Biblio again, since IMO Biblio is reproducing a lot of functionality from CCK/Views; my gut feeling is that Millennium module could *support* it in a basic way (allow importing into Biblio-type nodes) but not at all depend on it.
To be fair, Millennium module 2.x-DEV is also reproducing a little bit of Biblio, but just the store-and-show-bibliographic-data part.
I would prefer to move 2.x into requiring CCK; then we'd have views & more automatically.
I need to read issues like #397332: Conversion to CCK data model. Post more issues or links here.
Comment | File | Size | Author |
---|---|---|---|
#18 | millennium-468388-18.patch | 12.56 KB | janusman |
#17 | millennium-468388-17.patch | 9.6 KB | janusman |
#14 | millennium-468388-14.patch | 9.51 KB | janusman |
#12 | millennium-468388-12.patch | 8.27 KB | janusman |
#6 | millennium-468388-6.patch | 8.48 KB | janusman |
Comments
Comment #1
janusman CreditAttribution: janusman commentedTo programatically create CCK content types, see:
http://drupal.org/node/458578#comment-1573848
http://groups.drupal.org/node/5272
http://blog.daveslist.co.nz/drupal6/2008/10/01/define-content-types-and-...
Comment #2
janusman CreditAttribution: janusman commentedrjerome mentions biblio probably won't be CCK until D7: http://drupal.org/node/397332#comment-1344572
Comment #3
janusman CreditAttribution: janusman commentedUseful link for creating CCK fields upon module installation:
http://drewish.com/node/134
http://drewish.com/node/118
Comment #4
janusman CreditAttribution: janusman commentedTagging this as critical; I think this is the next thing to take care of (whether using CCK or Biblio) in order to gain Views and other support.
I'm leaning towards CCK instead of Biblio.
Comment #5
tituomin CreditAttribution: tituomin commentedNot very familiar with Biblio. However, CCK seems to be a safe bet, with the D7 core integration and stuff. So maybe I would vote for CCK.
Comment #6
janusman CreditAttribution: janusman commentedHere's a first stab at this. The mapping is very simple: it just fills up the selected CCK fields (configured in admin/settings/millennium/fieldmap) with whatever values. It only works for CCK text fields (regardless of the widget used).
This patch also allows the admin to turn off displaying the biblio table entirely, since he/she might want to use CCK to display the data instead.
Since this introduces a new path clear the caches after applying the patch to test it.
TODO:
- help messages
- maybe this should be a separate module to reduce bloat. That module could plug into millennium.module::millennium_record_to_nodeobject() (implementing a new hook there) that would alter the node before exiting. The new module would implement that hook. (In fact this could also mean the taxonomy mapping functions could then also go in a separate module implementing that hook).
- better layout of the config screen.
- Another issue: some imported data with multiple values in MARC (like ISBNs & authors) are being stored as strings in millennium_biblio_data but should be array values instead.
It looks like this:
And a teaser view of a node:
Comment #7
janusman CreditAttribution: janusman commentedTitle change.
Comment #8
janusman CreditAttribution: janusman commentedRemarking needs review in hopes the testing bot will test it =)
Tests are still needed for this though =)
Comment #9
janusman CreditAttribution: janusman commentedComment #10
janusman CreditAttribution: janusman commentedComment #12
janusman CreditAttribution: janusman commentedHmm wrong patch format. resubmitting.
Comment #14
janusman CreditAttribution: janusman commentedRealized I was going the wrong way since nodes are rebuilt on import (all CCK values obliterated), so I needed to make that absolutely clear on the interface: the configuration screen now shows the CCK fields and what will be mapped into each one.
Also, was missing the lines in hook_uninstall() to clear out those mappings (held in variables).
Comment #16
janusman CreditAttribution: janusman commentedApart from pulling the rug from under the testing bot (don't commit patches while testing is running =)) this needs at least one test... aaand I missed checking if CCK module was active at all!
Comment #17
janusman CreditAttribution: janusman commentedNew patch.
Here the CCK support is a different module; a new drupal_alter() function incorporates the idea from #6.
Comment #18
janusman CreditAttribution: janusman commentedSmall change in wording, added some missing t()s.
Comment #19
janusman CreditAttribution: janusman commentedComitted #18. Yay!