##############################################################
## MOD Title: Advanced BBCode Box MOD
## MOD Author: Disturbed One <anthony> (Anthony Coy) http://www.hvmdesign.com
## MOD Author: AL Tnen <al_tnen> (N/A) http://www.tnen.zzn.com
## MOD Author: freddie <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 i f r a m e 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 j a v a s c r i p t 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 i f r a m e 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]", '<sub>', $text);
$text = str_replace("[/sub:$uid]", '</sub>', $text);
// [sup]Superscript[/sup] code..
$text = str_replace("[sup:$uid]", '<sup>', $text);
$text = str_replace("[/sup:$uid]", '</sup>', $text);
// [strike]Strikethrough[/strike] code..
$text = str_replace("[s:$uid]", '<strike>', $text);
$text = str_replace("[/s:$uid]", '</strike>', $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</A>{L_COLOR_DEFAULT}</option>
<option>{L_COLOR_DARK_RED}</option>
<option>{L_COLOR_RED}</option>
<option>{L_COLOR_ORANGE}</option>
<option>{L_COLOR_BROWN}</option>
<option>{L_COLOR_YELLOW}</option>
<option>{L_COLOR_GREEN}</option>
<option>{L_COLOR_OLIVE}</option>
<option>{L_COLOR_CYAN}</option>
<option>{L_COLOR_BLUE}</option>
<option>{L_COLOR_DARK_BLUE}</option>
<option>{L_COLOR_INDIGO}</option>
<option>{L_COLOR_VIOLET}</option>
<option>{L_COLOR_WHITE}</option>
<option>{L_COLOR_BLACK}</option>
</select>
</td>
<td><a href="http://hvmdesign.com/" class="gensmall" title="BBCode Box MOD - by Disturbed One -
www.HVMDesign.com" target="blank">Advanced BBCode Box v5.1.0</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="mods/bbcode_box/images/dots.gif" style="padding-left: 4px;"></td>
<td>
<img border="0" src="mods/bbcode_box/images/justify.gif" class="postimage" name="justify" type="image" onClick="BBCjustify()" onMouseOver="helpline('justify')" style="border-style: outset; border-width: 1" alt="justify"><img border="0" src="mods/bbcode_box/images/right.gif" name="right" type="image" onClick="BBCright()" onMouseOver="helpline('right')" class="postimage" alt="right"><img border="0" src="mods/bbcode_box/images/center.gif" name="center" type="image" onClick="BBCcenter()" onMouseOver="helpline('center')" class="postimage" alt="center"><img border="0" src="mods/bbcode_box/images/left.gif" name="left" type="image" onClick="BBCleft()" onMouseOver="helpline('left')" class="postimage" alt="left"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/sup.gif" class="postimage" name="supscript" type="image" onClick="BBCsup()" onMouseOver="helpline('sup')" alt="" /><img border="0" src="mods/bbcode_box/images/sub.gif" name="subs" class="postimage" type="image" onClick="BBCsub()" onMouseOver="helpline('sub')" alt="" /><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/bold.gif" name="bold" type="image" onClick="BBCbold()" onMouseOver="helpline('b')" class="postimage" alt="bold"><img border="0" src="mods/bbcode_box/images/italic.gif" name="italic" type="image" onClick="BBCitalic()" onMouseOver="helpline('i')" class="postimage" alt="italic"><img border="0" src="mods/bbcode_box/images/under.gif" name="under" type="image" onClick="BBCunder()" onMouseOver="helpline('u')" class="postimage" alt="under line"><img border="0" src="mods/bbcode_box/images/strike.gif" class="postimage" name="strik" type="image" onClick="BBCstrike()" onMouseOver="helpline('strike')" alt="" /><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/fade.gif" name="fade" type="image" onClick="BBCfade()" onMouseOver="helpline('fade')" class="postimage" alt="fade"><img border="0" src="mods/bbcode_box/images/grad.gif" name="grad" type="image" onClick="BBCgrad()" onMouseOver="helpline('grad')" class="postimage" alt="gradient"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/rtl.gif" name="dirrtl" type="image" onClick="BBCdir('rtl')" onMouseOver="helpline('rtl')" class="postimage" alt="Right to Left"><img border="0" src="mods/bbcode_box/images/ltr.gif" name="dirltr" type="image" onClick="BBCdir('ltr')" onMouseOver="helpline('ltr')" class="postimage" alt="Left to Right"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/marqd.gif" name="marqd" type="image" onClick="BBCmarqd()" onMouseOver="helpline('marqd')" class="postimage" alt="Marque to down"><img border="0" src="mods/bbcode_box/images/marqu.gif" name="marqu" type="image" onClick="BBCmarqu()" onMouseOver="helpline('marqu')" class="postimage" alt="Marque to up"><img border="0" src="mods/bbcode_box/images/marql.gif" name="marql" type="image" onClick="BBCmarql()" onMouseOver="helpline('marql')" class="postimage" alt="Marque to left"><img border="0" src="mods/bbcode_box/images/marqr.gif" name="marqr" type="image" onClick="BBCmarqr()" onMouseOver="helpline('marqr')" class="postimage" alt="Marque to right">
</td>
</tr>
<tr>
<td><img src="mods/bbcode_box/images/dots.gif" style="padding-left: 4px;"></td>
<td>
<img border="0" src="mods/bbcode_box/images/code.gif" name="code" type="image" onClick="BBCcode()" onMouseOver="helpline('code')" class="postimage" alt="Code"><img border="0" src="mods/bbcode_box/images/quote.gif" name="quote" type="image" onClick="BBCquote()" onMouseOver="helpline('quote')" class="postimage" alt="Quote"><img border="0" src="mods/bbcode_box/images/spoil.gif" class="postimage" name="spoil" type="image" onClick="BBCspoil()" onMouseOver="helpline('spoil')" alt="" /><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/url.gif" name="url" type="image" onClick="BBCurl()" onMouseOver="helpline('url')" class="postimage" alt="URL"><img border="0" src="mods/bbcode_box/images/email.gif" name="email" type="image" onClick="BBCmail()" onMouseOver="helpline('mail')" class="postimage" alt="Email"><img border="0" src="mods/bbcode_box/images/web.gif" name="web" type="image" onClick="BBCweb()" onMouseOver="helpline('web')" class="postimage" alt="Web Page"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="20" border="0" alt=""><img border="0" src="mods/bbcode_box/images/img.gif" name="img" type="image" onClick="BBCimg()" onMouseOver="helpline('img')" class="postimage" alt="Image"><img border="0" src="mods/bbcode_box/images/flash.gif" name="flash" type="image" onClick="BBCflash()" onMouseOver="helpline('flash')" class="postimage" alt="Flash"><img border="0" src="mods/bbcode_box/images/video.gif" name="video" type="image" onClick="BBCvideo()" onMouseOver="helpline('video')" class="postimage" alt="Video"><img border="0" src="mods/bbcode_box/images/sound.gif" name="stream" type="image" onClick="BBCstream()" onMouseOver="helpline('stream')" class="postimage" alt="Stream"><img border="0" src="mods/bbcode_box/images/ram.gif" name="ram" type="image" onClick="BBCram()" onMouseOver="helpline('ram')" class="postimage" alt="Real Media"><img border="0" src="mods/bbcode_box/images/googlevid.gif" name="GVideo" type="image" onClick="BBCGVideo()" onMouseOver="helpline('googlevid')" class="postimage" alt="GoogleVid"><img border="0" src="mods/bbcode_box/images/youtube.gif" name="youtube" type="image" onClick="BBCyoutube()" onMouseOver="helpline('youtube')" class="postimage" alt="Youtube"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/list.gif" name="listdf" type="image" onClick="BBClist()" onMouseOver="helpline('list')" class="postimage" alt="List" /><img border="0" src="mods/bbcode_box/images/hr.gif" name="hr" type="image" onClick="BBChr()" onMouseOver="helpline('hr')" class="postimage" alt="H-Line"><img style="padding-left: 5px; padding-right: 5px;" src="mods/bbcode_box/images/blackdot.gif" width="1" height="100%" border="0" alt=""><img border="0" src="mods/bbcode_box/images/plain.gif" name="plain" type="image" onClick="BBCplain()" onMouseOver="helpline('plain')" class="postimage" alt="Remove BBcode">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><span>
<input></span>
</td>
</tr>
<tr>
<td>
<span><textarea>{MESSAGE}</textarea></span>
</td>
</tr>
</table>
</span></td>
</End>
#
#-------[ 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