« OBFS form notes | Main | Image cache notes »

April 27, 2010

Customize Biblio endnote export to include citekey (hack)

The Biblio module auto-increments a citation key but this key is not included in the Endote Tagged export by default. Here is a hack to include the citation key. In this case, I export the citation key into the Accession Number field.

1) Open the file containing the biblio_endnote_tagged_export() function: ~sites/all/modules/biblio/biblio.import.export.inc (Line 864)

2) Go to line 923 and change this:


if (!empty($node->biblio_accession_number))
$tagged .= "%M ". trim($node->biblio_accession_number) ."\r\n";

to this:


if (!empty($node->biblio_citekey))
$tagged .= "%M ". trim($node->biblio_citekey) ."\r\n";

Explanation: As mentioned, Biblio can be setup up to auto-increment the citation key (admin/settings/biblio > citekey). These values are stored in the "biblio" table as the field "biblio_citekey". All you are doing is substituting one database field for another.

3) Save the file and test the export.

Posted by kkwaiser at April 27, 2010 10:31 AM

Comments

Login to leave a comment. Create a new account.