Upgrade from 0.4.0 to 0.5.0 suscefully big_smile

I've installed chatbox 0.4.0 into my personal server and works correctly

chali wrote:

Where can i get the icons (youtube.png, etc..)?


http://www.snowboard-zamora.net/foro/extensions/pun_bbcode/buttons/Oxygen/youtube.png
Youtube

http://www.snowboard-zamora.net/foro/extensions/pun_bbcode/buttons/Oxygen/youtube_wide.png Youtube Wide

http://www.snowboard-zamora.net/foro/extensions/pun_bbcode/buttons/Oxygen/google.png Google Video

http://www.snowboard-zamora.net/foro/extensions/pun_bbcode/buttons/Oxygen/vimeo.png Vimeo

See this topic:  http://punbb.informer.com/forums/topic/ … extension/

(Sorry tongue i speak english a little bit.)

Now youtube supports videos in 16:9 format. If you put a 4:3 video into a 16:9 embed ..... it looks so ugly. It is very useful to have two tags for 4:3 videos and 16:9 videos.

This is the code for 16:9

//YOUTUBE 16:9
    $pattern[] = '#\[youtube_wide\](.*?)\[/youtube_wide\]#s';
    $replace[] = '<object width="640" height="380"><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="transpareent" width="640" height="380"></embed></object>';

You must have "youtube_wide.png" into /extensions/pun_bbcode/buttons/[template]/ .... i copy youtube.png to youtube_wide.png


http://img300.imageshack.us/img300/9462/dibujoeo6.jpg

Sorry, I speak english a little bit.

It's very easy add customs bbcodes to you PunBB forum througth "pun_bbcode" official extension

You must edit only 2 files.

- /extensions/pun_bbcode/bar.php
- /includes/parser.php

In first file you must put the "name" of the bbcode you are including. For example, i'm going to put bbcode for YOUTUBE, GOOGLE VIDEO, and VIMEO.

// List of tags, which may have attribute
$tags_without_attr = array('b', 'i', 'u', 'url', 'email', 'img', 'list', 'youtube','google','vimeo', 'li' => '*', 'quote', 'code');

Ok ?? Now we want transform bbcode_tags to html. We need write the pattern and the replace lines into parser.php

//
// Convert BBCodes to their HTML equivalent
//


    $replace[] = '<span style="color: $1">$2</span>';
    $replace[] = '</p><h5>$1</h5><p>';

//INSERT HERE YOUR BBCODES TAGS

//YOUTUBE 
    $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>';


//GOOGLE VIDEO
        $pattern[] = '#\[google\](.*?)\[/google\]#s';
        $replace[] = '<object width="425" height="364"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=$1"></param><embed src="http://video.google.com/googleplayer.swf?docId=$1" type="application/x-shockwave-flash" width="425" height="364"></embed></object>';


//VIMEO PATTERN
    $pattern[] = '#\[vimeo\](.*?)\[/vimeo\]#s';
    $replace[] = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /><a href="http://vimeo.com/$1" target="_blank">http://vimeo.com/$1</a> on <a href="http://vimeo.com" target="_blank">Vimeo</a>.';

USAGE:

You must put only the id-video bettween tags:

[youtube]Video-id[/youtube]
[video]Video-id[/video]
[google]Video-id[/google]

IMAGES:

You need put the images for bbcodes into /extensions/pun_bbcode/buttons/[template]/ and must be named as:

google.png, youtube.png, vimeo.png ........

IT's SO EASY !!!!!!!

Here a screenshot:

http://img529.imageshack.us/img529/1633/bbcodezk0.jpg

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

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>';

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