Hemen kuruluma geçelim.
Öncelikle şablon bölümünden HTML düzenle bölümüne giriyoruz ve
</body>
kodunu buluyoruz. Daha sonra bu kodun hemen üstüne
<script type='text/javascript'>
//<![CDATA[
function replaceText(){if(!document.getElementById){return;}
bodyText = document.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.



![phpKF Kolay Forum [PHP] Scripti](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy3rL88Z9izmJgqovc1J1tqvqzBlyy26AQW-pMKX_890ATMbuoQeqSGMT5E2En6uGKaNEpEjLiR23Wnf6REP7CYSb7id03k_oiFL6vzArDrUGzMefgqoRlpuhTDGcc7ot2lqfTBKReR7by/s72-c/kurulum_bitti-b.png)








0 yorum: