https://www.icyphoenix.com/viewtopic.php?f=28&t=4785&p=32396#p32396 ----------------------------------- Lopalong Sun 28 Sep, 2008 08:56 Re: Adding New BBcode Tags ----------------------------------- :mrviolet: This is an unreleased MOD that I've done for the next version of IP (Though it's basically the same) and it should contain all of the examples you need - Plus put you in the right places to compare other bbCode entries that switch other params as well. ;) And this example adds a url option - You only want simple tags. :) [spoiler][code linenumbers=false]############################################################## ## MOD Title: High Slider ## MOD Author: Lopalong http://www.icythemes.com ## MOD Description: Adds the bbCode for Highslider ## ## MOD Version: 1.0.0 ## ## Installation Level: (Easy) ## Installation Time: ~5 Minutes ## Files To Edit: includesbbcb_mg.php ## includesbbcb_mg_small.php ## includesbbcode.php ## includesalbum_modalbum_bbcode.php ## languagelang_englishbbcb_mg.js ## languagelang_englishlang_bbcb_mg.php ## templatesmg_themesoverall_include.tpl ## templatesmg_themesbbcb_mg.tpl ## ############################################################## ## ## Example: [slider]Image URL[/slider] ## ############################################################## ## ## Version log ## ## 1.0.0 --> First release 12th September 2008 ## ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ COPY ]------------------------------------------ # highslide folder to /your_forum_Root/highslide #-----[ COPY ]------------------------------------------ # slider*.gif to images/bbcb_mg/images/gif/ # #-----[ OPEN ]--------------------------------- # includes/bbcb_mg.php # #-----[ FIND ]--------------------------------- # 'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'], # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'L_BBCB_MG_SLIDER' => $lang['bbcb_mg_slider'], // END HighSlider # #-----[ FIND ]--------------------------------- # 'L_YOUTUBE_HELP' => $lang['s_youtube_help'], # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'L_SLIDER_HELP' => $lang['s_slider_help'], // END HighSlider # #-----[ OPEN ]--------------------------------- # includes/bbcb_mg_small.php # #-----[ FIND ]--------------------------------- # 'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'], # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'L_BBCB_MG_SLIDER' => $lang['bbcb_mg_slider'], // END HighSlider # #-----[ FIND ]--------------------------------- # 'L_YOUTUBE_HELP' => $lang['s_youtube_help'], # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'L_SLIDER_HELP' => $lang['s_slider_help'], // END HighSlider # #-----[ OPEN ]--------------------------------- # includes/bbcode.php # #-----[ FIND ]--------------------------------- # 'youtube' => array( 'nested' => true, 'inurl' => true, 'allow_empty' => false, ), # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'slider' => array( 'nested' => true, 'inurl' => true, 'allow_empty' => false, ), // END HighSlider # #-----[ FIND ]--------------------------------- # if( ($tag === 'flash') || ($tag === 'swf') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag === 'emff') || ($tag === 'mp3') || ($tag === 'youtube') || ($tag === 'googlevideo') ) # #-----[ IN LINE FIND ]--------------------------------- # | ($tag === 'youtube') | # #-----[ IN LINE,AFTER ADD ]--------------------------------- # | ($tag === 'slider') | # #-----[ FIND ]--------------------------------- # elseif ($tag === 'youtube') { $html = '
Link
'; } # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider elseif ($tag === 'slider') { $html = '
Highslide JS
HighSlide modification by icythemes.com
'; } // END HighSlider # #-----[ OPEN ]--------------------------------- # includesalbum_modalbum_bbcode.php # #-----[ FIND ]--------------------------------- # 'youtube' => array( 'nested' => true, 'inurl' => true, 'allow_empty' => false, ), # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider 'slider' => array( 'nested' => true, 'inurl' => true, 'allow_empty' => false, ), // END HighSlider # #-----[ FIND ]--------------------------------- # if($tag === 'flash' || $tag === 'swf' || $tag === 'video' || $tag === 'ram' || $tag === 'quick' || $tag === 'stream' || $tag === 'emff' || $tag === 'youtube' || $tag === 'googlevideo') # #-----[ IN LINE FIND ]--------------------------------- # | $tag === 'youtube' | # #-----[ IN LINE,AFTER ADD ]--------------------------------- # | $tag === 'slider'| # #-----[ FIND ]--------------------------------- # elseif ($tag === 'youtube') { $html = '
Link
'; } # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider elseif ($tag === 'slider') { $html = '
Highslide JS
HighSlide modification by icythemes.com
'; } // END HighSlider # #-----[ OPEN ]--------------------------------- # languagelang_englishbbcb_mg.js # #-----[ FIND ]--------------------------------- # s_youtube_help = 'Insert YouTube video file: [youtube]YouTube ID[/youtube]'; # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider s_slider_help = 'Insert image: [slider]http://image_url[/slider]'; // END HighSlider # #-----[ FIND ]--------------------------------- # var youtube = 0; # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider var slider = 0; // END HighSlider # #-----[ FIND ]--------------------------------- # '[youtube]','[/youtube]', # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider '[slider]','[/slider]', // END HighSlider # #-----[ FIND ]--------------------------------- # function BBCyoutube() { var FoundErrors = ''; var enterURL = prompt(s_youtube_insert, s_id_insert_tip); if (!enterURL) { FoundErrors += s_id_insert_error; } if (FoundErrors) { alert(s_gen_error + FoundErrors); return; } var ToAdd = "[youtube]"+enterURL+"[/youtube]"; PostWrite(ToAdd); } # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider function BBCslider() { var FoundErrors = ''; var enterURL = prompt(s_url_insert, s_url_insert_tip); if (!enterURL) { FoundErrors += s_file_insert_error; } if (FoundErrors) { alert(s_gen_error + FoundErrors); return; } var ToAdd = "[slider]"+enterURL+"[/slider]"; PostWrite(ToAdd); } // END HighSlider # #-----[ OPEN ]--------------------------------- # languagelang_englishlang_bbcb_mg.php # #-----[ FIND ]--------------------------------- # $lang['bbcb_mg_youtube'] = 'YouTube'; # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider $lang['bbcb_mg_slider'] = 'HighSlider'; // END HighSlider # #-----[ FIND ]--------------------------------- # $lang['s_youtube_help'] = 'Insert YouTube file: [youtube]YouTube ID[/youtube]'; # #-----[ AFTER ADD ]--------------------------------- # // BEGIN HighSlider $lang['s_slider_help'] = 'Insert image: [slider]http://image_url[/slider]'; // END HighSlider # #-----[ OPEN ]--------------------------------- # templatesmg_themesoverall_include.tpl # #-----[ FIND ]--------------------------------- # # #-----[ AFTER ADD ]--------------------------------- # # #-----[ OPEN ]--------------------------------- # templatesmg_themesbbcb_mg.tpl # #-----[ FIND ]--------------------------------- #    # #-----[ AFTER ADD ]--------------------------------- # {L_BBCB_MG_SLIDER}   # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ [/code][/spoiler]