Reading an html galley, and displaying below abstract - Plugin

You already have almost ready code from @ajnyga`s EmbedGalley plugin. There is nothing really think about. Just change XML to HTML galley and delete unnecessary parsing.

I have seen that code.

I have tried that, but for some reason it was not working at the time. Also, I did not want to show all the article immedicately with the abstract, but have a button to display the whole article on demand.

I might reconsider my approach, but will speak to my colleagues first.

stephen

1 Like

Hi,

At the University of Bordeaux, we host several journals in different scientific fields. We are still in version OJS 2.4.7. We made specific developments to meet their expectations.
For the article page, we developed a more modern display of the style of Plos One journals with several tabs (article, author, supplementary files, metrics) with title, type of article, Author(s), important article dates (Received, Accepted, Published), Abstract, References and the article body displayed with some features: references with a tool-tip with details linked with the displayed metadatas references, a certain display to highlighting figures and tables.
It looks like the HTML page of @Vitaliy journal.
To do that, we integrated bootstrap, created specific “js” and “css” files and changed the template article.tpl file.
We displayed some datas from metadatas as title, type of article, Author(s), Abstract, References. And we displayed article body by displaying content of HTML Galley. So we built this HTML Galley in the way we would like to display it without metadatas and with classes and features which will be defined in “js” and “css” files.
We wanted to display directly content of HTML galley in article page but for others galleys (as PDF and XML), we wanted to display a download link.

We are studying now migration to OJS3.
We don’t find in OJS3 some functions of OJS2 to display HTML and PDF galleys the way we want (Content for HTML galley and download link for others galleys. Those missing functions are for example: isHTMLGalley(), getHTMLContents(), isPdfGalley().

I already posted a topic for this subject.

@asmecher answered me there is no more specific HTML vs. PDF functions in OJS3; they’re hoping to improve the breadth of formats supported using plugins.
He suggested me to have a look at the plugins providing visualizations for the various file types, such as plugins/generic/pdfJsViewer for PDF galleys and plugins/generic/htmlArticleGalley for HTML galleys.

But I don’t find how to use HTML Article Galley plugin to do what we want to do. We would like to display in the main article page (templates/frontend/objects/article_details.tpl):

  • metadatas: Author(s), Abstract, References
  • content of HTML Galley

It’s like on @Vitaliy journal with one step less. We want to have HTML galley content in the article/view/XX page and not to have to click again on a HTML button to access to the HTML page such as article/view/XX/YY. Here is an example.

When I read your discussion, it seemed to me that it was on the same topic.
Can you give me some suggestions ? And can you send me concrete examples of code that you integrated ?

Thanks in advance for your help and your answer.
Helene

Yep, I also encountered that problem. I opened the issue on github: Strange behavior when using 2+ plugins with the same hook · Issue #2527 · pkp/pkp-lib · GitHub
In short: there is a conflict when 2 plugins are using the same hook (in this case recommend by author plugin).

I have resolved it using another hook, that no other plugin have used: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L30

Or you can disable recommend by author plugin.

Yep. That’s what I am doing now. I have already developed a plugin to parse JATS XML and display it on article detail page (just below the abstract). There was not any serious problems in integration with OJS3. And you can create exactly the same design like on your link (really great look! :slight_smile: ).

I am just on stage of front-end developing now. Plugin is here: GitHub - Vitaliy-1/JATSParserPlugin: OJS3 Plugin for parsing JATS XML and displaying it on article detail page
You can find more info about it in this topic: Plugin for displaying JATS XML on article detail page under abstract for OJS3+

I am planning to finish the design on the next 2-3 weeks, and will be able to show a link to how it all looks like. It mostly the same like in your journal - tabs for article, metrics, info, links to PDF, XML etc

If you are interested in publishing XML with automatic conversion to HTML on article detail page you can use this plugin. It needs only front-end design.

1 Like

Also we are changing tpl files in our child theme: article_detail.tpl, article.tpl. I will show them once the work will be done.

1 Like

Hi @Vitaliy,

Thanks for your answer.

We will be indeed interested in a near future in publishing XML with automatic conversion to HTML on article detail page.

But for now, revues are generating HTML file and deposit it as HTML Galley. That’s why we would like to display the content of this HTML Galley in the article_detail.tpl template in OJS3 like we are doing now in OJS2 in article.tpl template with the getHTMLContents() function that no longer exists in OJS3 except in the HTML Article Galley plugin. But I don’t know how to use it in a specific theme directly on the article_detail.tpl template.

I will have a look on what you did.
Helene

The idea is simple. In the template files you can find hooks, special places where code from a plugin can be inserted. All articles are objects, so in my case I simple call an instace of Article class, retrieve XML, parse it and display as HTML through hook in article_display tpl. So there isn’t any problems to retrieve pdf, html, pdf galley or any other article data from Article so. Although I am not a PHP expert, programming is only my hobby :slight_smile:

I did that. USING PHP7. Still the plugins page is ever loading.

I have finally managed to do something of the sort.

have a look at mmsjournal.org.

I simply save the html full article as a separate file, with tables, images and image headings separately. I will post my code shortly as a plugin, hopefully, once I settle some issues

Stephen

have a look at mmsjournals.org

We also do not use JATS, but rather word, so i convert that to html (do not use word for this!!! I use a online doctohtml convertor )

It is still a lot of work, as i need to go through all the text. On the other hand, I have made some fine-tuning. For instance, hovering on a reference brings up a popup.

if you like it i can share the code

Stephen

1 Like

Did you ever manage to create a plugin to achieve this? It seems like something there would be a lot of demand for!

I actually have done something. However, it demands some ‘pre-publishing’ work. For instance, the word document needs to be converted to html, images should not be placed in the file, but placed as galleries, same thing for tables (if you wish so)

Have a look at www.mmsjournals.org: there are two journals, both have the same format.

Should there be enough demand, then I will release it on github, but as an as-is format, as I am still trying to figure out other plugins.

Stephen