############################################################## ## MOD Title: Advanced BBCode Box MOD ## MOD Author: Disturbed One < anthony@anthonycoy.com > (Anthony Coy) http://www.hvmdesign.com ## MOD Author: AL Tnen (N/A) http://www.tnen.zzn.com ## MOD Author: freddie (Stefaan Van Damme) http://www.tactic.be ## MOD Description: This MOD adds lots of useful BBCode features and makes the bbcode buttons ## look just like Microsoft Office 2003. It also improves the functions of ## phpBB's BBCode function. It adds the bbcode exactly where the cursor is, ## inserts smilies where the cursor is, and adds more ways to customize posts. ## The MOD is very fast loading, and is a sleek addition to your phpBB bulletin board. ## ## MOD Version: 5.1.0 ## ## Installation Level: Easy ## Installation Time: 10 Minutes ## ## Files To Edit: (4) ## language/lang_english/lang_main.php ## includes/bbcode.php ## templates/subSilver/bbcode.tpl ## templates/subSilver/posting_body.tpl ## ## Included Files: (57) ## bbcode_box/add_bbcode.js ## bbcode_box/grad.htm ## bbcode_box/images/* ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## I (freddie) tried to contact the previous developpers of this mod, but they didn't replied. ## I added the google video and youtube images, and stopped video from starting automatic ## ## Please do not remove the copyright notice located on the box ## without permission from me. ## ## ## This version adds new features compared to its last version ## like BBCode insert at the cursor, and on selected text. Also some ## BBCode security issues were fixed. For a complete list of BBCode ## this MOD has, please read below. ## ## - Font Type (Dropdown Shows Actual Preview of Font) ## - Font Size (Dropdown Shows Actual Preview of Size) ## - Font Color (Dropdown Features New Colors, and Preview) ## - Justify Align ## - Left Align ## - Center Align ## - Right Align ## - Superscript ## - Subscript ## - Bold ## - Italic ## - Underline ## - Strikethrough ## - Text Fade (IE Only) ## - Text Gradient (IE Only) ## - Message Box Align Left (Traditional) ## - Message Box Align Right (Arabic, etc) ## - Marquee Down ## - Marquee Up ## - Marquee Left ## - Marquee Right ## - Code ## - Quote ## - Spoiler (User must click on link to review text within tags) ## - Hyperlink Wizard ## - Email Wizard ## - Include Webpage Wizard (Adds Iframe that displays page specified by user) ## - Image Wizard ## - Flash Wizard ## - Streaming Video Wizard ## - Streaming Audio Wizard ## - RAM Wizard (Real Media Audio) ## - Ordered List Wizard ## - Unordered List Wizard ## - Line Break ## - Remove BBCode (Removes all BBCode tags from selected text) ## - Close Tags (Closes remaining open tags) ## - Google video ## - Youtube Video ## ############################################################## ## MOD History: ## ## 2007-01-19 - Version 5.1.0 ## - MOD Taken over by freddie ## - Added youtube and google-video ## - fixed a javascript error ## - stopped videos from automatic starting ## ## 2005-10-08 - Version 5.0.0a ## - Fixed bbcode.tpl problem ## ## 2005-10-08 - Version 5.0.0 ## - MOD Taken over by Disturbed One ## - Added features such as superscript, subscript, etc. ## - Made compatible with the latest version of phpBB ## - Fixed some functions ## - Made BBCode so it is inserted at curser or on selected text ## - Added Mozilla compatibility fixes ## ## ????-??-?? - Version 4.5.0 & Under ## - MOD Development by Al Tnen ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ COPY ]------------------------------------------ # copy mods/bbcode_box to mods/bbcode_box # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]--------------------------------------------- # ?> # #-----[ BEFORE, ADD ]-------------------------------------- # //====================================================================== | //==== Start Advanced BBCode Box MOD =================================== | //==== v5.1.0 ========================================================== | //==== $lang['BBCode_box_hidden'] = 'Hidden'; $lang['BBcode_box_view'] = 'Click to View Content'; $lang['BBcode_box_hide'] = 'Click to Hide Content'; $lang['bbcode_help']['GVideo'] = 'GVideo: [GVideo]GVideo URL[/GVideo]'; $lang['GVideo_link'] = 'Link'; $lang['bbcode_help']['youtube'] = 'YouTube: [youtube]YouTube URL[/youtube]'; $lang['youtube_link'] = 'Link'; //==== //==== End Advanced BBCode Box MOD ==================================== | //===================================================================== | # #-----[ OPEN ]------------------------------------------ # includes/bbcode.php # #-----[ FIND ]--------------------------------------------- # $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); # #-----[ AFTER, ADD ]-------------------------------------- # //====================================================================== | //==== Start Advanced BBCode Box MOD =================================== | //==== v5.1.0 ========================================================== | //==== $bbcode_tpl['spoil_open'] = str_replace('{L_BBCODEBOX_HIDDEN}', $lang['BBCode_box_hidden'], $bbcode_tpl['spoil_open']); $bbcode_tpl['spoil_open'] = str_replace('{L_BBCODEBOX_VIEW}', $lang['BBcode_box_view'], $bbcode_tpl['spoil_open']); $bbcode_tpl['spoil_open'] = str_replace('{L_BBCODEBOX_HIDE}', $lang['BBcode_box_hide'], $bbcode_tpl['spoil_open']); $bbcode_tpl['align_open'] = str_replace('{ALIGN}', '\\1', $bbcode_tpl['align_open']); $bbcode_tpl['stream'] = str_replace('{URL}', '\\1', $bbcode_tpl['stream']); $bbcode_tpl['ram'] = str_replace('{URL}', '\\1', $bbcode_tpl['ram']); $bbcode_tpl['marq_open'] = str_replace('{MARQ}', '\\1', $bbcode_tpl['marq_open']); $bbcode_tpl['table_open'] = str_replace('{TABLE}', '\\1', $bbcode_tpl['table_open']); $bbcode_tpl['cell_open'] = str_replace('{CELL}', '\\1', $bbcode_tpl['cell_open']); $bbcode_tpl['web'] = str_replace('{URL}', '\\1', $bbcode_tpl['web']); $bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']); $bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']); $bbcode_tpl['flash'] = str_replace('{URL}', '\\3', $bbcode_tpl['flash']); $bbcode_tpl['video'] = str_replace('{URL}', '\\3', $bbcode_tpl['video']); $bbcode_tpl['video'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['video']); $bbcode_tpl['video'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['video']); $bbcode_tpl['font_open'] = str_replace('{FONT}', '\\1', $bbcode_tpl['font_open']); $bbcode_tpl['poet_open'] = str_replace('{POET}', '\\1', $bbcode_tpl['poet_open']); $bbcode_tpl['GVideo'] = str_replace('{GVIDEOID}', '\\1', $bbcode_tpl['GVideo']); $bbcode_tpl['GVideo'] = str_replace('{GVIDEOLINK}', $lang['GVideo_link'], $bbcode_tpl['GVideo']); $bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']); $bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['youtube_link'], $bbcode_tpl['youtube']); //==== //==== End Advanced BBCode Box MOD ==================================== | //===================================================================== | # #-----[ FIND ]--------------------------------------------- # // [email]user@domain.tld[/email] code.. $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; $replacements[] = $bbcode_tpl['email']; # #-----[ AFTER, ADD ]-------------------------------------- # //====================================================================== | //==== Start Advanced BBCode Box MOD =================================== | //==== v5.1.0 ========================================================== | //==== // [fade]Faded Text[/fade] code.. $text = str_replace("[fade:$uid]", $bbcode_tpl['fade_open'], $text); $text = str_replace("[/fade:$uid]", $bbcode_tpl['fade_close'], $text); // [ram]Ram URL[/ram] code.. $patterns[] = "#\[ram:$uid\](.*?)\[/ram:$uid\]#si"; $replacements[] = $bbcode_tpl['ram']; // [stream]Sound URL[/stream] code.. $patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si"; $replacements[] = $bbcode_tpl['stream']; // [web]Web Iframe URL[/web] code.. $patterns[] = "#\[web:$uid\](.*?)\[/web:$uid\]#si"; $replacements[] = $bbcode_tpl['web']; // [flash width=X height=X]Flash URL[/flash] code.. $patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/flash:$uid\]#si"; $replacements[] = $bbcode_tpl['flash']; // [video width=X height=X]Video URL[/video] code.. $patterns[] = "#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/video:$uid\]#si"; $replacements[] = $bbcode_tpl['video']; $text = preg_replace($patterns, $replacements, $text); // [align=left/center/right/justify]Formatted Code[/align] code.. $text = preg_replace("/\[align=(left|right|center|justify):$uid\]/si", $bbcode_tpl['align_open'], $text); $text = str_replace("[/align:$uid]", $bbcode_tpl['align_close'], $text); // [marquee=left/right/up/down]Marquee Code[/marquee] code.. $text = preg_replace("/\[marq=(left|right|up|down):$uid\]/si", $bbcode_tpl['marq_open'], $text); $text = str_replace("[/marq:$uid]", $bbcode_tpl['marq_close'], $text); // [table=blah]Table[/table] code.. $text = preg_replace("/\[table=(.*?):$uid\]/si", $bbcode_tpl['table_open'], $text); $text = str_replace("[/table:$uid]", $bbcode_tpl['table_close'], $text); // [cell=blah]Cell[/table] code.. $text = preg_replace("/\[cell=(.*?):$uid\]/si", $bbcode_tpl['cell_open'], $text); $text = str_replace("[/cell:$uid]", $bbcode_tpl['cell_close'], $text); // [font=fonttype]text[/font] code.. $text = preg_replace("/\[font=(.*?):$uid\]/si", $bbcode_tpl['font_open'], $text); $text = str_replace("[/font:$uid]", $bbcode_tpl['font_close'], $text); // [hr] $text = str_replace("[hr:$uid]", $bbcode_tpl['hr'], $text); // [sub]Subscrip[/sub] code.. $text = str_replace("[sub:$uid]", '', $text); $text = str_replace("[/sub:$uid]", '', $text); // [sup]Superscript[/sup] code.. $text = str_replace("[sup:$uid]", '', $text); $text = str_replace("[/sup:$uid]", '', $text); // [strike]Strikethrough[/strike] code.. $text = str_replace("[s:$uid]", '', $text); $text = str_replace("[/s:$uid]", '', $text); // [spoil]Spoiler[/spoil] code.. $text = str_replace("[spoil:$uid]", $bbcode_tpl['spoil_open'], $text); $text = str_replace("[/spoil:$uid]", $bbcode_tpl['spoil_close'], $text); // [GVideo]GVideo URL[/GVideo] code.. $patterns[] = "#\[GVideo\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\?docid=([0-9A-Za-z-_]*)[^[]*\[/GVideo\]#is"; $replacements[] = $bbcode_tpl['GVideo']; // [youtube]YouTube URL[/youtube] code.. $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is"; $replacements[] = $bbcode_tpl['youtube']; //==== //==== End Advanced BBCode Box MOD ==================================== | //===================================================================== | # #-----[ FIND ]--------------------------------------------- # // [img]image_url_here[/img] code.. $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); # #-----[ AFTER, ADD ]--------------------------------------------- # //====================================================================== | //==== Start Advanced BBCode Box MOD =================================== | //==== v5.1.0 ========================================================== | //==== // [fade]Faded Text[/fade] code.. $text = preg_replace("#\[fade\](.*?)\[/fade\]#si", "[fade:$uid]\\1[/fade:$uid]", $text); // [align=left/center/right/justify]Formatted Code[/align] code.. $text = preg_replace("#\[align=(left|right|center|justify)\](.*?)\[/align\]#si", "[align=\\1:$uid]\\2[/align:$uid]", $text); // [marquee=left/right/up/down]Marquee Code[/marquee] code.. $text = preg_replace("#\[marq=(left|right|up|down)\](.*?)\[/marq\]#si", "[marq=\\1:$uid]\\2[/marq:$uid]", $text); // [table=blah]Table[/table] code.. $text = preg_replace("#\[table=(.*?)\](.*?)\[/table\]#si", "[table=\\1:$uid]\\2[/table:$uid]", $text); // [cell=blah]Cell[/table] code.. $text = preg_replace("#\[cell=(.*?)\](.*?)\[/cell\]#si", "[cell=\\1:$uid]\\2[/cell:$uid]", $text); // [font=fonttype]text[/font] code.. $text = preg_replace("#\[font=(.*?)\](.*?)\[/font\]#si", "[font=\\1:$uid]\\2[/font:$uid]", $text); // [ram]Ram URL[/ram] code.. $text = preg_replace("#\[ram\](.*?)\[/ram\]#si", "[ram:$uid]\\1[/ram:$uid]", $text); // [stream]Sound URL[/stream] code.. $text = preg_replace("#\[stream\](.*?)\[/stream\]#si", "[stream:$uid]\\1[/stream:$uid]", $text); // [web]Web Iframe URL[/web] code.. $text = preg_replace("#\[web\](http(s)?://)([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/web\]#si", "[web:$uid]\\1\\3[/web:$uid]", $text); // [flash width=X height=X]Flash URL[/flash] code.. $text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2:$uid\]\\3[/flash:$uid]", $text); // [video width=X height=X]Video URL[/video] code.. $text = preg_replace("#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/video\]#si","[video width=\\1 height=\\2:$uid\]\\3[/video:$uid]", $text); // [hr] $text = preg_replace("#\[hr\]#si", "[hr:$uid]", $text); // [strike]Strikethrough[/strike] code.. $text = preg_replace("#\[s\](.*?)\[/s\]#si", "[s:$uid]\\1[/s:$uid]", $text); // [spoil]Spoiler[/spoil] code.. $text = preg_replace("#\[spoil\](.*?)\[/spoil\]#si", "[spoil:$uid]\\1[/spoil:$uid]", $text); // [sub]Subscrip[/sub] code.. $text = preg_replace("#\[sub\](.*?)\[/sub\]#si", "[sub:$uid]\\1[/sub:$uid]", $text); // [sup]Superscript[/sup] code.. $text = preg_replace("#\[sup\](.*?)\[/sup\]#si", "[sup:$uid]\\1[/sup:$uid]", $text); //==== //==== End Advanced BBCode Box MOD ==================================== | //===================================================================== | # #-------[ OPEN ]---------------------------------------------------- # Note: Do these instructions for all template files # templates/subSilver/bbcode.tpl # #-----[ FIND ]------------------------------------------------------ # {EMAIL} # #----[ AFTER, ADD ]-------------------------------------------------- #
{L_BBCODEBOX_HIDDEN}: 

