26 (edited by SuperMAG 2010-04-06 05:17)

Re: [Release] Extended BBCode version 2

can you add the video button in the next extension version.

its like this: [video] [/video]

here is the button: http://sports2all.com/community/extensi … /video.png


if anyone is intrested, the extension i use is this, it has alot of sources like youtube, megavideo, yahoo video, sevenload, metacafe and other 7-8 souces:

<?xml version="1.0" encoding="UTF-8"?>
<extension engine="1.0">
    <id>video_url_punbb</id>
    <title>PunBB Video Url BBCodes</title>
    <version>1.1.0</version>
    <description>Adds BBCodes to allow Youtube, Dailymotion, Veoh, Sevenload ... videos embeding with direct (permanent) link for PunBB forum</description>
    <author>Soleil (mattroitixiu@gmail.com)</author>
    <minversion>PunBB 1.4</minversion>
    <maxtestedon>PunBB 1.4</maxtestedon>
    <hooks>
        <hook id="ps_preparse_tags_start"><![CDATA[
            $tags[] = 'video';
            $tags_opened[] = 'video';
            $tags_closed[] = 'video';
        ]]></hook>
        <hook id="ps_do_bbcode_replace"><![CDATA[
            $pattern[] = '#\[video\](.*?)\[/video\]#';
            if(preg_match('#http://.*youtube\.com/watch\?v=(.*)#', $text, $matches)){
                $urlExplode = explode('=',$text);
                $lastPart = $urlExplode[1];
                $lastPartExplode = explode('[',$lastPart);
                $partID = $lastPartExplode[0];
                $replace[] = '<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/'.$partID.'&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'.$partID.'&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>';
                }
            elseif(preg_match('#http://.*dailymotion\.com/video/(\w+)#s', $text, $matches)){
                $replace[] = '<object width="480" height="291"><param name="movie" value="http://www.dailymotion.com/swf/'.$matches[1].'&related=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/'.$matches[1].'&related=1" type="application/x-shockwave-flash" width="480" height="291" allowFullScreen="true" allowScriptAccess="always"></embed></object>';
                }
            elseif(preg_match('#http://.*megavideo\.com/\?v=(\w+)#s', $text, $matches)){
                $replace[] = '<object width="640" height="480"><param name="movie" value="http://www.megavideo.com/v/'.$matches[1].'a19bd6f443be4c02307efa26f3c3faaf"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.megavideo.com/v/'.$matches[1].'a19bd6f443be4c02307efa26f3c3faaf" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="480"></embed></object>';
                }
            elseif(preg_match('#http://.*vimeo\.com/(\d+)#', $text, $matches)){
                $replace[] = '<object width="500" height="320"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='.$matches[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='.$matches[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>';
                }
            elseif(preg_match('#http://.*video\.yahoo\.com/watch/(\d+)/(\d+)#', $text, $matches)){
                $replace[] = '<object width="512" height="322"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40" /><param name="allowFullScreen" value="true" /><param name="AllowScriptAccess" VALUE="always" /><param name="bgcolor" value="#000000" /><param name="flashVars" value="id='.$matches[2].'&vid='.$matches[1].'&lang=en-us&intl=us&embed=1" /><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40" type="application/x-shockwave-flash" width="512" height="322" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id='.$matches[2].'&vid='.$matches[1].'&lang=en-us&intl=us&embed=1" ></embed></object>';
                }
            elseif(preg_match('#http://.*metacafe\.com/watch/(\d+)/(\w+)/#', $text, $matches)){
                $replace[] = '<embed src="http://www.metacafe.com/fplayer/'.$matches[1].'/'.$matches[2].'.swf" width="400" height="345" wmode="transparent" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>';
                }
            elseif(preg_match('#http://vids\.myspace\.com(.*)(video|Video)(ID|id)=(\d+)#', $text, $matches)){
                $replace[] = '<object width="425px" height="360px"><param name="allowFullScreen" value="true"/><param name="wmode" value="transparent"/><param name="movie" value="http://mediaservices.myspace.com/services/media/embed.aspx/m='.$matches[4].',t=1,mt=video,searchID=,primarycolor=,secondarycolor="/><embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m='.$matches[4].',t=1,mt=video,searchID=,primarycolor=,secondarycolor=" width="425" height="360" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"/></object>';
                }
            elseif(preg_match('#http://.*videovat\.com/videos/(\d+)/(.*)#', $text, $matches)){
                $replace[] = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="424" height="373" id="videovatPlayer" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="http://www.videovat.com/videoPlayer.swf" /><param name="quality" value="high" /><param name="flashvars" value="videoId='.$matches[1].'" /><param name="allowFullscreen" value="true" /><param name="wmode" value="transparent" /><embed src="http://www.videovat.com/videoPlayer.swf" quality="high" wmode="transparent" flashvars="videoId='.$matches[1].'" width="424" height="373" name="videovatPlayer" align="middle" allowScriptAccess="always" allowFullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed></object>';
                }
            elseif(preg_match('#http://tinypic\.com/player\.php\?v=(.*)&amp;s=(\d)#', $text, $matches)){
                $replace[] = '<embed width="440" height="420" type="application/x-shockwave-flash" src="http://v'.$matches[2].'.tinypic.com/player.swf?file='.$matches[1].'&s='.$matches[2].'"></embed>';
                }
            elseif(preg_match('#http://.*myvideo\.de/watch/(\d+)/(\w+)#', $text, $matches)){
                $replace[] = '<object style="width:470px;height:406px;" width="470" height="406" type="application/x-shockwave-flash" data="http://www.myvideo.de/movie/'.$matches[1].'"><param name="movie" value="http://www.myvideo.de/movie/'.$matches[1].'"></param><param name="AllowFullscreen" value="true"></param><param name="AllowScriptAccess" value="always"></param><embed src="http://www.myvideo.de/movie/'.$matches.'" width="470" height="406"></embed></object>';
                }
            elseif(preg_match('#http://.*mixpod\.com/playlist/(\d+)#', $text, $matches)){
                $replace[] = '<embed src="http://assets.myflashfetish.com/swf/mp3/mixpod.swf?myid='.$matches[1].'&path=" quality="high" wmode="window" bgcolor="222222" flashvars="mycolor=222222&mycolor2=77ADD1&mycolor3=FFFFFF&autoplay=false&rand=0&f=4&vol=100&pat=4&grad=true" width="410" height="311" name="myflashfetish" salign="TL" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" border="0" style="visibility:visible;width:410px;height:311px;" /></embed>';
                }
            elseif(preg_match('#http://.*sevenload\.com/#', $text, $matches)){
                $urlExplode = explode('/',$text);
                $partCount = count($urlExplode);
                $lastPartPosition = $partCount-2;
                $lastPart = $urlExplode[$lastPartPosition];
                $lastPartExplode = explode('-',$lastPart);
                $partID = $lastPartExplode[0];
                $replace[] = '<script type="text/javascript" src="'.$matches[0].'pl/'.$partID.'/500x408"></script>';
                }
            elseif(preg_match('#http://.*veoh\.com/#', $text, $matches)){
                $urlExplode = explode('/',$text);
                $partCount = count($urlExplode);
                $lastPartPosition = $partCount-2;
                $lastPart = $urlExplode[$lastPartPosition];
                $lastPartExplode = explode('[',$lastPart);
                $partID = $lastPartExplode[0];
                $replace[] = '<object width="410" height="341" id="veohFlashPlayer" name="veohFlashPlayer"><param name="movie" value="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.2.6.1001&permalinkId='.$partID.'&player=videodetailsembedded&videoAutoPlay=0&id=anonymous"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.2.6.1001&permalinkId='.$partID.'&player=videodetailsembedded&videoAutoPlay=0&id=anonymous" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="410" height="341" id="veohFlashPlayerEmbed" name="veohFlashPlayerEmbed"></embed></object>';
                }
            elseif(preg_match('#http://.*vidiac\.com/(.*?)(\.\w+)#', $text, $matches)){
                $urlExplode = explode('/',$text);
                $partCount = count($urlExplode);
                $lastPartPosition = $partCount-2;
                $lastPart = $urlExplode[$lastPartPosition];
                $lastPartExplode = explode('.',$lastPart);
                $partID = $lastPartExplode[0];
                $replace[] = '<embed src="http://www.vidiac.com/vidiac.swf" FlashVars="video='.$partID.'" quality="high" bgcolor="#ffffff" width="428" height="352" name="ePlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
                }
            else{
                $replace[] = '<strong>You\'ve posted a wrong link or your video is not supported by this extension.<br>Please check your link.</strong>';
                }
        ]]></hook>
        <hook id="he_new_bbcode_link"><![CDATA[
        // add lang file
        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php')) {
        require($ext_info['path'].'/lang/'.$forum_user['language'].'.php');
        } else {
            require($ext_info['path'].'/lang/English.php');
        }
        $lang_help = array_merge($lang_help, $lang_help_flash);
        ?>
        <div class="entry-content">
            <code>[video]<?php echo $lang_help['videourl_uri'] ?>[/video]</code> <span><?php echo $lang_help['produces'] ?></span>
            <?php echo $lang_help['videourl_display'] ?>    
        </div><?php
        ]]></hook>
    </hooks>
