youtube Addon

#CMSimple $output=cms_youtube('video_id');#

#######################
#
#  Youtube Addon V0.1
#
# very easy function...
#
#######################
#
##--[OPEN]-------------
#
 
/cmsimple/functions.php
 
#
#--[FIND]--------------
# last Line

?>
 
#
#--[Before ADD]---------
#

// UTAKA'S Functions ver0.1
// Use within content
// http://www.youtube.com/watch?v=video_id
// #CMSimple $output=cms_youtube('video_id');#
//
function cms_youtube($vid) {
   global $u, $c, $s;
    $out='<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/';
    $out.=$vid;
    $out.='&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/';
    $out.=$vid;
    $out.='&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>';
 
   return preg_replace("/".chr(35)."CMSimple.*".chr(35)."/Uis",$out,$c[$s]);
}
 
###############

Demo&Sample

back to addons

~~DISCUSSION~~

addons/youtube.txt · Last modified: 2018/04/05 14:48 (external edit)
Webdesign: NMuD chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0