{GVIDEOLINK}

{YOUTUBELINK}

# #-------[ OPEN ]---------------------------------------------------- # Note: Do these instructions for all template files # templates/subSilver/posting_body.tpl # #-----[ FIND ]------------------------------------------------------ # # #-----[ REPLACE WITH ]------------------------------------------- # # #-----[ FIND ]------------------------------------------------------ #
 {L_FONT_COLOR}:  {L_FONT_SIZE}: {L_BBCODE_CLOSE_TAGS}
# #-----[ REPLACE WITH ]------------------------------------------- #
Advanced BBCode Box v5.1.0
justifyrightcenterleftbolditalicunder linefadegradientRight to LeftLeft to RightMarque to downMarque to upMarque to leftMarque to right
CodeQuoteURLEmailWeb PageImageFlashVideoStreamReal MediaGoogleVidYoutubeListH-LineRemove BBcode
# #-------[ OPEN ]---------------------------------------------------- # Note: Do these instructions for all template files # templates/subSilver/subSilver.css # #-----[ FIND ]------------------------------------------------------ # /* Main table cell colours and backgrounds */ # #-----[ BEFORE, ADD ]------------------------------------------------------ # /* //====================================================================== | //==== Start Advanced BBCode Box MOD =================================== | //==== v5.1.0 ========================================================== | //==== */ .postimage { cursor: pointer; cursor: hand; } .postimage:hover { background-color: #C2CFE5; cursor: pointer; cursor: hand; } /* //==== //==== End Advanced BBCode Box MOD ==================================== | //===================================================================== | */ # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM