I’m graphic designer and I’m working on a new theme for OJS 3.1.X, but i would like it compatible with JATS Parser plugin (from @Vitaliy)
Does anybody knows:
- which themes are compatibles with JATS Parser?
- where can I found some demos of these themes?
thanks a lot in advance
@NateWr @Vitaliy @asmecher any comments about this?
Hi @psanso and @marc,
JATS Parser Plugin works on Bootstrap but doesn’t download it itself, so any theme that uses Bootstrap would support this plugin, e.g. Classic, Immersion, Health Science theme. If the aim is to show JATS as HTML on article landing page rather than on separate galley page, the solution is more complex, example: GitHub - Vitaliy-1/oldGregg: Theme for OJS 3 with Bootstrap 4
Thanks for your answer and sorry for the lag.
Yes, the idea was showing JATS as HTML like you are doing in oldGregg.
I always thought it was the aim of the JATS Parser… but looks like I’m missing something here. I mean, in my mind JATS Parser is doing the transformation work and add extra templates so every theme was able to show new templates with it’s own taste (css and so on)… keeping presentation and logic layers separated.
Is not the way it works?
It’s time to develop our own institutional theme and we don’t know what theme to use as a base.
JATS Parser plugin v 1.0 had added Smarty templates. But it’s not the case for the v. 2.0 anymore. It is possible to return to this practice, I need more consideration here (pros and cons).
The input for JATS Parser is JATS XML. The intermediate output is a representation of the article in the plain PHP objects. The output is PHP DOMDocument, where I retrieve HTML with a simple method. I need this format because it’s passed to the TCPDF library for additional conversion to PDF.
So, if someone needs Smarty templates rather than DOMDocument, inside main theme class it should be something like:
require_once __DIR__ . '/path/to/jatsParser/library/vendor/autoload.php';
use JATSParser\Body\Document as JATSDocument;
* @var $jatsDocument JATSDocument object representation of JATS XML document
$jatsDocument = new JATSDocument("example.xml");
* @var $smarty TemplateManager
All content from the $jatsDocument could be than in the Smarty template retrieved with setters.
Does it make sense?
Any theme or child theme that uses Bootstrap 4.1+ is appropriate. I’ll definitely rewrite the code without Bootstrap some time in the future. From the official themes, it can be Classic, HealthSciences and Immersion theme. If you like another one, simply create a child theme and add Bootstrap’s JS and CSS (or SCSS).
I have added links to the themes I’ve mentioned: Theme gallery for OJS 3.x - #4 by marc
But they should be available and through Plugin Gallery.