I have tried every which way and I cant get a video I've uploaded to play in a blog post. The embed code gets mangled even if I put in as source. It plays fine in the video section.
Surely it would make sense to be able to select videos and pictures from your own albums to put into bogs?
Can anyone help please?
Cust.
|
The issue is with the tinyMCE editor most likely. Also, the embed code is still using object; there is a ticket on github to replace the embed code. I have not looked at this but I will see if I can. Been rather busy of late. I think the new TinyMCE supports the video tag but I think I heard that htmlpurifier strips it out and that was one of the bug fixes in the new 7.3.2. Geeks, making the world a better place |
I am running 7.3.2 and it still does not work. The htmlpurifieris still stripping bits of the code. |
Here is what is lurking in the EMBED box on the video page:
<object style="display: block;" width="100%" height="400"> <param name="movie" value="https://www.mysite.com/dolphin/flash/modules/global/app/holder_as3.swf" /> <param name="allowScriptAccess" value="always" /> <param name="allowFullScreen" value="true" /> <param name="base" value="https://www.mysite.com/dolphin/flash/modules/video/" /> <param name="bgcolor" value="FFFFFF"< target="_blank" />#FFFFFF" /> <param name="wmode" value="opaque" /> <param name="flashVars" value="url=https://www.mysite.com/dolphin/flash/XML.php&module=video&app=player&id=1&user=&password=" /> <embed src="https://www.mysite.com/dolphin/flash/modules/global/app/holder_as3.swf" type="application/x-shockwave-flash" width="100%" height="400" allowscriptaccess="always" allowfullscreen="allowfullscreen" base="https://kwww.mysite.com/dolphin/flash/modules/video/" bgcolor="<a href=" https:="" www="" my="" site="" dolphin="" searchkeyword="" php="" keyword="FFFFFF"" target="_blank" />#FFFFFF" wmode="opaque" flashvars="url=https://www.mysite.com/dolphin/home/flash/XML.php&module=video&app=player&id=1&user=&password=" /></object>
I've added some of the line breaks and changed the site name. I've highlighted in red where it's messed up. If I do my own "purify", tidying up those line, it works! Now where do I need to make changes so that the EMBED code doesn't mess up.
I can see there is a LocalMovie HTMLPurifier but I can't work out where and when it is called.
|
What you want to do is to change the object code to an iframe code. You also need to change the embed code that Dolphin generates but Boonex will be fixing that. Check GitHub to see if it has already been fixed; if so, then you could grab the changes from GitHub.
You need to add a condition to the html purifier so it won't strip out your iframe code. I wrote a tut on this so I will look it up and paste the link. You can work off of the YouTube one that comes with Dolphin to get an idea. You create your iframe condition and then add it to the list for htmlpurifier.
Geeks, making the world a better place |
Take a look at this https://www.boonex.com/forums/topic/HTMLpurifier-adding-other-iframe-conditions-.htm
Scroll down the page to find the info you need. As I said, the object code needs to change as well; I pointed out where it is generated in another post so will look for that as well; can't remember all this stuff off the top of me head, just too many scripts to keep track of.
Also, htmlpurifer is just for the front end; but then that is where your members will be using.
Geeks, making the world a better place |
Look at this: Go to /modules/boonex/video/classes/BxVideoConfig.php, edit line 50 and change to YouTube iframe code.
I think that is also for videos that get uploaded to the site and not just YouTube embeds but I have not checked. If not, then just search the code.
Geeks, making the world a better place |
I read somewhere else that even though TinyMCE supports the video tag, htmlpurifer is stripping it out. That is also a ticket. I am not sure when htmlpurifer was updated in Dolphin, might be time if it has not already been done. Geeks, making the world a better place |
Worked out it was the bgcolor that purifier really didn't like so I've stripped it out of the embed code that is being generated. At least I know it now works while I go and have a look at the tutorial.
Thank you geek_girl.
|
I couldn't get the purifier to ignore the bgcolor no matter what I added. In case anyone is interested in my quick fix...
In flash\modules\global\inc\content.inc.php replace the sections that populate the $aFlashVars, $aObjectParams and $aEmbededParams with the following:
$aFlashVars = array(); foreach($aConfig['flashVars'] as $sKey => $sValue) { if (strcmp($sKey, 'bgcolor') !== 0) { $aFlashVars[] = $sKey . '=' . $sValue; } } $aConfig['params']['flashVars'] = implode('&', $aFlashVars);
$aObjectParams = array(); $aEmbedParams = array(); foreach($aConfig['params'] as $sKey => $sValue) if (strcmp($sKey, 'bgcolor') !== 0) { $aObjectParams[] = '<param name="' . $sKey . '" value="' . $sValue . '"></param>'; $aEmbedParams[] = $sKey . '="' . $sValue . '"'; }
|