</extension>
MyFootballCafe.com  is Now Online!

27

Re: [Release] Extended BBCode version 2

bmaker wrote:

Ubuntu 8.04, Apache 2.2, PHP 5.2.13.

It's also strange since the bbcode help page includes the new bbcodes... So, the plugin is active, but not 100% working.

Installed extensions:

  • Additional BBcode

  • Antispam System

  • BBCode buttons

  • PunBB Repository

  • Pun tags (disabled)

Apache error log does not contain PHP errors related to punbb.

You got Additional BBcode installed? Where can I find that extension?

Also, why do you need BBCode buttons when you say you got pun_bbcode installed?

You can also try a solution posted here:http://punbb.informer.com/forums/post/133945/#p133945

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

28 (edited by bmaker 2010-04-06 10:24)

Re: [Release] Extended BBCode version 2

DiD wrote:
bmaker wrote:

Ubuntu 8.04, Apache 2.2, PHP 5.2.13.

It's also strange since the bbcode help page includes the new bbcodes... So, the plugin is active, but not 100% working.

Installed extensions:

  • Additional BBcode

  • Antispam System

  • BBCode buttons

  • PunBB Repository

  • Pun tags (disabled)

Apache error log does not contain PHP errors related to punbb.

1. You got Additional BBcode installed? Where can I find that extension?

