Hi,
instead of posting a link for video, I want customer see the video and just click "play" to watch the tutorial.
Please advise if possible
How Can I add Video on Knowledge base
Moderator: mkoch227
Re: How Can I add Video on Knowledge base
There is a "HTML" button allowing you to modify article source code directly.
For example to show a Youtube video, you can add such an iframe:
For example to show a Youtube video, you can add such an iframe:
Code: Select all
<iframe width="330" height="240" src="http://www.youtube.com/embed/9ZIrYLiv9lI" frameborder="0" allowfullscreen></iframe>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: How Can I add Video on Knowledge base
i used jvideo.com for my local videos
Re: How Can I add Video on Knowledge base
The solution provided here is only a partial solution - because once submitted cleanup is done within the 'admin/manage_knowledgebase.php' file - and no amount of tinkering with the javascript function tinyMCE.init was seemingly able to let me save a kb article with an embedded video.
The knowledge base article is 'cleaned' using the HTMLpurifier library with default settings:
This has the effect of removing your iframe and it took me quite a while late last night to work out that this was the problem, not the original tinyMCE issue.
So - my fix was to alter 'admin/manage_knowledgebase.php' to allow iframe embeds of videos, but only from vimeo + youtube - my code is now:
Voila - I can now save KB articles with youtube/vimeo videos. My hint came from a lot of searching and the solution eventually 'clicked' after reading section 4.3 of the HTMLPurifier installation guide:
http://htmlpurifier.org/live/INSTALL
I hope this helps - and would encourage the Hesk developer teams to incorporate limited embeds within the next release, and possibly upgrading tinyMCE to the latest version with a customizable editor for admins to set different editors for our staff members.
The knowledge base article is 'cleaned' using the HTMLpurifier library with default settings:
Code: Select all
// Clean the HTML code
require(HESK_PATH . 'inc/htmlpurifier/HTMLPurifier.standalone.php');
$purifier = new HTMLPurifier();
$content = $purifier->purify($content);
So - my fix was to alter 'admin/manage_knowledgebase.php' to allow iframe embeds of videos, but only from vimeo + youtube - my code is now:
Code: Select all
// Clean the HTML code
require(HESK_PATH . 'inc/htmlpurifier/HTMLPurifier.standalone.php');
$config = HTMLPurifier_Config::createDefault();
//allow iframes from trusted sources
$config->set('HTML.SafeIframe', true);
$config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo
$purifier = new HTMLPurifier($config);
$content = $purifier->purify($content);
http://htmlpurifier.org/live/INSTALL
I hope this helps - and would encourage the Hesk developer teams to incorporate limited embeds within the next release, and possibly upgrading tinyMCE to the latest version with a customizable editor for admins to set different editors for our staff members.
Re: How Can I add Video on Knowledge base
This used to work before 2.6.8 when HTMLPurifier was implemented.
Thanks for sharing your solution. The video embedding will indeed be supported back in 2.7.0 using a custom filter (to also allow properties such as allowfullscreen).
Thanks for sharing your solution. The video embedding will indeed be supported back in 2.7.0 using a custom filter (to also allow properties such as allowfullscreen).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: How Can I add Video on Knowledge base
Thank you for the info Klemen!