Error YouTube Device Support on Phpfox

0 votes
I'm using video module on phpfox to share youtube video. But recently, it get all videos as Device Support

Please help
asked May 25, 2015 by super (900 points)

1 Answer

0 votes

If you need help from our expert to fix this issue, just hire us here: Try our Web expert service 

Or You can do following steps yourself:

 # Open file: /module/video/include/service/grab.class.php
 # Look for:


 if (strpos($sUrl, 'youtube') || (preg_match('/http:\/\/youtu\.be\/(.*)/i', $sUrl, $aMatches) && isset($aMatches[1])))
 {
 $this->_aRegex = false;
 $this->_aSites = $this->_aSiteCache;
 if (isset($aMatches) && $aMatches[1])
 {
 $sUrl = 'http://www.   youtube.com/watch?v=' . $aMatches[1];
 }
 }

  


 # Replace with:
 if (strpos($sUrl, 'youtube') || (preg_match('/(http|https):\/\/youtu\.be\/(.*)/i', $sUrl, $aMatches) && isset($aMatches[2])))
 {
 // $this->_aRegex = false;
 $this->_aSites = $this->_aSiteCache;
 if (isset($aMatches) && $aMatches[2])
 {
 $sUrl = 'http://www.  youtube.com/watch?v=' . $aMatches[2];
 }
 } 

 

answered May 25, 2015 by vinhvinh (570 points)
edited Jun 1, 2015 by super