Obecnie w ipb 3.1.x jest auto media tag który zamienia linki np. z youtube w odtwarzacz.
Dla tych co nie chcą tego "udogodnienia":
Przechodzimy do
admin sources classes bbcode
Otwieramy plik core.php i wyszukujemy (od 2535 lini do 2557)
if( $this->settings['bbcode_automatic_media'] )
{
$media = $this->cache->getCache( 'mediatag' );
if( is_array($media) AND count($media) )
{
foreach( $media as $type => $r )
{
if( preg_match( "#^" . $r['match'] . "$#is", $matches[2] ) )
{
//-----------------------------------------
// Do it this way so we can capture disable_flash
//-----------------------------------------
$this->cache->updateCacheWithoutSaving( '_tmp_autoparse_media', 1 );
$_result = $this->parseBbcode( $matches[1] . '[media]' . $matches[2] . '[/media]' . $_extra, 'display', 'media' );
$this->cache->updateCacheWithoutSaving( '_tmp_autoparse_media', 0 );
return $_result;
}
}
}
}
Następnie zamieniamy na
/*if( $this->settings['bbcode_automatic_media'] )
{
$media = $this->cache->getCache( 'mediatag' );
if( is_array($media) AND count($media) )
{
foreach( $media as $type => $r )
{
if( preg_match( "#^" . $r['match'] . "$#is", $matches[2] ) )
{
//-----------------------------------------
// Do it this way so we can capture disable_flash
//-----------------------------------------
$this->cache->updateCacheWithoutSaving( '_tmp_autoparse_media', 1 );
$_result = $this->parseBbcode( $matches[1] . '[media]' . $matches[2] . '[/media]' . $_extra, 'display', 'media' );
$this->cache->updateCacheWithoutSaving( '_tmp_autoparse_media', 0 );
return $_result;
}
}
}
}*/
Teraz linki wstawione np. z youtube będą wyglądać tak
http://www.youtube.com/watch?v=vwO87BqECQU
Zamiast tak
http://www.youtube.com/watch?v=vwO87BqECQU