HTML-files and photos in OMP

Dear all,

We’re wondering if it’s possible to upload HTML-files to OMP. At the moment we can only upload documents that are saved on the computer, such as PDF.

Furthermore, we’re looking for a feature with which we can protect individual photo’s in our monographs from being downloaded.

Does anyone know something about one of these two topics? We’re very interested to learn more.

Kind regards,
Ineke

Hi @iwvisser,

OMP doesn’t currently support HTML, but that functionality could be added relatively easily by porting the HTML Galley plugin over from OJS.

Can you describe how you want to protect images from download? How would they be published?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher,

Is it possible to upload a book in html format in versions 3.0? I activate this plugin ## plugins.generic.htmlMonographFile.displayName ## but I don’t see where it is.

Thank you.

Hi @InfoDocu,

HTML-based publishing is supported in OMP starting with version 3.1.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Yes, but if I activate this plugin in versions 3.1 or higher, should the HTML format appear here, right? What could be wrong?

Thanks

Hi @InfoDocu,

No, just choose Digital; when the file is uploaded, OMP should detect that it’s an HTML file automatically and treat it accordingly.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, I upload a file with html extension in Digital but when viewing it on the web it only allows me to download it. It should be able to be visualized on the web, right?

Thanks.

HTML

Hi @InfoDocu,

What do you see for the file_type in the submission_files database table for that file?

Regards,
Alec Smecher
Public Knowledge Project Team

The file_type is text/html.

Does file HTML must respect some requirements?

Hi @InfoDocu,

That’s as it should be… What specific version of OMP are you using?

Regards,
Alec Smecher
Public Knowledge Project Team

The version is 3.2.0.3. I describe the process in case it helps:

  • I activated the plugin ## plugins.generic.htmlMonographFile.displayName ##

  • In Submissions > Archives I have chosen a book already published, then

Publication
New version
Publication formats
Add publication format
Digital (Name + OK)
Change file (1Upload file, 2. Review Details and 3. Confirm)
Finally I have approved everything and chosen in Open access
Publish

1 Like

Hi @InfoDocu,

What do you get for the following database query?

SELECT * FROM versions WHERE product='htmlMonographFile';

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @InfoDocu,

Hmm, that appears to be fine as well. At this point you might need to go into plugins/generic/htmlMonographFile/HtmlMonographFilePlugin.inc.php and add some error_log functions to indicate where the code is executing and where it’s not. You’ll see, for example…

if ($submissionFile && $submissionFile->getFileType() == 'text/html') {

This is the part that checks to see whether the file type is HTML as expected, and if so, it attempts to present the file as HTML. I’d suggest adding an error_log call above this, to see whether the code is executing this far, and another after to determine the result of the check.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

The plugin has started to work successfully. I did nothing. I don’t know what happened, witchcraft? cache? Haha

Thanks for helping me these days. If it happens again I will use error_log.

Hi @InfoDocu,

All techonology is fundamentally cursed, so yes, I think witchcraft is likely. Glad to hear it’s working.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes