You’ll need to change the configuration of the HTML Purifier filter that we use to limit the HTML that users can enter in user-specified fields – but be warned that this is a big security risk, because the same HTML codes that permit Youtube embedding can be used to create phishing attacks. I’d recommend dropping a plain old link to the Youtube video into the abstract field instead.
Public Knowledge Project Team
I would like to recieve help with an issue. I want to add and embedded video to my ojs page I dont know how to do it i want to look as the picture attach where the video is in the content please help me with this issue i really appreciate or maybe if there is a way to put a video of my own with any extension like .mp4 or mp3 etc
In OJS 126.96.36.199, I was able to have an embedded YouTube video appear in the right sidebar of the the journal by creating a Custom Block that contained only the iframe embed code (Settings > Website > Plugins > Generic Plugins > Custom Block Manager), then adding that Custom Block to the sidebar using Settings > Website > Sidebar management.
You can also add the embed code to the HTML of the Additional Content (Settings > Website > Appearance > Additional Content) that appears on the journal’s Home page.
I understand that the HTML Purifier filter would keep the embedded video from displaying when embedded in the abstract, but why isn’t it working when I add the embed code as a file following the instructions linked above? Does the HTML Purifier filter prevent that from displaying, too?
The old instructions describe adding a new galley to the article to embed the video. It sounds like you want the video to display on the article’s landing page. You could either add this embed into the article’s abstract (if it works in the Custom Block Manager or the Additional Content, it should work in the Abstract as well), or you could display the galley inline within the article’s landing page. This, I think, would take a theme modification.
Correct, I want the video to display on the article’s landing page. It appeared to us that if we followed the old instructions, the video would be displayed in place of the galley on the article landing page. Not true?
Re: Embedded video in Abstract:
The embedded video displays in the Abstract within the Submission pages, but it doesn’t show up in the Abstract on the article’s landing page once it’s published, so I would assume that’s because we haven’t allowed it in the HTML Purifier filter.
Are there any themes that already have this modification to display embedded video on the article landing page?
Also, metadata folks, is it against best practices to add an embedded video link to an Abstract, especially one that would be picked up by Google Scholar and other web crawlers?
The instructions in the PDF do seem to suggest that, but I don’t think it would have worked that way. I’m pretty sure the first screenshot is of an inline HTML galley, not of the article landing page.
There is a similar thread on displaying PDF galleys inline here:
I’ll invite @vgabler, @israel.cefrin and @AhemNason to comment on the metadata best practices of embedding video in the abstract. As a note, there were some interesting conversations at the Pittsburgh Sprint this summer on not just seeing articles as text/paged content, but rather enabling articles as linked data visualizations, which might be relevant.
I was reading this thread, and just to check if I understood correctly. You want add video link on article abstract that are a support content or the abstract content itself (https://www.nrcresearchpress.com/page/authors/services/videos) ? Or both?
On former I would recommend to keep using galley also, on later I don’t think you need a galley for that, but you may use though.
I wouldn’t say that it is against best practices to use multimedia content on abstracts, however I would keep mind some points:
Is this platform where my video is hosted reliable? DoI have a fallback or a backup in case the video platform shuts down?
If it is a support content , shouldn’t it be also included as a specific galley?
Does my video have transcription (C/C) available? And it is possible to make it available to download and/or crawl?
Even though adding or embedding a video on article abstract may represent no harm to metadata best practices, I think it is need to be clear what is the purpose and how make it more accessible/usable and perennial also.
In the HTML galley, the video or audio is embedded using the iframe snippet. We use that alternative HTML galley plugin (GitHub - ajnyga/embedHtmlArticleGalley). Also we decided to embed from an external provider (Vimeo) because 1) OJS is not made for streaming videos (stream is interrupted due to way how file transport is implemented) and 2) the media files would take up too much space on our server.
Since the idea was very interesting for me, I tested it on a test journal, embedded a Youtube video on different sections of the journal, and in article abstract too.
Although I added iframe to the allowed html tags, I couldn’t get success. I don’t know if I should add any script to the header for a Youtube video.
Here is the link to the journal https://www.citymedicaljournal.xyz/ajt/index
Actually, this solution is not related to OJS, but is related to hosting company and CDN service.
Cloudflare is Cloud Network Delivery (CDN) provided by my hosting company. They provide cashing and delivery optimization, and fortunately, they also provide different apps within the account, which integrate into the output OJS code when accessing the site over the CDN. I installed “Add HTML” app, inserted YouTube embed code, and set on which pages and where on the page I want it to appear. It was straightforward and it worked nicely. Nevertheless, my YouTube video won’t appear if the website is accessed bypassing the CDN, i.e. directly on server. I also added social media icons and “to top” button in the same way.
Just of note, embedding videos in the custom blocks works directly within OJS (I have one such video in my sidebar).
See the sidebar video embedded in OJS custom block here: www.bjbms.org
I see this discussion is almost 6 years old and with no solution. So my question is: what should I modify and where, to enable embeds on the abstract, so the video (youtube, vimeo) shows in the article landing page?
With regard to the actual security vulnerability which embedding video in the abstract field raises, how great a risk is this, realistically, especially given that video embedding is fairly commonplace on other editable sites? What is the extent of that vulnerability as far as OJS is concerned?
If one were to take the risk suggested, what steps would be necessary to mitigate or lesson the vulnerability whilst allowing videos to be embedded?