Hi Slavok,

Other than the [youtube] tag, this was added too.

If you want to handle tags of this form: [item=Doombringer] then do the following:

Edit include/parser.php and change the following lines:

After this line:

'#\s*\[/email\]#i',

Add this line:

'#\[item=("|\'|)(.*?)\\1\]\s*#i',

After this line:

'[/email]',

Add this line:

'[item=$2]',

After this line:

'#\[email=([^\[]*?)\](.*?)\[/email\]#',

Add this line:

'#\[item=([^\[]*?)\]#',

After this line:

'<a href="mailto:$1">$2</a>',

Add this line:

'<a href="http://www.wowhead.com/?item=$1">$1</a>',

Hi MattF,

I'm using Safari and Firefox. I'm on a Mac. Anyways, on my work laptop, (Both IE7 & Firefox 3.0) it still doesn't display.

Could it be because of my parser.php file?

Hi Slavok,

Thanks for the reply, you mean you tried it with [youtbe]full url of youtube video[/youtube] on your own setup and it works?

Strange thing is that i tried that and it does work at all. I'm wondering if its because the <object cannot be embedded?

Btw I tried with [youtube]videoid[/youtube] and it's full URL and that doesn't work either. Can anyone help me with this please? This is my site. Http://www.rebirth-saurfang.com/forum

Hi all,

I'm fairly new to Punbb and so far have only tried out Punbb 1.2.21, I'm not eager to upgrade it to 1.3.x as I've integrated the forum into my wordpress site and its already been built up.

I'm however trying out the youtube tag but that somehow doesn't seem to work.

Here's my parser.php

$pattern = array('#\[b\](.*?)\[/b\]#s',
                     '#\[i\](.*?)\[/i\]#s',
                     '#\[u\](.*?)\[/u\]#s',
                     '#\[url\]([^\[<]*?)\[/url\]#e',
                     '#\[url=([^\[<]*?)\](.*?)\[/url\]#e',
                     '#\[email\]([^\[<]*?)\[/email\]#',
                     '#\[email=([^\[<]*?)\](.*?)\[/email\]#',
                     '#\[item=([^\[]*?)\]#',
                     '#\[youtube\]http://www.youtube.com/watch\?v=(.*?)\[/youtube\]#s',
                     '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s');

    $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<span class="bbu">$1</span>',
                     'handle_url_tag(\'$1\')',
                     'handle_url_tag(\'$1\', \'$2\')',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<a href="http://www.wowhead.com/?item=$1">$1</a>',
                     '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>',
                     '<span style="color: $1">$2</span>');

Is there something wrong I'm doing here?