ajnyga / embedgalley Goto Github PK
View Code? Open in Web Editor NEWOJS3 plugin for visualizing JATS XML galleys
License: GNU General Public License v3.0
OJS3 plugin for visualizing JATS XML galleys
License: GNU General Public License v3.0
You should add a license to this repo. Otherwise, the people out there are not allowed to use it....
Everything works fine, but in the reference lists, some tags are not rendering correctly. I noticed with book titles and chapters.
For example this one: Hondagneu-Sotelo, P. (1994). . . University of California Press: Berkeley, C.A.. .
Should look like this: Hondagneu-Sotelo, P. (1994). Gendered transitions: the Mexican experience of immigration. Berkeley, C.A.: University of California Press.
How can I fix this?
Thank you
In the most current version of OJS (3.1.2), articles with JATS-XML do not load anymore.
In the logs I get the error:
PHP Fatal error: Uncaught --> Smarty:
Unable to load template 'app:plugins/generic/embedGalley/templatestemplates/articleFooter.tpl
' in 'frontend/pages/article.tpl' <-- \n thrown in
/ojs/journal_name/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195
I think this may be connected to this line , but that is only a guess.
Would be awesome, if you could fix this.
Hi there!
I just uploaded this xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "TextureArticle 0.1.0" "http://substance.io/TextureArticle-1.0.0.dtd">
<article id="article" xmlns:xlink="http://www.w3.org/1999/xlink">
<front id="front-1">
<article-meta id="article-meta-1">
<title-group id="title-group-1">
<article-title id="article-title-1">This is a Nice Test Article</article-title>
</title-group>
<history id="history-1" />
<abstract id="abstract-1">
<p id="p-1">A nice article not in need of any abstract.</p>
</abstract>
</article-meta>
</front>
<body id="body-1">
<p id="p-2">Well, I have to write something.</p>
<fig id="fig-7ca66d845ea9ec67723b37adf209b6fc">
<object-id id="object-id-3cae7257ceed7091fb226510f4bc922f">fig-7ca66d845ea9ec67723b37adf209b6fc</object-id>
<label>Figure 1</label>
<caption id="caption-940ee25b59a2f2982561703336202d60">
<title id="title-5e83b2c705efd3ff3664c4a847316410">A title</title>
<p id="p-95ed9f3dcf7c1330940737588b114b05">A caption</p>
</caption>
<graphic id="graphic-bfd8aceaa6d085a3e5edc2e070942909" mime-subtype="jpeg" mimetype="image" xlink:href="e862c6fa801d48141fd64505eb397f94.jpg" />
</fig>
</body>
<back id="back-1">
<ref-list id="ref-list-1" />
</back>
</article>
When uploading only this (not the image file), my article page loses its sidebar...
How can I included images without giving a link to the file but uploading it directly in the backend?
Edit: When the sidebar gets lost, the log tells me: "Uncaught Error: Call to undefined method stdClass::saveHTML()". Perhaps this helps....
Another error: The DOMDocument::load() asks for a .dtd file. As far as I understand, this is required for translating the article tags to HTML.
If I provide a dtd file, it is never sufficient (because some tags are not found, etc.). Could you provide an example of your JATS input files that work?
Edit: Sorry! Its not the DODocument but the XSLTProcessor::transformToDoc() asking for the dtd
I would recommend to call the stylesheet not with the server URL but with the path on the server. This avoids the plugin not working in journals that are behind some kind of firewall...
In function _generateHTML
:
$path = Core::getBaseDir() . DIRECTORY_SEPARATOR . $this->getPluginPath() . DIRECTORY_SEPARATOR . 'xsl' . DIRECTORY_SEPARATOR . $citation_style . ".xsl";
This solution was already proposed in #2, but unfortunately not included in the software yet.
When having something like
<table>
<td id="table-cell-1234" align="center" style="background-color: royalblue">ABC</td>
</table>
In the HTML, only the text-align: center
is realized in my table. The color is ignored. However, I would expect that both attributes are stacked to give the final style.
The problem is that the add-style
template in the XSLT does not acknowledge any already present style attributes. Can this be realized?
The OJS 3.1.2 release https://github.com/ajnyga/embedGalley/releases/download/1.0.0.2/embedGalley.tar.gz appears to serve up whitespace at the start of images. Reported here:
https://forum.pkp.sfu.ca/t/do-images-get-corrupted-in-ojs-3-1-2-4/59058
This appears to come from whitespace after closing ?>
PHP end tags, e.g. in EmbedGalleyPlugin.inc.php
.
I propose removing the PHP end tags.
Hi @ajnyga
I was testing your module (your release tagged as 1.0.0.2) against last OJS last stable (3.1.2-2) and when clicking in "settings" I got this error:
Failed Ajax request or invalid JSON returned.
On log I can read the following:
[Tue Sep 17 00:13:11.776847 2019] [php7:warn] [pid 652] [client 93.176.187.155:57510] PHP Warning: Declaration of EmbedGalleySettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/html/plugins/generic/embedGalley/EmbedGalleySettingsForm.inc.php on line 76, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website
[Tue Sep 17 00:13:11.777242 2019] [php7:warn] [pid 652] [client 93.176.187.155:57510] PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/embedGalley/templatessettingsForm.tpl in /var/www/html/lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website
[Tue Sep 17 00:13:11.777493 2019] [php7:error] [pid 652] [client 93.176.187.155:57510] PHP Fatal error: Uncaught --> Smarty: Unable to load template 'app:plugins/generic/embedGalley/templatessettingsForm.tpl' <-- \n thrown in /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website
Please, let me know if you need more info.
Thanks for your work,
m.
@ajnyga @asmecher
hi developer can you see this link .
Vitaliy-1/JATSParserPlugin#72 (comment)
all problem elaborating their
Hi, I upgraded ojs to version 3.1.1 and this plugin is not working anymore.
No errors in log and no errors in browser.
Some idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.