Plugin Author
kochm
(@kochm)
In the Simile/Exhibit-Template the url field from the JSON input is used for this automatically (default in Simile/Exhibit) – If you want to have different data you might change the function formatDocumentJSON() in the Mendeley-Plugin to provide different data (e.g. the DOI with a link to resolve it) in the url field.
Hello again,
not sure if I’m having a bad approach to this, added
if (isset($doc->identifiers)) {
if (isset($doc->identifiers->doi)) {
$urldoi = 'http://dx.doi.org/' . $doc->identifiers->doi;
$tmps .= '"doi" : " ' . json_encode($urldoi) . '",\n';
}
}
at formatDocumentJSON() just after the “url” part and
<span data-ex-content=".doi"></span>
to bibexhibit.tpl.php to check it, but i get a link to an error message in jsonlint.com with this message in Results:
Error: Parse error on line 1:
< !DOCTYPE html PUBL
^
Expecting ‘STRING’, ‘NUMBER’, ‘NULL’, ‘TRUE’, ‘FALSE’, ‘{‘, ‘[‘, got ‘undefined’
Any suggestion on how to solve this?
Finally found the error, a misplaced pair of quotes.
$tmps .= ‘”doi” : ‘ . json_encode($urldoi) . “,\n”;