Comments

StevenWill’s picture

Title: Drupal 7 version » Drupal 7 version?
krazykellie’s picture

Version: 6.x-2.0 » 6.x-2.x-dev

I would love to add this to our site! We currently have a lending library of titles available for our staff but we do not want a full-fledged catalog. This would be amazing if we could incorporate this in Drupal 7. Anyone know of a timeline?

janusman’s picture

I'd also love this, however I've been really busy in other projects as of late... I tried to gauge interest in the DRUPAL4LIB mailing list, and tried to raise some funds with a Chipin... but I only managed to raise $50 =)

So, it would be awesome if more people stepped forward and contributed in any shape or form: actual code, donations, etc. There's also some automated D6-to-D7 module conversion tools that would help.

Perhaps we could also set up an actual sprint to work on this... I'd just ask for someone to actually get some 1 or more people on it... dunno!

krazykellie’s picture

I'm happy to help in anyway I can. I'll be a guinea pig for sure! I'm not sure if I can raise many funds but I'll try!

Thanks @janusman!!

janusman’s picture

I recently committed some non-minor code cleanup to 6.x-2.x-DEV.

For now I think the battle plan could be:

  • run a straight coder module conversion from D6 to D7
  • open up a 7.x-2.x branch with the results of that
  • try to dimension the amount of work that will be necessary, and break this out into smaller tasks so others can jump in and help with testing, fixing, etc.

In my mind, I was thinking if any major architectural changes would have to go in, the greatest being switching from nodes to a custom entity type. I think the answer will be "not for now"; I also want to keep compatibility with other modules (like ApacheSolr) and I'm not if it could index other kinds of entitites easily.

The only major change I'm thinking of (which isn't all that major) would be how taxonomy is handled. I think after doing a straight conversion I can get a gist of what changes we'll have to make.

janusman’s picture

StatusFileSize
new188.71 KB

This is a first stab at a migration. This STILL does not work at all, since there are some critical issues.

However, I'm pleasantly surprised to say that a full working version seems plausible.. maybe within october?! (Yay!)

Here's a rundown of the TODOs: for now I will work at this, if anyone wants to jump in, please tell me before you start to work on it (or risk having your work be useless) =)

In general:
CRITICAL - review all db_* functions to check for proper syntax; see all "TODO" mentions in code
- check hook_requirements() in .install files
CRITICAL - check if .inc files need to be included in all .info files; e.g. see millennium_auth.info
- add links to configuration pages in .info files: see http://drupal.org/node/542202
  e.g.
    configure = admin/config/content/example

