I tried adding youtube video to an announcement in my ojs 3.0 installation.
The problem is that I can clearly see the frame (and video) in the “editing window” of an announcement in my administration panel, but it is not visible in the main webpage.
now the htmlpurifier library:
open the following file on the editor using a command: $ pico /lib/pkp/classes/core/PKPString.inc.php
and find the line with htmlpurifier (using ctrl+W and writing htmlpurif)
edit the entry to contain these two lines: $config->set('HTML.SafeIframe', true); $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo // This line is important allow iframe in allowed elements or it will not work
This worked for me. So there you have an updated tutorial how to include iframes.
REMEMBER THAT THESE ARE UNSAFE though.
@ceperlan, since this question isn’t directly related to enabling iframes in OJS 3.x, please post it as a new forum topic. That will helps others find the question and the answer(s).