This could be nice, if a content creator wants to recommend a few books from the library; just insert something like

  [[millennium:isbn=123456789x]]
  [[millennium:record=b123456]]
  [[millennium:http://mylibrary.org/record=b123456]]
  [[millennium:http://mylibrary.org/record=b123456:holdings]]
  [[millennium:http://mylibrary.org/record=b123456:coverimage,title,holdings]]

and the full record (or only certain fields) would get inserted into the node.

Maybe it could use tokens instead of an input filter... do some research =)

Comments

tituomin’s picture

A very good idea! I have'nt studied the Token module, but it seems it will be part of Drupal 7: http://drupal.org/node/113614
Maybe combined with a content editor and an easy-to use button which generates these placeholders, this would be a killer feature!

janusman’s picture

janusman’s picture

Status: Active » Needs review
StatusFileSize
new4.19 KB

This was rather easy, yeah!

The only thing is that loading the items takes a bit, so some caching might be in order...

Instructions:
1) Apply patch
2) Enable the new module "Millennium Filter"
3) Go to admin/settings/filters and click "configure" beside one of the enabled input formats.
4) Find the checkbox for "Millennium Filter", and click "Save configuration"
5) Create new content with that input format; you can add a record display for any record using this syntax:

   {{millennium|b123456}}
   {{millennium|i123456}}
   {{millennium|http://example.org/record=b123456}}

The first two work only for the currently-configured WebOPAC in admin/settings/millennium. The last one works for any WebOPAC anywhere, whether it's configured or not. Nodes are not imported, just scraped from the source OPAC and displayed on-the-fly.

janusman’s picture

Forgot to mention that any URL that leads to a *single* record page *should* work; however I did some testing and the order of the Filter (see for example /admin/settings/filters/1/order) might send an already-filtered URL string to the module, resulting in an error message.

janusman’s picture

StatusFileSize
new5.3 KB

This version now includes caching.

janusman’s picture

Committed version with some fixes.

See README.txt

janusman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

janusman’s picture

Status: Closed (fixed) » Needs work

Reopening because it should cache failed requests to prevent slowness during page building.

janusman’s picture

Status: Needs work » Fixed

Fixed.

Status: Fixed » Closed (fixed)

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