2. Also, why do you need BBCode buttons when you say you got pun_bbcode installed?

3. You can also try a solution posted here:http://punbb.informer.com/forums/post/133945/#p133945

1. It's YOUR extension.

// extensions/pun_extended_bbcode/manifest.xml
        <id>pun_extended_bbcode</id>
        <title>Additional BBcode</title>

2. Because it says "ATTENTION: Official extension pun_bbcode needs to be installed first." in the first post here.

3. chmodded the whole extensions directory, didnt work. Also note that the official pun_bbcode extension works, but not your addon for it.

Re: [Release] Extended BBCode version 2

"pun_bbcode" is the ID of the extension, and "BBCode buttons" is just the "nice" title of the same extension.

30

Re: [Release] Extended BBCode version 2

Sorry here guys. Don't eat my heart out. Having a total off day.

I tried to reproduce the error, but no success with that.
Everything works fine on my end. Tested on 2 different (windows) PC's with XAMPP. I really have no clue what could be wrong.  sad

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

31 (edited by bmaker 2010-04-07 09:56)

Re: [Release] Extended BBCode version 2

Never mind...

I just fixed it.

It could not work because the hook pun_bbcode_buttons_output_loop_start did not exist. It did not exist, because my pun_bbcode extension has been outdated (1.2.1 vs. the current 1.3.4). Shame that no error/notice has been thrown/logged at any level regarding this issue.

Works perfectly now. Thanks for this extension! smile

Suggestions:
1. Allow the spoiler header to be customized ([spoiler=myownheader]...[/spoiler]).
2. Allow the note tag to have NO value given to it ([note]...[/note]).

Best regards, bmaker

32

Re: [Release] Extended BBCode version 2

Thx for saving my day bmaker. I was beginning to doubt myself.  lol

Doing a flash project right now, but I'll take the suggestions in consideration.  wink

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

33

Re: [Release] Extended BBCode version 2

Added the spoiler extension to my forums and now I'm getting this error shown just on the left of the http://punbb.informer.com/forums/extensions/pun_bbcode/buttons/Oxygen/b.png icon.

Notice: Undefined index: path in /home/kiejrcom/public_html/extensions/pun_bbcode/bar.php  on line 53
Notice: Undefined index: url in /home/kiejrcom/public_html/extensions/pun_bbcode/bar.php on line 56

Any idea how I could fix this? I really would like spoiler tags.
BBCode Buttons is Version v1.3.6.

34

Re: [Release] Extended BBCode version 2

I had that recently aswell that exact error. Could only fix by disabling another extension, but forgot which!
Which other extensions do you have installed?

35

Re: [Release] Extended BBCode version 2

