Bu eklenti sayesinde blogger yorum formlarında youtube videolarını paylaşabilir ve aracı bir bağlantı olmadan izleyebilirsiniz. Demo için yorum bölümüne bakabilirsiniz.
Hemen kuruluma geçelim.
Öncelikle şablon bölümünden HTML düzenle bölümüne giriyoruz ve
kodunu buluyoruz. Daha sonra bu kodun hemen üstüne
kodlarını ekliyoruz.
Kullanım şekli: [youtube][/youtube] kodları arasına video adresini yazmak.
Hemen kuruluma geçelim.
Öncelikle şablon bölümünden HTML düzenle bölümüne giriyoruz ve
Kod:
</body>
kodunu buluyoruz. Daha sonra bu kodun hemen üstüne
Kod:
<script type='text/javascript'>
//<![CDATA[
function replaceText(){if(!********.getElementById){return;}
bodyText = ********.getElementById("comment-holder");
theText = bodyText.innerHTML;
theText = theText.replace(/\[img\].*?'.*?\[\/img\]/gi, "");
theText = theText.replace(/\[youtube\].*?'.*?\[\/youtube\]/gi, "");
theText = theText.replace(/\[img\]/gi, "<div style='clear:both'></div><img style='float:left;margin: 3px 0px 5px;border:1px solid #DDD;max-width:98%;background:#FFF;padding:4px' src='");
theText = theText.replace(/\[\/img\]/gi, "'/><div style='clear:both'></div>");
theText = theText.replace(/\[youtube\]http:\/\/youtu.be/gi, "<p style='margin: 5px 0px'><iframe width='480' height='360' src='http://www.youtube.com/embed");
theText = theText.replace(/\[youtube\]http:\/\/www.youtube.com\/watch\?v=/gi, "<p style='margin: 5px 0px'><iframe width='480' height='360' src='http://www.youtube.com/embed/");
theText = theText.replace(/&feature=/gi, "?rel=0' '");
theText = theText.replace(/\[\/youtube\]/gi, "?rel=0' frameborder='0' allowfullscreen></iframe></p>");
bodyText.innerHTML = theText;
}replaceText();
//]]>
</script>
kodlarını ekliyoruz.
Kullanım şekli: [youtube][/youtube] kodları arasına video adresini yazmak.
