| 6 |
// |
// |
| 7 |
// Modified for use in biblio by Ron Jerome |
// Modified for use in biblio by Ron Jerome |
| 8 |
// |
// |
| 9 |
// $Id: biblio_style_mla.inc,v 1.13 2009/10/23 20:19:37 rjerome Exp $ |
// $Id: biblio_style_mla.inc,v 1.13.2.1 2009/11/10 22:09:18 rjerome Exp $ |
| 10 |
/** |
/** |
| 11 |
* Get the style information |
* Get the style information |
| 12 |
* |
* |
| 52 |
* The styled biblio entry |
* The styled biblio entry |
| 53 |
*/ |
*/ |
| 54 |
function biblio_style_mla($node, $base = 'biblio', $inline = false) { |
function biblio_style_mla($node, $base = 'biblio', $inline = false) { |
| 55 |
|
$output = ''; |
| 56 |
$author_options = biblio_style_mla_author_options(); |
$author_options = biblio_style_mla_author_options(); |
| 57 |
$authors = theme('biblio_format_authors', $node->biblio_contributors[1], $author_options, $inline); |
$authors = theme('biblio_format_authors', array('contributors' => $node->biblio_contributors[1], 'options' => $author_options, 'inline' => $inline)); |
| 58 |
//if (empty($authors)) $authors = theme('biblio_authors', $node->biblio_contributors[5], 'mla', 5, $inline); // if no authors substitute corp author if available |
//if (empty($authors)) $authors = theme('biblio_authors', $node->biblio_contributors[5], 'mla', 5, $inline); // if no authors substitute corp author if available |
| 59 |
//if (empty($authors)) $authors = '[' . t('Anonymous') . ']'; // use anonymous if we still have nothing. |
//if (empty($authors)) $authors = '[' . t('Anonymous') . ']'; // use anonymous if we still have nothing. |
| 60 |
//$output .= '<span class="biblio-authors">' . $authors . "</span>. \n"; |
//$output .= '<span class="biblio-authors">' . $authors . "</span>. \n"; |
| 109 |
$output .= " (".$node->biblio_year . ")"; |
$output .= " (".$node->biblio_year . ")"; |
| 110 |
} |
} |
| 111 |
// FIXME do something with the online pubs section |
// FIXME do something with the online pubs section |
| 112 |
if ($node->online_publication == "yes") // this record refers to an online article |
if (FALSE /*$node->online_publication == "yes"*/) // this record refers to an online article |
| 113 |
{ |
{ |
| 114 |
// instead of any pages info (which normally doesn't exist for online publications) we append |
// instead of any pages info (which normally doesn't exist for online publications) we append |
| 115 |
// an optional string (given in 'online_citation') plus the current date and the DOI (or URL): |
// an optional string (given in 'online_citation') plus the current date and the DOI (or URL): |
| 213 |
'customStringAfterFirstAuthors' => ', et al.',//15 |
'customStringAfterFirstAuthors' => ', et al.',//15 |
| 214 |
'encodeHTML' => true |
'encodeHTML' => true |
| 215 |
); |
); |
| 216 |
$editor = theme('biblio_format_authors', $node->biblio_contributors[2], $editor_options, $inline); |
$editor = theme('biblio_format_authors', array('contributors' => $node->biblio_contributors[2], 'options' => $editor_options, 'inline' => $inline)); |
| 217 |
_period_if_needed($output); |
_period_if_needed($output); |
| 218 |
|
|
| 219 |
if (count($node->biblio_contributors[2]) > 1) { // there are at least two editors (separated by ';') |
if (count($node->biblio_contributors[2]) > 1) { // there are at least two editors (separated by ';') |
| 356 |
'customStringAfterFirstAuthors' => ', et al.',//15 |
'customStringAfterFirstAuthors' => ', et al.',//15 |
| 357 |
'encodeHTML' => true |
'encodeHTML' => true |
| 358 |
); |
); |
| 359 |
$editor = theme('biblio_format_authors', $node->biblio_contributors[2], $editor_options, $inline); |
$editor = theme('biblio_format_authors', array('contributors' => $node->biblio_contributors[2], 'options' => $editor_options, 'inline' => $inline)); |
| 360 |
_period_if_needed($output); |
_period_if_needed($output); |
| 361 |
|
|
| 362 |
if (count($node->biblio_contributors[2] > 1)) {// there are at least two editors (separated by ';') |
if (count($node->biblio_contributors[2] > 1)) {// there are at least two editors (separated by ';') |