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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

janusman’s picture

janusman’s picture

rjerome mentions biblio probably won't be CCK until D7: http://drupal.org/node/397332#comment-1344572

janusman’s picture

Useful link for creating CCK fields upon module installation:

http://drewish.com/node/134
http://drewish.com/node/118

janusman’s picture

Priority: Normal » Critical

Tagging 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.

tituomin’s picture

Not 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.

janusman’s picture

Status: Active » Needs review
FileSize
22.66 KB
17.7 KB
8.48 KB

Here'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:

2010-04-06_143833.png

And a teaser view of a node:

2010-04-06_144549.png

janusman’s picture

Title: Biblio, CCK dependency/support » CCK support

Title change.

janusman’s picture

Remarking needs review in hopes the testing bot will test it =)

Tests are still needed for this though =)

janusman’s picture

Status: Needs review » Active
janusman’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, millennium-468388-6.patch, failed testing.

janusman’s picture

Status: Needs work » Needs review
FileSize
8.27 KB

Hmm wrong patch format. resubmitting.

Status: Needs review » Needs work

The last submitted patch, millennium-468388-12.patch, failed testing.

janusman’s picture

Status: Needs work » Needs review
FileSize
9.51 KB

Realized 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).

Status: Needs review » Needs work

The last submitted patch, millennium-468388-14.patch, failed testing.

janusman’s picture

Apart 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!

janusman’s picture

Status: Needs work » Needs review
FileSize
9.6 KB

New patch.

Here the CCK support is a different module; a new drupal_alter() function incorporates the idea from #6.

janusman’s picture

FileSize
12.56 KB

Small change in wording, added some missing t()s.

janusman’s picture

Status: Needs review » Fixed

Comitted #18. Yay!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.