millennium_enrich
CRITICAL - files in includes/* need proper way to include class files

millennium.admin.inc
CRITICAL - Check taxonomy function usage! Lines are marked TODO
CRITICAL - fix loading of .inc files (lines marked TODO)

millennium.module
CRITICAL - There are duplicate millennium_node_view() functions, one for each $view_mode... join into one function!
CRITICAL - move stuff from millennium_nodeapi_OLD() into where it's needed (in other millennium_node_* functions)
CRITICAL - check all taxonomy functionality
CRITICAL - node creation needs work, because $node object behaves differently (e.g.: $node->title['und'] = "foo")
CRITICAL - calls to theme_millennium_holdings were not converted; convert! (note: some calls use 2 variables, some 3)
- add missing documentation to functions

millennium.pages.inc
CRITICAL - fix theme call in millennium_ajax_handler() and _millennium_show_conversion()

millennium.theme.inc
CRITICAL - default argument values have to be moved from function arguments (e.g. $page = TRUE) into millennium_theme()
CRITICAL - check theme_millennium_holdings (and calls to it everywhere), number of parameters does not match in hook_theme()

millennium.views.inc
- I don't know if this will approach will even work with D7 Views =) Test it.

millennium_auth.install
-fix millennium_auth_update_6001!

millennium_auth.module
- millennium_auth_user() ... see call for theme_millennium_auth_checkouts

millennium.cron.inc
CRITICAL - manually check everything.

millennium.install
CRITICAL - manually check everything.

millennium_filter
CRITICAL - manually check everything.
krazykellie’s picture

WOW! Sooo excited!! Thanks so much for doing this. I wish I knew programming! I'm lucky I can type most of the time

janusman’s picture

StatusFileSize
new88.92 KB

Yay! Good news!

screenshot

There is still mucho to be done, but the basics are there. =)
I think I will open up the 7.x-2.x branch real soon now.

Here is an updated list of TODOs. Also, gigantor patch attached (that should apply to fresh git checkout of 6.x-2.x)

CRITICAL means "broken". =)

In general:
- Upgrade Javascript. Not everything works. see:
  -http://drupal.org/node/224333#local_settings_behaviors
  -http://drupal.org/node/224333#drupal_behaviors
- Upgrade .test code.
DONE CRITICAL - review all db_* functions to check for proper syntax; see all "TODO" mentions in code
DONE- check hook_requirements() in .install files
- check if .inc files need to be included in all .info files; e.g. see millennium_auth.info
  --> It seems that only those with classes, and that we want lazy-loaded
- add links to configuration pages in .info files (to enable links in modules page): see http://drupal.org/node/542202 e.g. configure = admin/config/content/example

millennium_enrich
- ?might files in includes/* need proper way to include class files?
- rethink view modes (teaser,page,etc) in classes' nodeView() methods (and caller millennium_enrich_invoke()) ... still using deprecated $a3 and $a4 to know if teaser or page

millennium.admin.inc
CRITICAL - Check taxonomy function usage! Lines are marked TODO
- fix loading of .inc files (lines marked TODO)
DONE- Fix millennium_admin.js

millennium.module
CRITICAL - check all taxonomy functionality, currently broken
- node might needs work, because $node object behaves differently (e.g.: $node->title['und'] = "foo") ... although it seems it will only affect taxonomy functions in millennium.module and millennium_cck
- add missing documentation to functions
DONE - For non-mysql databases; DB schema does not support datetime-type fields (in tables millennium_node_bib and millennium_bib_item)! Have to write hook_update_N() function to convert into timestamps, and adjust module logic accordingly. See http://drupal.org/node/159605
  --> because of this (for now) requirements should state MySQL!
DONE CRITICAL - There are duplicate millennium_node_view() functions, one for each $view_mode... join into one function!
DONE: CRITICAL - calls to theme_millennium_holdings were not converted; convert! (note: some calls use 2 variables, some 3)

millennium.pages.inc
DONE CRITICAL - fix theme call in millennium_ajax_handler() and _millennium_show_conversion()

millennium.theme.inc
- change all theme_* functions' documentation, since functions now use single $variables array.
DONE CRITICAL - default argument values have to be moved from function arguments (e.g. $page = TRUE) into millennium_theme()
DONE CRITICAL - check theme_millennium_holdings (and calls to it everywhere), number of parameters does not match in hook_theme()

millennium.views.inc
??? - I don't know if this will approach will even work with D7 Views =)

millennium_auth.install
CRITICAL -fix millennium_auth_update_6001!

millennium_auth.module
CRITICAL - millennium_auth_user() ... see call for theme_millennium_auth_checkouts

millennium.cron.inc
CRITICAL - manually check everything.

millennium.install
CRITICAL - manually check everything.

millennium_filter
CRITICAL - manually check everything.

millennium_cck
CRITICAL - might need a complete rewrite... and module should probably should be renamed =)
janusman’s picture

StatusFileSize
new192.78 KB

...aand adding the missing patch.

janusman’s picture

Title: Drupal 7 version? » Drupal 7 version!

Aaand, better title!

krazykellie’s picture

It's looking great!!!! Can't wait to play with it!

krazykellie’s picture

Hey @janusman

Question. Can this be a stand alone option that you don't have to link it up with the OPAC you could create your own records and track within drupal or do you have to have it connected to your OPAC?

With what we are doing, we need to be separate than our OPAC so that just our staff access to it and not all of our customers. Does that make sense?

janusman’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

@krazykellie: Perhaps this discussion should go into a different issue than this one? If I'm undertanding correctly, you want a library catalog in Drupal, but don't want to create records by importing them from another OPAC..? In this case--Millennium's main goal is to either: (a) import records from an III OPAC or (b) show records from an III OPAC embedded in your content (using the millennium_filter.module).

If you want to type in your bibliographic data into Drupal nodes, you could use Biblio module, or just create a bunch of fields (say, author, etc.) and fill those in. If you also want to track loans, etc. on these records there's a bunch of other modules that could help you.

janusman’s picture

Title: Drupal 7 version! » Drupal 7 version progress
Component: Miscellaneous » Code
Assigned: Unassigned » janusman
Category: feature » task

Just in case anyone didn't notice, the 7.x-2.x-dev version is available for download from the Millennium Integration project page.

NOTE that this is a DEVELOPMENT version, some parts work, some don't... for instance, you can import and view records (and holdings info) but importing into taxonomy terms or fields does not yet work.

So... you should just enable the main Millennium Integration module; you can enable the others but I don't guarantee anything (for now!). Stay tuned for updates. Remember, feedback is welcome!

janusman’s picture

StatusFileSize
new16.94 KB

Committed the attached patch to 7.x-2.x.

Taxonomy mapping and importing now works, as well as managing pseudo-field (coverimage, holdings table, etc) in "manage display" page for the content type that Millennium uses.

janusman’s picture

janusman’s picture

An almost-working Millennium filter module is now committed. http://drupalcode.org/project/millennium.git/commitdiff/eb973dd

It works, but sometimes fails to work and shows error in millennium_valid_language(). Clearing caches fixes the problem... but it's a weird error.

janusman’s picture

A working version of millennium_auth.module now committed. See commit at: http://drupalcode.org/project/millennium.git/commit/85f2f7a

This is a screenshot showing checked out items from a user authenticated using the OPAC:

janusman’s picture

Status: Active » Fixed

7.x-2.0-alpha1 has been released!! Please test =)

Closing this issue out, please open new issues for anything related to this branch/version.

Status: Fixed » Closed (fixed)

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