1 (edited by raul.lnx 2008-11-11 12:52)

Topic: How to make a BBcode Special

Hello people:

Now i have upgraded to PunBB 1.3 and all things works correctly. Now, i'm trying to make a BBCODE to insert youtube videos.

I put this code into /include/parser.php

        $pattern[] = '#\[youtube\](.*?)\[/youtube\]#s';
        $replace[] = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';


But it  doens't works ....  I was using this method into 1.2.x and worked correctly, but in 1.3 not.

Thanks

Re: How to make a BBcode Special

Where do you put it?
It does nothing at all or does it wrong?

Carpe diem

3 (edited by raul.lnx 2008-11-11 14:20)

Re: How to make a BBcode Special

Anatoly wrote:

Where do you put it?
It does nothing at all or does it wrong?


You can see here:

http://www.snowboard-zamora.net/foro/vi … php?id=134

I have tested only code between <embed> tags too, but the error is the same.

I put that code in include/parser.php, in line 708 , after:

       

$replace[] = '</p><h5>$1</h5><p>';

Re: How to make a BBcode Special

Now it's running, i was a mistake with "video-id" of youtube