<?php
/**
 * YouTube 変数
 */
require_once 'Platy/CVar.php';

class Platy_CVar_YouTube extends Platy_CVar
{
    function install() { return true; }
    function uninstall() { return true; }
    
    public function getSummary()
    {
        return 'YouTube動画の表示';
    }
    
    public function doCVar($param)
    {
        $id = $param[0];
        if ($id == '') { return; }
        
        echo '<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/' . $id . '&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $id . '&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>';
        echo "\n";
        return true;
    }
    
    public function getVersion()
    {
        return '0.0.0';
    }
    
    public function getAuthor()
    {
        return 'altkraft';
    }
}
?>
