function en8_add_urls in Bibliography Module 6.2
Same name and namespace in other branches
- 6 endnote8_export.inc \en8_add_urls()
- 7 modules/endnote/endnote8_export.inc \en8_add_urls()
- 7.2 modules/endnote/endnote8_export.inc \en8_add_urls()
1 call to en8_add_urls()
- _endnote8_XML_export in modules/
endnote/ endnote8_export.inc
File
- modules/
endnote/ endnote8_export.inc, line 73
Code
function en8_add_urls(&$node) {
global $base_path;
$xml = '';
// TODO: fix URLS
if (!empty($node->biblio_url)) {
$xml .= "<web-urls>";
$xml .= '<url><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_url) . "</style></url>";
$xml .= "</web-urls>";
}
unset($node->biblio_url);
if (!empty($node->files) && count($node->files) && user_access('view uploaded files')) {
$xml .= "<related-urls>";
foreach ($node->files as $file) {
$xml .= '<url><style face="normal" font="default" size="100%">';
$xml .= htmlspecialchars(file_create_url($file->filepath));
$xml .= "</style></url>";
}
$xml .= "</related-urls>";
}
unset($node->files);
if (!empty($xml)) {
return "<urls>{$xml}</urls>";
}
return;
}