Elxis CMS Forum
Support => General => Topic started by: rentasite on April 18, 2010, 14:04:17
-
Hi,
what i realized is that, Youtube/Google videos published on Elxis Content show perfect on mobile devices (iphone, ipod exc), but the same videos published on Elxis eBlog do not show at all.
Can someone plz confirm?
-
Check how the videos inserted, html code of the video is the same ?
-
I made a comparison. Tried a replacement, but did not work.
This is the youtube bot - Replacer code
function elxYouTube_replacer ( &$matches ) {
$videoid = $matches[1];
$out = "<object width=\"425\" height=\"350\">\n";
$out .= "<param name=\"movie\" value=\"http://www.youtube.com/v/".$videoid."\"></param>\n";
$out .= "<param name=\"wmode\" value=\"transparent\"></param>\n";
$out .= "<embed src=\"http://www.youtube.com/v/".$videoid."\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed>\n";
$out .= "</object>\n";
return $out;
And this is the Replacer code - for eBlog
static private function youTube_replacer(&$matches ) {
$videoid = $matches[1];
$out = '<div>'._LEND;
$out .= '<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0">'._LEND;
$out .= '<param name="movie" value="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0" />'._LEND;
$out .= '<param name="wmode" value="transparent"></param>'._LEND;
$out .= '<param name="allowFullScreen" value="true" />'._LEND;
$out .= '</object>'._LEND;
$out .= '</div>'._LEND;
return $out;
::) :-\
-
make an other try by removing the 2
$out = '<div>'._LEND;
-
I tried it right now, Niko. No it does not solve the problem.
and it also spoils the right column of the site.
-
One last try from me:
static private function youTube_replacer(&$matches ) {
$videoid = $matches[1];
$out = '<div>'._LEND;
$out .= '<object style="width:425px; height:350px;" data="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0">'._LEND;
$out .= '<param name="movie" value="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0" />'._LEND;
$out .= '<param name="wmode" value="transparent"></param>'._LEND;
$out .= '<embed src=\"http://www.youtube.com/v/".$videoid."\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed>._LEND;
$out .= '</object>'._LEND;
$out .= '</div>'._LEND;
return $out;
-
Nope. Blank page.
i have tried from yesterday lot's of combinations, but no.... does not work.
-
YouTube APIs + iPhone = Cool mobile apps
http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile-apps.html
How To Play YouTube Videos Within an Application
http://iphoneincubator.com/blog/audio-video/how-to-play-youtube-videos-within-an-application
We must insert an if - else on the youTube_replacer function.
-
Thanks to WebGift, the function is working 99% perfect! :D
I must say, that everything started from this reference: http://learningtheworld.eu/2009/youtube-embed/
Notice: The only disfunction is that... when watching the video and clicking "DONE" on the player... it does not return you back to the previous web page, but personally i do not care.
eBlog now can show smoothly ...Youtube videos on iPhone, iPad and iPod touch. Thanks Stavro ;) ;)
/********************/
/* YOUTUBE REPLACER */
/********************/
static private function youTube_replacer(&$matches ) {
$videoid = $matches[1];
$out = '<div>'._LEND;
$out .= '<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/'.$videoid.'" width="480" height="360" />'._LEND;
$out .= '<param name="movie" value="http://www.youtube.com/v/'.$videoid.'" />'._LEND;
$out .= '<param name="quality" value="high" />'._LEND;
$out .= '<param name="allowFullScreen" value="true" />'._LEND;
$out .= '<a href="http://www.youtube.com/watch?v='.$videoid.'" />'._LEND;
$out .= '<img src="http://img.youtube.com/vi/'.$videoid.'/0.jpg" width="480" height="360" /></a>'._LEND;
$out .= '</object>'._LEND;
$out .= '</div>'._LEND;
return $out;
}
-
Nothing Spiro!!! my pleasure.!!! ...
It will to it to work 100%. ;)
Don't tell you 101% ;D ;D
we must edit to close the <a .... the
$out .= '<img src="http://img.youtube.com/vi/'.$videoid.'/0.jpg" width="480" height="360" />'._LEND;
with
$out .= '<img src="http://img.youtube.com/vi/'.$videoid.'/0.jpg" width="480" height="360" />..</a>'._LEND;
-
@ElxisTeam
Can this be part of the 2009.2 & 2011 ?
-
Done Stavro. But no, that's not the problem.
updated the above code, also.
-
Your mobile needs the <embed> tag, that's why the video does not play in eBlog.
I will use copy-paste the standard YouTube's code.
<?php
/********************/
/* YOUTUBE REPLACER */
/********************/
static private function youTube_replacer($matches ) {
$videoid = $matches[1];
$out = "<div>\n";
$out .= '<object type="application/x-shockwave-flash" style="width:480px; height:360px;" data="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0">'."\n";
$out .= '<param name="movie" value="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&rel=0" />'."\n";
$out .= '<param name="wmode" value="transparent" />'."\n";
$out .= '<param name="allowscriptaccess" value="always" />'."\n";
$out .= '<param name="allowFullScreen" value="true" />'."\n";
$out .= '<embed src="http://www.youtube.com/v/'.$videoid.'&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="360"></embed>'."\n";
$out .= "</object>\n</div>\n";
return $out;
}
?>
-
Confirmed and Solved 100%
For future reference: Use the code above from datahell.
Thanks!! 8)
-
Finally ok everything's fine. ( Τέλος καλό όλα καλά )!!!
If i had had an iphone then i would have helped 100%.!!! :(
-
Time to get one. Mobile is the future ;)