Admin add user
Antispam System
BBCode buttons
Colored usergroups
Events registration
Google Maps BBCode for PunBB
Hide Currently Installed
Improved online list
JS post quote
Link to last poster
Logging of events
Portal by Daris
Post edit grace period
Private Message Announcements
Private Messaging
Pun Admin Manage Extensions Improved
Pun Move Posts
PunBB Repository
Reputation
StopForumSpam.com antispam plus URL checker
Title/avatar switch
Track topics in database
User Activity Monitoring
Usertagging for PunBB

36

Re: [Release] Extended BBCode version 2

I think it may have been user activity monitoring!
or then improved online list

try them two
I know you want them all, but like that I know it's not just my setup or board that's playing one off against the other....

37

Re: [Release] Extended BBCode version 2

No change from disabling either  neutral
ohnoes

38

Re: [Release] Extended BBCode version 2

Are you using v. 1.1.0  or 1.0.2  of the spoiler ext?

39

Re: [Release] Extended BBCode version 2

1.0.2, as downloaded from here
I'm not at home at the moment, but later today I may try disabling a few other extensions as to eliminate.
But for the moment: -humph- ;_;

40

Re: [Release] Extended BBCode version 2

No, ntw, the extension 1.1.0 works without disabling anything on my board.

41

Re: [Release] Extended BBCode version 2

yikes I'm a extension developer now? Thx KeyDog for the e-mail.  wink

Been away for a longer time due to other projects. I didn't came to it back then, but I'll be updating the spoiler only bbcode extension to 1.1.0 later this week. So it'll be an exact copy of the one in the Extended BBcode 1.1.0 , including a seperate stylesheet that users can adapt.

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

42

Re: [Release] Extended BBCode version 2

DiD wrote:

I'm a extension developer now?

You developed an extension = extension developer wink

Thx for update

43

Re: [Release] Extended BBCode version 2

The Spoiler only extension is updated to v1.1.0.

It's now an exact copy of the one in the full extended bbcode. So now you can change the appearance (Colors, etc..) of the spoiler through it's .css file too.

See updated first post for the download link.

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

44

Re: [Release] Extended BBCode version 2

kiejr wrote:

Notice: Undefined index: path in /home/kiejrcom/public_html/extensions/pun_bbcode/bar.php  on line 53
Notice: Undefined index: url in /home/kiejrcom/public_html/extensions/pun_bbcode/bar.php on line 56

i have same problem
i'm using 1.3.6 pun_BBcode and installed pun_spoiler 1.1.0 ...
to kiejr :
you must added '@' in /pun_bbcode/bar.php:63
before :

if (file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
            $buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
        else
            $buttons_path = $ext_info['url'].'/buttons/Oxygen';
    }

add '@' :

if (@file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
            @$buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
        else
            @$buttons_path = $ext_info['url'].'/buttons/Oxygen';
    }

lol

45

Re: [Release] Extended BBCode version 2

Adding the @ should be absolutely unnecessary. Adding it should just give more errors.
There must be something else conflicting. My best guess is another extension.

I tested the extensions quite good. But I don't have that many extension installed either.

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//

46

Re: [Release] Extended BBCode version 2

in bar.php line 53  , add this :

$ext_info['path'] = FORUM_ROOT.'extentions';
$ext_info['url'] = FORUM_ROOT.'extentions';
                if (file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
            $buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
        else
            $buttons_path = $ext_info['url'].'/buttons/Oxygen';

and error is gone big_smile

47

Re: [Release] Extended BBCode version 2

fadly wrote:

in bar.php line 53  , add this :

$ext_info['path'] = FORUM_ROOT.'extentions';
$ext_info['url'] = FORUM_ROOT.'extentions';
                if (file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
            $buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
        else
            $buttons_path = $ext_info['url'].'/buttons/Oxygen';

and error is gone big_smile

yes! it was to do with some custom buttons. tyvm

48

Re: [Release] Extended BBCode version 2

no font-size BBcode ?
hmm

49

Re: [Release] Extended BBCode version 2

if i disable "Quick post" , spoiler have css problem neutral

50

Re: [Release] Extended BBCode version 2

Thanks for reporting the bugs guys.

I released version 1.2 of both plugins. See first post for download links and details.

  • Resolved css bug when disabling quick post.

  • Resolved the error caused in bar.php (At least I hope so   hmm   )

  • Added the possibility to use the spoiler bbcode in two ways.
    If U use the plain spoiler tag then SPOILER is displayed.
    If U use spoiler=HIDDEN TEXT then HIDDEN TEXT is displayed without the SPOILER message.

//== Moderator on www.ndsthemes.com ==\\
\\==   Forum powered there by PunBB     ==//