Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: youtube

Parašė Neformal· 2008 Lap. 2 12:11:49
#1

Kokius tagus man reikia prirašyti prie youtubes linko, kad man jį rodytu naujienos, forume ir kitose skiltyse ?

Parašė MAnjack· 2008 Lap. 2 12:11:28
#2

https://webdnd.com/readarticle.p...icle_id=91

Parašė ChecK· 2008 Lap. 2 12:11:38
#3

buvo tokia tema, man rodos :D

Parašė Neformal· 2008 Lap. 2 14:11:12
#4

Įrašiau tą kodą i Maincore.php prie youtubes url prirašiau tuos tagus, bet vistiek neikas nesigavo ;[

Štai Maincore.php eilutė su įrašytu youtubes kodu. Jei nesunku paredaguokit.

// Parse bbcode into HTML code
function parseubb($text) {
$text = preg_replace('#\[youtube\]([a-zA-Z0-9\-_]{11})\[/youtube\]#si', '<center><strong>Youtube Video:</strong></center><object width="325" height="253"><param name="movie" value="http://www.youtube.com/v/\1&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="325" height="253"></embed></object>', $text);
   $text = preg_replace('#\[b\](.*?)\[/b\]#si', '<b>\1</b>', $text);
   
   $text = preg_replace('#\[i\](.*?)\[/i\]#si', '<i>\1</i>', $text);
   $text = preg_replace('#\[u\](.*?)\[/u\]#si', '<u>\1</u>', $text);
   $text = preg_replace('#\[center\](.*?)\[/center\]#si', '<center>\1</center>', $text);
   
   $text = preg_replace('#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\";\+]*?)([\r\n]*)\[/url\]#si', '<a href=\'\2\3\' target=\'_blank\'>\2\3</a>', $text);
   $text = preg_replace('#\[url\]([\r\n]*)([^\s\'\";\+]*?)([\r\n]*)\[/url\]#si', '<a href=\'http://\2\' target=\'_blank\'>\2</a>', $text);
   $text = preg_replace('#\[url=([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\";\+]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'\2\3\' target=\'_blank\'>\4</a>', $text);
   $text = preg_replace('#\[url=([\r\n]*)([^\s\'\";\+]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'http://\2\' target=\'_blank\'>\3</a>', $text);
   
   $text = preg_replace('#\[mail\]([\r\n]*)([^\s\'\";:\+]*?)([\r\n]*)\[/mail\]#si', '<a href=\'mailto:\2\'>\2</a>', $text);
   $text = preg_replace('#\[mail=([\r\n]*)([^\s\'\";:\+]*?)\](.*?)([\r\n]*)\[/mail\]#si', '<a href=\'mailto:\2\'>\3</a>', $text);
   
   $text = preg_replace('#\[small\](.*?)\[/small\]#si', '<span class=\'small\'>\1</span>', $text);
   $text = preg_replace('#\[color=(black|blue|brown|cyan|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|violet|white|yellow)\](.*?)\[/color\]#si', '<span style=\'color:\1\'>\2</span>', $text);
   
   $text = preg_replace('#\[flash width=([0-9]*?) height=([0-9]*?)\]([^\s\'\";:\+]*?)(\.swf)\[/flash\]#si', '<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://active.macromedia.com/flash6/cabs/swflash.cab#version=6,0,0,0\' id=\'\3\4\' width=\'\1\' height=\'\2\'><param name=movie value=\'\3\4\'><param name=\'quality\' value=\'high\'><param name=\'bgcolor\' value=\'#ffffff\'><embed src=\'\3\4\' quality=\'high\' bgcolor=\'#ffffff\' width=\'\1\' height=\'\2\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\'></embed></object>', $text);
   $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie","'<img src=\'\\1'.str_replace(array('.php','?','&','='),'','\\3').'\\4\' style=\'border:0px\'>'",$text);

   $qcount = substr_count($text, "[quote]"); $ccount = substr_count($text, "[code]");
   for ($i=0;$i < $qcount;$i++) $text = preg_replace('#\[quote\](.*?)\[/quote\]#si', '<div class=\'quote\'>\1</div>', $text);
   for ($i=0;$i < $ccount;$i++) $text = preg_replace('#\[code\](.*?)\[/code\]#si', '<div class=\'quote\' style=\'width:400px;white-space:nowrap;overflow:auto\'><code style=\'white-space:nowrap\'>\1<br><br><br></code></div>', $text);

   $text = descript($text,false);

   return $text;
}