We are planning to move our biblio version from to 6.x-2.0-rc1 from 6.x-1.x. I think the new field mapping functions are great, thanks. But I'm looking to further extend this mapping by adding a couple new fields to the RIS format field map list.

It looks like the initial list of RIS fields is created during the install and is found in the _get_ris_field_map function in biblio_ris.install, so I should just be able to insert my own custom codes into the field map by adding new lines to that array. Will I run into any trouble later if I create new codes and fields there (aside from needing to re-apply the custom changes on each update)?

I have added a couple customized date fields to the biblio content type. I wonder if it is possible to map the new field tags described above over to these non-standard biblio fields? I see I could simply insert the fieldnames in the _get_ris_field_map, and then customize the import in the _biblio_ris_parse_line function in the biblio_ris.module but I wonder if this will have unforeseen side effects?

Phil.

Comments

rjerome’s picture

Hi Phil,

The custom tags should persist through upgrades, since once the module is installed those values are written to the DB. Ideally thought I guess what we should do is something similar to the publication types where you can just add a new tag in the UI.

As for mapping to CCK fields, probably what should be done is add the biblio related CCK fields to the select lists which are generated in the biblio_admin.inc file in the biblio_admin_field_mapper_form() function.

You can get the fields attached to biblio like this...

  if (module_exists('content')) {
    module_load_include('inc', 'content', 'includes/content.crud');
    $fields = content_field_instance_read(array('type_name' => 'biblio'));
  }

Ron.

pkiff’s picture

Status: Active » Fixed

Thanks, Ron, that helps. I'll probably leave the mapping to custom CCK fields for later, as we don't yet have them available in our RIS source data.

Status: Fixed » Closed (fixed)

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