Embedding video in abstract

Hi i have used HTML function in the abstract box to add embedded YouTube video of an performance research project. It shows up in the metadata as working but when i go to preview the article it doesn’t show up. i tried adding a link to the YouTube clip but it wouldn’t hyperlink the url either.
Any help would be appreciated. Using OJS 2.4.6.0

Hi @Helen_LH,

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.

Regards,
Alec Smecher
Public Knowledge Project Team

hi @Helen_LH @asmecher
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 Sin%20t%C3%ADtulo

You can find additional details on the HTML Purifier modification which Alec mentions here:

I see this question is also cross posted here:

Let’s keep the discussion to a single thread.

In OJS 3.1.1.2, 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 have a solution for making an embedded video appear in the sidebar of the journal, but I am still having problems making an embedded video appear on the article landing page, along with the Abstract, etc. I followed the steps in https://pkp.sfu.ca/files/embedding_ojs.pdf, which I understand was written for an older version of OJS, but it doesn’t show the video until someone clicks on the link (see The Future of “Disability:” The Evolution of the Concept and the Experience | Focus on Exceptional Children). Is there any way to make this work?

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.

Hi @mreedks

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:

  1. Is this platform where my video is hosted reliable? DoI have a fallback or a backup in case the video platform shuts down?
  2. If it is a support content , shouldn’t it be also included as a specific galley?
  3. 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.

Best,
Israel

We have a journal that once produced a multimedia issue (see e.g. Anzeige von «Der Ausdruck, dass da nichts ist auszudrücken, nichts womit auszudrücken, kein Verlangen auszudrücken, zusammen mit dem Zwang auszudrücken.» Beckett, Übertragung pur. | Journal für Psychoanalyse for an article).

Hi @ctgraham,

Is it possible to insert the embedding code in abstract field directly in the database? Would that bypass HTML Purifier filtering?

Thank you,
Faruk

My understanding is that HTML Purifier is an output filter, rather than an input filter.

I managed to embed videos on my website using Cloudflare services, which enables additional code or website functionalities to be inserted by the CDN (Cloudflare) itself.

Yes, using a scripted solution and embedding the script into the customHeadersPlugin would be a way to modify the page content, bypassing any HTMLPurifier restrictions.

Can you describe your process more fully here, so that others can replicate it if they want to?

Hi,
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
Regards.
Annotation 2020-07-01 190432

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

See the video embedded with Cloudflare on article page here: Surgical anatomy of microsurgical 3-level anterior cervical discectomy and fusion C4–C7 | Bosnian Journal of Basic Medical Sciences

1 Like

The video on that page seem to be placed / embedded into a seperate page instead of the article abstract.
But the video abstract on Surgical anatomy of microsurgical 3-level anterior cervical discectomy and fusion C4–C7 | Bosnian Journal of Basic Medical Sciences is just the successfull form of my attempt.
The video didn’t display when I directly inserted the Youtube video embedding code (iframe) to the abstact field. The video plays in the backend administration pages, but not on the frontend. Since html code is displayed on the article abstract, I assume that any kind of video may be played when the html filters are properly adjusted on that field. I will go on watching this topic.
Regards,

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?

Hello,
The video uses the “Clouflare app” application (Cloudflare Apps).
You can search for a YouTUbe or Vimeo video to embed. Then paste the embed code where you want it to appear.

Finally you can generate the HTML code that Cloudflare gives you and embed it in the Abstracts

1 Like