function en8_add_contributors in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/endnote/endnote8_export.inc \en8_add_contributors()
- 6 endnote8_export.inc \en8_add_contributors()
- 7.2 modules/endnote/endnote8_export.inc \en8_add_contributors()
1 call to en8_add_contributors()
- _endnote8_XML_export in modules/
endnote/ endnote8_export.inc
File
- modules/
endnote/ endnote8_export.inc, line 160
Code
function en8_add_contributors(&$node) {
$xml = '<contributors>';
$authors = biblio_get_contributor_category($node->biblio_contributors, 1);
if (!empty($authors)) {
$xml .= "<authors>";
foreach ($authors as $auth) {
$xml .= '<author><style face="normal" font="default" size="100%">';
// Insert author here.
$xml .= htmlspecialchars(trim($auth['name']));
$xml .= "</style></author>";
}
$xml .= "</authors>";
}
$authors = biblio_get_contributor_category($node->biblio_contributors, 2);
if (!empty($authors)) {
$xml .= "<secondary-authors>";
foreach ($authors as $auth) {
$xml .= '<author><style face="normal" font="default" size="100%">';
// Insert author here.
$xml .= htmlspecialchars(trim($auth['name']));
$xml .= "</style></author>";
}
$xml .= "</secondary-authors>";
}
$authors = biblio_get_contributor_category($node->biblio_contributors, 3);
if (!empty($authors)) {
$xml .= "<tertiary-authors>";
foreach ($authors as $auth) {
$xml .= '<author><style face="normal" font="default" size="100%">';
// Insert author here.
$xml .= htmlspecialchars(trim($auth['name']));
$xml .= "</style></author>";
}
$xml .= "</tertiary-authors>";
}
$authors = biblio_get_contributor_category($node->biblio_contributors, 4);
if (!empty($authors)) {
$xml .= "<subsidiary-authors>";
foreach ($authors as $auth) {
$xml .= '<author><style face="normal" font="default" size="100%">';
// Insert author here.
$xml .= htmlspecialchars(trim($auth['name']));
$xml .= "</style></author>";
}
$xml .= "</subsidiary-authors>";
}
$authors = biblio_get_contributor_category($node->biblio_contributors, 5);
if (!empty($authors)) {
$xml .= "<translated-authors>";
foreach ($authors as $auth) {
$xml .= '<author><style face="normal" font="default" size="100%">';
// Insert author here.
$xml .= htmlspecialchars(trim($auth['name']));
$xml .= "</style></author>";
}
$xml .= "</translated-authors>";
}
$xml .= '</contributors>';
unset($node->biblio_contributors);
return $xml;
}