[ABD] Advanced BBcode box 3

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
BizimPencere
Registered User
Posts: 396
Joined: Sat Aug 25, 2007 8:31 pm

Re: [DEV] Advanced BBcode box 3

Post by BizimPencere »

I have bg.gif changed with bbcodebox image files.

These bg.gif I made full transparency.

And now all ok Thanks.
www.phpbbturkiye.net | Turkish phpBB3 support and development

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Re: [DEV] Advanced BBcode box 3

Post by RATT »

Tested this on black_pearl style and works flawlessly, Installed without any problem however, It left the original bbcode system under the advanced bbcode system. How would I go about removing the original bbcode system leaving the advanced only?

Here are my edits for posting_buttons.html

Code: Select all

<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
	<td colspan="2">
		<script type="text/javascript">
		// <![CDATA[
		
		// Define the bbCode tags
		var bbcode = new Array();
		var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;

// Helpline messages
var help_line = {
b: '{LA_BBCODE_B_HELP}',
i: '{LA_BBCODE_I_HELP}',
u: '{LA_BBCODE_U_HELP}',
q: '{LA_BBCODE_Q_HELP}',
c: '{LA_BBCODE_C_HELP}',
l: '{LA_BBCODE_L_HELP}',
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
d: '{LA_BBCODE_D_HELP}',
t: '{LA_BBCODE_T_HELP}',
tip: '{L_STYLES_TIP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
}

// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>

<!-- IF S_BBCODE_ALLOWED -->
<!-- // MOD : Advanced bbcode box for phpbb3.0.0 by leviatan21 - INICIO -->
<!--
<input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
-->
<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- // MOD : Advanced bbcode box for phpbb3.0.0 by leviatan21 - FIN -->
<!-- ENDIF -->
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<option value="150">{L_FONT_LARGE}</option>
<option value="200">{L_FONT_HUGE}</option>
</select></span>
<!-- ENDIF -->
</td>
</tr>
<!--
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
<td colspan="2">
<!-- BEGIN custom_tags -->
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
</td>
</tr>
<!-- ENDIF -->
-->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" class="helpline" value="{L_STYLES_TIP}" /></td>
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
<td class="genmed" align="center">{L_FONT_COLOR}</td>
<!-- ENDIF -->
</tr>
<!-- ENDIF -->
[/code]

User avatar
ahmedgroup
Registered User
Posts: 111
Joined: Thu Jul 19, 2007 12:45 pm

Re: [DEV] Advanced BBcode box 3

Post by ahmedgroup »

tables are not well made
plz make a box to ask user for number of rows and columns
but really it is very nice
plz also can u make a word interface
i mean that when user write
bb code dont appear but the colored text or the thing made
thnxxxxxxxxxxxx

User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: [DEV] Advanced BBcode box 3

Post by leviatan21 »

RATT wrote:Tested this on black_pearl style and works flawlessly, Installed without any problem however, It left the original bbcode system under the advanced bbcode system. How would I go about removing the original bbcode system leaving the advanced only?

Here are my edits for posting_buttons.html
Here it is, you do wrong this step

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
<!-- ENDIF -->
	</td>
</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find. 
#
-->
<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- // MOD : Advanced bbcode box for phpbb3.0.0 by leviatan21 - FIN -->
Should be :

Code: Select all

    <tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
       <td colspan="2">
          <script type="text/javascript">
          // <![CDATA[
          
          // Define the bbCode tags
          var bbcode = new Array();
          var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;

// Helpline messages
var help_line = {
b: '{LA_BBCODE_B_HELP}',
i: '{LA_BBCODE_I_HELP}',
u: '{LA_BBCODE_U_HELP}',
q: '{LA_BBCODE_Q_HELP}',
c: '{LA_BBCODE_C_HELP}',
l: '{LA_BBCODE_L_HELP}',
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
d: '{LA_BBCODE_D_HELP}',
t: '{LA_BBCODE_T_HELP}',
tip: '{L_STYLES_TIP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
}

// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>

<!-- IF S_BBCODE_ALLOWED -->
<!-- // MOD : Advanced bbcode box for phpbb3.0.0 by leviatan21 - INICIO -->
<!--
<input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<option value="150">{L_FONT_LARGE}</option>
<option value="200">{L_FONT_HUGE}</option>
</select></span>
-->
<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- // MOD : Advanced bbcode box for phpbb3.0.0 by leviatan21 - FIN -->
<!-- ENDIF -->
</td>
</tr>
<!--
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
<td colspan="2">
<!-- BEGIN custom_tags -->
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
</td>
</tr>
<!-- ENDIF -->
-->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" class="helpline" value="{L_STYLES_TIP}" /></td>
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
<td class="genmed" align="center">{L_FONT_COLOR}</td>
<!-- ENDIF -->
</tr>
<!-- ENDIF -->
[/code]
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español

User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: [DEV] Advanced BBcode box 3

Post by leviatan21 »

ahmedgroup wrote:tables are not well made
plz make a box to ask user for number of rows and columns
but really it is very nice

plz also can u make a word interface
i mean that when user write
bb code dont appear but the colored text or the thing made
thnxxxxxxxxxxxx
Excuseme, my English is not my first language, I will make your table fix, but I don't understand the 2º part :(
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Re: [DEV] Advanced BBcode box 3

Post by MrC »

leviatan21 wrote:
MrC wrote:Small problem

Image
MrC : That style is using?, please PM a link to your board, or giveme a link for download the style...
That style is a modified prosilver.
You got a PM

Sandeep2007
Registered User
Posts: 6
Joined: Sat Dec 22, 2007 8:52 pm

Re: [DEV] Advanced BBcode box 3

Post by Sandeep2007 »

Your website give the following error

No input file specified.

noltha
Registered User
Posts: 55
Joined: Thu Nov 15, 2007 9:11 am

Re: [DEV] Advanced BBcode box 3

Post by noltha »

Your website give the following error

No input file specified.
:(

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Re: [DEV] Advanced BBcode box 3

Post by MrC »

leviatan21 wrote:
MrC wrote:Small problem

Image
MrC : That style is using?, please PM a link to your board, or giveme a link for download the style...

Made the change, looking ok now.
Thanks for the help!

tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [DEV] Advanced BBcode box 3

Post by tupeu »

this is great mod
unfortunately some part of it is in spanish
hope you will be able to translate it to english, and maybe we can help if you need

User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: [DEV] Advanced BBcode box 3

Post by leviatan21 »

tupeu wrote:this is great mod
unfortunately some part of it is in spanish
hope you will be able to translate it to english, and maybe we can help if you need
Yes, I know that. Please giveme a fews hours to do the translate, and make 2 changes.
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Re: [DEV] Advanced BBcode box 3

Post by RATT »

Cheers,
Thank You. :)

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Re: [DEV] Advanced BBcode box 3

Post by RATT »

bbcode.js translation (english)

Code: Select all


var copy_paste ;

var help_line2 = {
	cb_justify : "Justify: [align=justify]text[/align]",
	cb_right : "Align Right: [align=right]text[/align]",
	cb_center : "Align Center: [align=center]text[/align]",
	cb_left : "Align Left: [align=left]text[/align]",

	cb_sup : "Superindice: [sup]text[/sup]",
	cb_sub : "Subindice: [sub]text[/sub]",

	cb_b : "Bold: [b]text[/b]",
	cb_i : "Italic: [i]text[/i]",
	cb_u : "Underlined: [u]text[/u]",
	cb_strike : "Strike through: [s]text[/s]",

	cb_fade : "Fade: [fade]text[/fade]", // (Internet Explorer Only)",
	cb_grad : "Gradient", // (Internet Explorer Only)",

	cb_rtl : "Right to left",
	cb_ltr : "Left to right",

	cb_marqd : "Displacement of text down: [marq=down]text[/marq]",
	cb_marqu : "Displacement of text up: [marq=up]text[/marq]",
	cb_marqr : "Displacement of text toward the right: [marq=right]text[/marq]",
	cb_marql : "Displacement of text toward the left: [marq=left]text[/marq]",

	cb_table : "Table Insert [table=][tr=][td=] text [/td][/tr][/table]",
	
	cb_quote : "Quote: [quote]text[/quote]",
	cb_code : "Code: [code]code
",

cb_spoil : "Spoiler: [spoil]text[/spoil]",

cb_url : "URL: [url]http://...[/url] or [url=http://...]Web Name[/url]",
cb_mail : "E-mail: info@phpbb.com",
cb_web : "Web page: [web]URL page[/web]",

cb_img : "Image: [img]http://...[/img]",

cb_flash : "Flash: [flash width=# height=#]URL File[/flash]",
cb_video : "Video: [video width=# height=#]URL File[/video]",
cb_stream : "Stream: [stream]URL File[/stream]",
cb_ram : "Real Media: [ram]URL File[/ram]",
cb_stage6 : "Stage6 Video: [stage6]Stage6 ID[/stage6]",
cb_googlevid : "Google Video: [GVideo]URL File[/GVideo]",
cb_youtube : "Youtube: ",

cb_listb : "Bullet List:
  • text
Note: Use [*] to create bullets",
cb_listm : "Ordered List:
  • text
Note: [*] list=1 or list=a",
cb_hr : "Header: [hr] Note: Creates a header line row to seperate text",

cb_fc : "Color: text We can use color=#FF0000 or color=red",
cb_fs : "Size: Small text",
cb_ft : "Text Select: [font=Tahoma]text[/font]",
cb_hili : "Highlight: [highlight=red]text[/highlight] Use this to highlight selected text color=#FF0000",

cb_cut : "Removes selected text",
cb_copy : "Copy to clipboard",
cb_paste : "Paste from clipboard",
cb_plain : "Erases BBCodes of selected text",

cb_symbol : "Inserts a symbol in the post"
}

function helpline2(help)
{
// document.forms[form_name].helpbox.value = help_line[help];
if ( !help_line2["cb_" + help] )
{
// document.getElementById('helpline').innerHTML = help_line[help] + '&nbsp;';
document.forms[form_name].helpbox.value = help_line[help];
}
else
{
// document.getElementById('helpline').innerHTML = help_line2["cb_" + help] + '&nbsp;';
document.forms[form_name].helpbox.value = help_line2["cb_" + help]
}
}

function bbstyle2(bbcode,ftvalue)
{
var doc;
if (document.forms[form_name])
{
doc = document;
}
else
{
doc = opener.document;
}
var txtarea = doc.forms[form_name].elements[text_name];

if ( bbcode == "justify" ) // BBCjustify();
{
bbfontstyle("[align=justify]", "[/align]");
}
else if ( bbcode == "right" ) // BBCright();
{
bbfontstyle("[align=right]", "[/align]");
}
else if ( bbcode == "center" ) // BBCcenter();
{
bbfontstyle("[align=center]", "[/align]");
}
else if ( bbcode == "left" ) // BBCleft();
{
bbfontstyle("[align=left]", "[/align]");
}
else if ( bbcode == "sup" ) // BBCsup();
{
bbfontstyle("[sup]", "[/sup]");
}
else if ( bbcode == "sub" ) // BBCsub();
{
bbfontstyle("[sub]", "[/sub]");
}
else if ( bbcode == "bold" ) // BBCbold();
{
bbfontstyle("", "");
}
else if ( bbcode == "italic" ) // BBCitalic();
{
bbfontstyle("", "");
}
else if ( bbcode == "under" ) // BBCunder();
{
bbfontstyle("", "");
}
else if ( bbcode == "strike" ) // BBCstrike();
{
bbfontstyle("", "");
}
else if ( bbcode == "fade" ) // BBCfade();
{
bbfontstyle("[fade]", "[/fade]");
}
else if ( bbcode == "grad" ) // BBCgrad();
{
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version

var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));

var oSelect,oSelectRange,oSelectLength;
txtarea.focus();

if ((clientVer >= 4) && is_ie && is_win)
{
oSelectRange = document.selection.createRange();
oSelectLength = oSelectRange.text.length
}
else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;

if (selEnd == 1 || selEnd == 2)
{
selEnd = selLength;
}

var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd);
var s3 = (txtarea.value).substring(selEnd, selLength);

oSelectRange = s2;
oSelectLength = selEnd - selStart;
}
if ( (oSelectLength < 1) || (!oSelectLength) )
{
alert("Please select text : " + oSelectLength);
return;
}
if (oSelectLength > 300)
{
alert("You have reached the 300 character limt : " + oSelectLength);
return;
}
if (window.showModalDialog)
{
showModalDialog("bbcode_box/grad.htm",oSelectRange,"help:no; center:yes; status:no; dialogHeight:100px; dialogWidth:650px");
}
else
{
initPopUp();
showPopWin('bbcode_box/modalContent.html', 650, 100, true);
}
}
else if ( bbcode == "dirrtl" ) // BBCdir('rtl');
{
// txtarea.dir=('rtl');
bbfontstyle("[dir=rtl]", "[/dir]");
}
else if ( bbcode == "dirltr" ) // BBCdir('ltr');
{
// txtarea.dir=('ltr');
bbfontstyle("[dir=ltr]", "[/dir]");
}
else if ( bbcode == "marqd" ) // BBCmarqd();
{
bbfontstyle("[marq=down]", "[/marq]");
}
else if ( bbcode == "marqu" ) // BBCmarqu();
{
bbfontstyle("[marq=up]", "[/marq]");
}
else if ( bbcode == "marql" ) // BBCmarql();
{
bbfontstyle("[marq=left]", "[/marq]");
}
else if ( bbcode == "marqr" ) // BBCmarqr();
{
bbfontstyle("[marq=right]", "[/marq]");
}
else if ( bbcode == "code" ) // BBCcode();
{
bbfontstyle("

Code: Select all

", "
");
}
else if ( bbcode == "quote" ) // BBCquote();
{
bbfontstyle("[quote]", "[/quote]");
}
else if ( bbcode == "spoil" ) // BBCspoil();
{
bbfontstyle("[spoil]", "[/spoil]");
}
else if ( bbcode == "table" ) // BBCtable();
{
bbfontstyle("[table=][tr=][td=]","[/td][/tr][/table]");
}
else if ( bbcode == "url" ) // BBCurl();
{
var FoundErrors = '';
var enterURL = prompt("Enter URL", "http://");
var enterTITLE = prompt("Enter Web URL", "Name of Web Page");
if (!enterURL)
{
FoundErrors += "You did not specify a valid URL.";
}
if (!enterTITLE)
{
FoundErrors += "You did not write the name of the page.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle(""+enterTITLE, "");
}
else if ( bbcode == "web" ) // BBCweb();
{
var FoundErrors = '';
var enterURL = prompt("Please enter a URL", "http://");
if (!enterURL)
{
FoundErrors += "You did not specify a valid URL.";
}
var enterW = prompt("Please enter width ", "99%");
if (!enterW)
{
FoundErrors += "You did not specify width.";
}
var enterH = prompt("Please enter height", "500");
if (!enterH)
{
FoundErrors += "You did not specify height.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[web width="+enterW+" height="+enterH+"]"+enterURL, "[/web]");
}
else if ( bbcode == "email" ) // BBCmail();
{
var FoundErrors = '';
var enterMail = prompt("Please enter E-mail","");
if (!enterMail)
{
FoundErrors += "You did not enter a valid E-mail.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[email]"+enterMail, "[/email]");
}
else if ( bbcode == "img" ) // BBCimg();
{
var FoundErrors = '';
var enterURL = prompt("Please enter image","http://");
if (!enterURL)
{
FoundErrors += "Image invalid";
}
if (FoundErrors)
{
alert("Error :"+FoundErrors);
return;
}
bbfontstyle("[img]"+enterURL, "[/img]");
}
else if ( bbcode == "flash" ) // BBCflash();
{
var FoundErrors = '';
var enterURL = prompt("Enter flash", "http://");
if (!enterURL)
{
FoundErrors += "Flash invalid.";
}
var enterW = prompt("Width of flash file", "250");
if (!enterW)
{
FoundErrors += "You did not specify the width of the flash file.";
}
var enterH = prompt("Height of flash file", "250");
if (!enterH)
{
FoundErrors += "You did not specify the height of the flash file.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[flash width="+enterW+" height="+enterH+"]"+enterURL, "[/flash]");
}
else if ( bbcode == "video" ) // BBCvideo();
{
var FoundErrors = '';
var enterURL = prompt("Please enter the URL of the video file.", "http://");
if (!enterURL)
{
FoundErrors += "You did not specify a URL.";
}
var enterW = prompt("Enter file width", "400");
if (!enterW)
{
FoundErrors += "You did not specify width.";
}
var enterH = prompt("Enter file height", "350");
if (!enterH)
{
FoundErrors += "You did not specify height.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[video width="+enterW+" height="+enterH+"]"+enterURL, "[/video]");
}
else if ( bbcode == "stream" ) // BBCstream();
{
var FoundErrors = '';
var enterURL = prompt("Please enter the URL for media","http://");
if (!enterURL)
{
FoundErrors += "You did not enter a URL.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[stream]"+enterURL, "[/stream]");
}
else if ( bbcode == "ram" ) // BBCram();
{
var FoundErrors = '';
var enterURL = prompt("Please enter Real Media URL","http://");
if (!enterURL)
{
FoundErrors += "You did not enter a Real Media URL.";
}
var enterW = prompt("Width of real media file", "220");
if (!enterW)
{
FoundErrors += "You did not enter the real media file width.";
}
var enterH = prompt("Height of real media file", "140");
if (!enterH)
{
FoundErrors += "You did not enter the real media height.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[ram width="+enterW+" height="+enterH+"]"+enterURL, "[/ram]");
}
else if ( bbcode == "stage" ) // BBCstage();
{
var FoundErrors = '';
var enterURL = prompt("Enter Stage6 ID","0");
if (!enterURL)
{
FoundErrors += "You have not entered a Stage6 ID";
}
var enterW = prompt("Enter real media width", "704");
if (!enterW)
{
FoundErrors += "You did not enter the real media file width.";
}
var enterH = prompt("Height of real media file", "496");
if (!enterH)
{
FoundErrors += "You did not enter the real media height.";
}
if (FoundErrors)
{
alert("Error :"+FoundErrors);
return;
}
bbfontstyle("[stage6 width="+enterW+" height="+enterH+"]"+enterURL, "[/stage6]");
}
else if ( bbcode == "GVideo" ) // BBCGVideo();
{
var FoundErrors = '';
var enterURL = prompt("Enter Google Video URL - Example: http://video.google.com/videoplay?docid ... 128","http://");
if (!enterURL)
{
FoundErrors += "You did not enter a Google Video URL.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[GVideo]"+enterURL, "[/GVideo]");
}
else if ( bbcode == "youtube" ) // BBCyoutube();
{
var FoundErrors = '';
var enterURL = prompt("Enter a YouTube URL - Example: http://www.youtube.com/watch?v=aabbcc12","http://");
if (!enterURL)
{
FoundErrors += "You did not enter a YouTube URL.";
}
if (FoundErrors)
{
alert("Error:"+FoundErrors);
return;
}
bbfontstyle("[youtube]"+enterURL, "[/youtube]");
}
else if ( bbcode == "listb" ) // BBClist();
{
bbfontstyle("
  • ", "
");
}
else if ( bbcode == "listm" ) // BBClist();
{
bbfontstyle("
  1. ", "
");
}
else if ( bbcode == "hr" ) // BBChr();
{
bbfontstyle("[hr]", "");
}
else if ( bbcode == "plain" ) // BBCplain();
{
if ((clientVer >= 4) && is_ie && is_win)
{
// Get text selection
theSelection = doc.selection.createRange().text;

if (theSelection != '')
{
temp = theSelection;
temp = temp.replace(/\[FLASH=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/FLASH\]/gi,"$1");
temp = temp.replace(/\[VIDEO=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/VIDEO\]/gi,"$1");
document.selection.createRange().text = temp.replace(/\[[^\]]*\]/gi,"");
}
}
else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;

if (selEnd == 1 || selEnd == 2)
{
selEnd = selLength;
}

var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd);
var s3 = (txtarea.value).substring(selEnd, selLength);

temp = s2;
temp = temp.replace(/\[FLASH=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/FLASH\]/gi,"$1");
temp = temp.replace(/\[VIDEO=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/VIDEO\]/gi,"$1");
temp = temp.replace(/\[[^\]]*\]/gi,"");
txtarea.value = s1 + temp + s3;

txtarea.selectionStart = selEnd + open.length + close.length;
txtarea.selectionEnd = txtarea.selectionStart;
txtarea.focus();
}
}
else if ( bbcode == "ft" ) // BBCft(ftvalue);
{
bbfontstyle("[font="+ftvalue+"]", "[/font]");
}
else if ( bbcode == "cut" )
{
if ((clientVer >= 4) && is_ie && is_win)
{
// Get text selection
theSelection = doc.selection.createRange().text;

if (theSelection != '')
{
document.selection.createRange().text = '';
}
}
else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;

if (selEnd == 1 || selEnd == 2)
{
selEnd = selLength;
}

txtarea.value = (txtarea.value).substring(0,selStart) + (txtarea.value).substring(selEnd, selLength);
txtarea.focus();
}
}
else if ( bbcode == "copy" )
{
if ((clientVer >= 4) && is_ie && is_win)
{
// Get text selection
copy_paste = doc.selection.createRange().text;
}
else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;

if (selEnd == 1 || selEnd == 2)
{
selEnd = selLength;
}

copy_paste = (txtarea.value).substring(selStart, selEnd);
txtarea.focus();
}
}
else if ( bbcode == "paste" )
{
bbfontstyle(''+copy_paste, '');
}
else
{
alert ("Error inesperado al utilizar eiqueta : "+bbcode);
return;
}
}

var FadeOut = true
var FadePas = 0;
var FadeMax = 255;
var FadeMin = 0;
var FadeStep = 2;
var FadeInt = 10;
var FadeInterval;

function fade_ontimer()
{
if (FadeOut)
{
FadePas+=FadeStep;
if (FadePas>FadeMax)
{
FadeOut = false;
}
}
else
{
FadePas-=FadeStep;
if (FadePas<FadeMin )
{
FadeOut = true;
clearInterval(FadeInterval);
}
};

if ((FadePas<FadeMax)&&(FadePas>FadeMin))
{
elem = getElementsByClassName("fade_link"); // alert( elem.length );
for (var i=0;i<elem.length;i++)
{
elem.style.color="rgb(" + FadePas + "," + FadePas + "," + FadePas + ")";
}
};

FadeInterval = setTimeout('fade_ontimer()', FadeInt);
}

function getElementsByClassName(classname)
{
if (document.getElementsByTagName)
{
var els = document.getElementsByTagName("*");
var c = new RegExp('/b^|' + classname + '|$/b');
final = new Array();
var n=0;
for (var i=0; i < els.length; i++)
{
if (els.className)
{
if(c.test(els.className))
{
final[n] = els;
n++;
}
}
}
return final;
}
else
{
return false;
}
}

/**
* COMMON DHTML FUNCTIONS
* These are handy functions I use all the time.
*
* By Seth Banks (webmaster at subimage dot com)
* http://www.subimage.com/
*
* Up to date code can be found at http://www.subimage.com/dhtml/
*
* This code is free for you to use anywhere, just keep this comment block.
*/

/**
* X-browser event handler attachment and detachment
* TH: Switched first true to false per http://www.onlinetools.org/articles/uno ... pter4.html
*
* @argument obj - the object to attach event to
* @argument evType - name of the event - DONT ADD "on", pass only "mouseover", etc
* @argument fn - function to call
*/
function addEvent(obj, evType, fn){
if (obj.addEventListener){
obj.addEventListener(evType, fn, false);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
return false;
}
}
function removeEvent(obj, evType, fn, useCapture){
if (obj.removeEventListener){
obj.removeEventListener(evType, fn, useCapture);
return true;
} else if (obj.detachEvent){
var r = obj.detachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be removed");
}
}

/**
* Code below taken from - http://www.evolt.org/article/document_b ... /17/30655/
*
* Modified 4/22/04 to work with Opera/Moz (by webmaster at subimage dot com)
*
* Gets the full width/height because it's different for most browsers.
*/
function getViewportHeight() {
if (window.innerHeight!=window.undefined) return window.innerHeight;
if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
if (document.body) return document.body.clientHeight;

return window.undefined;
}
function getViewportWidth() {
var offset = 17;
var width = null;
if (window.innerWidth!=window.undefined) return window.innerWidth;
if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth;
if (document.body) return document.body.clientWidth;
}

/**
* Gets the real scroll top
*/
function getScrollTop() {
if (self.pageYOffset) // all except Explorer
{
return self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
// Explorer 6 Strict
{
return document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
return document.body.scrollTop;
}
}
function getScrollLeft() {
if (self.pageXOffset) // all except Explorer
{
return self.pageXOffset;
}
else if (document.documentElement && document.documentElement.scrollLeft)
// Explorer 6 Strict
{
return document.documentElement.scrollLeft;
}
else if (document.body) // all other Explorers
{
return document.body.scrollLeft;
}
}

/**
* SUBMODAL v1.5
* Used for displaying DHTML only popups instead of using buggy modal windows.
*
* By Seth Banks
* http://www.subimage.com/
*
* Contributions by:
* Eric Angel - tab index code
* Scott - hiding/showing selects for IE users
* Todd Huss - inserting modal dynamically and anchor classes
*
* Up to date code can be found at http://www.subimage.com/dhtml/subModal
*
*
* This code is free for you to use anywhere, just keep this comment block.
*/

// Popup code
var gPopupMask = null;
var gPopupContainer = null;
var gPopFrame = null;
var gReturnFunc;
var gPopupIsShown = false;
var gDefaultPage = "bbcode_box/loading.html";
var gHideSelects = false;
var gReturnVal = null;

var gTabIndexes = new Array();
// Pre-defined list of tags we want to disable/enable tabbing into
var gTabbableTags = new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");

// If using Mozilla or Firefox, use Tab-key trap.
if (!document.all) {
document.onkeypress = keyDownHandler;
}



/**
* Initializes popup code on load.
*/
function initPopUp() {
// Add the HTML to the body
theBody = document.getElementsByTagName('BODY')[0];
popmask = document.createElement('div');
popmask.id = 'popupMask';
popcont = document.createElement('div');
popcont.id = 'popupContainer';
popcont.innerHTML = '' +
'<div id="popupInner">' +
'<div id="popupTitleBar">' +
'<div id="popupTitle">'+
'<font size="1" color="#cccccc"><a href="http://hvmdesign.com">Advanced BBCode Box MOD v5.0.0</a></font>'+
'</div>' +
'<div id="popupControls">' +
'<img src="bbcode_box/images/close.gif" onclick="hidePopWin(false);" id="popCloseBox" />' +
'</div>' +
'</div>' +
'<iframe src="'+ gDefaultPage +'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe>' +
'</div>';
theBody.appendChild(popmask);
theBody.appendChild(popcont);

gPopupMask = document.getElementById("popupMask");
gPopupContainer = document.getElementById("popupContainer");
gPopFrame = document.getElementById("popupFrame");

// check to see if this is IE version 6 or lower. hide select boxes if so
// maybe they'll fix this in version 7?
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
gHideSelects = true;
}
/*
// Add onclick handlers to 'a' elements of class submodal or submodal-width-height
var elms = document.getElementsByTagName('a');
for (i = 0; i < elms.length; i++) {
if (elms.className.indexOf("submodal") == 0) {
// var onclick = 'function (){showPopWin(\''+elms.href+'\','+width+', '+height+', null);return false;};';
// elms.onclick = eval(onclick);
elms.onclick = function(){
// default width and height
var width = 400;
var height = 200;
// Parse out optional width and height from className
params = this.className.split('-');
if (params.length == 3) {
width = parseInt(params[1]);
height = parseInt(params[2]);
}
showPopWin(this.href,width,height,null); return false;
}
}
}
*/
}
// addEvent(window, "load", initPopUp);

/**
* @argument width - int in pixels
* @argument height - int in pixels
* @argument url - url to display
* @argument returnFunc - function to call when returning true from the window.
* @argument showCloseBox - show the close box - default true
*/

function showPopWin(url, width, height, returnFunc, showCloseBox) {
// show or hide the window close widget
if (showCloseBox == null || showCloseBox == true) {
document.getElementById("popCloseBox").style.display = "block";
} else {
document.getElementById("popCloseBox").style.display = "none";
}
gPopupIsShown = true;
disableTabIndexes();
gPopupMask.style.display = "block";
gPopupContainer.style.display = "block";
// calculate where to place the window on screen
centerPopWin(width, height);

var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10);


gPopupContainer.style.width = width + "px";
gPopupContainer.style.height = (height+titleBarHeight) + "px";

setMaskSize();

// need to set the width of the iframe to the title bar width because of the dropshadow
// some oddness was occuring and causing the frame to poke outside the border in IE6
gPopFrame.style.width = parseInt(document.getElementById("popupTitleBar").offsetWidth, 10) + "px";
gPopFrame.style.height = (height) + "px";

// set the url
gPopFrame.src = url;

gReturnFunc = returnFunc;
// for IE
if (gHideSelects == true) {
hideSelectBoxes();
}

// window.setTimeout("setPopTitle();", 600);
}

//
var gi = 0;
function centerPopWin(width, height) {
if (gPopupIsShown == true) {
if (width == null || isNaN(width)) {
width = gPopupContainer.offsetWidth;
}
if (height == null) {
height = gPopupContainer.offsetHeight;
}

//var theBody = document.documentElement;
var theBody = document.getElementsByTagName("BODY")[0];
//theBody.style.overflow = "hidden";
var scTop = parseInt(getScrollTop(),10);
var scLeft = parseInt(theBody.scrollLeft,10);

setMaskSize();

//window.status = gPopupMask.style.top + " " + gPopupMask.style.left + " " + gi++;

var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10);

var fullHeight = getViewportHeight();
var fullWidth = getViewportWidth();

gPopupContainer.style.top = (scTop + ((fullHeight - (height+titleBarHeight)) / 2)) + "px";
gPopupContainer.style.left = (scLeft + ((fullWidth - width) / 2)) + "px";
//alert(fullWidth + " " + width + " " + gPopupContainer.style.left);
}
}
addEvent(window, "resize", centerPopWin);
addEvent(window, "scroll", centerPopWin);
window.onscroll = centerPopWin;


/**
* Sets the size of the popup mask.
*
*/
function setMaskSize() {
var theBody = document.getElementsByTagName("BODY")[0];

var fullHeight = getViewportHeight();
var fullWidth = getViewportWidth();

// Determine what's bigger, scrollHeight or fullHeight / width
if (fullHeight > theBody.scrollHeight) {
popHeight = fullHeight;
} else {
popHeight = theBody.scrollHeight;
}

if (fullWidth > theBody.scrollWidth) {
popWidth = fullWidth;
} else {
popWidth = theBody.scrollWidth;
}

gPopupMask.style.height = popHeight + "px";
gPopupMask.style.width = popWidth + "px";
}

/**
* @argument callReturnFunc - bool - determines if we call the return function specified
* @argument returnVal - anything - return value
*/
function hidePopWin(callReturnFunc) {
gPopupIsShown = false;
var theBody = document.getElementsByTagName("BODY")[0];
theBody.style.overflow = "";
restoreTabIndexes();
if (gPopupMask == null) {
return;
}
gPopupMask.style.display = "none";
gPopupContainer.style.display = "none";
if (callReturnFunc == true && gReturnFunc != null) {
// Set the return code to run in a timeout.
// Was having issues using with an Ajax.Request();
gReturnVal = window.frames["popupFrame"].returnVal;
window.setTimeout('gReturnFunc(gReturnVal);', 1);
}
gPopFrame.src = gDefaultPage;
// display all select boxes
if (gHideSelects == true) {
displaySelectBoxes();
}
}

/**
* Sets the popup title based on the title of the html document it contains.
* Uses a timeout to keep checking until the title is valid.
*/
function setPopTitle() {
return;
if (window.frames["popupFrame"].document.title == null) {
window.setTimeout("setPopTitle();", 10);
} else {
document.getElementById("popupTitle").innerHTML = window.frames["popupFrame"].document.title;
}
}

// Tab key trap. iff popup is shown and key was [TAB], suppress it.
// @argument e - event - keyboard event that caused this function to be called.
function keyDownHandler(e) {
if (gPopupIsShown && e.keyCode == 9) return false;
}

// For IE. Go through predefined tags and disable tabbing into them.
function disableTabIndexes() {
if (document.all) {
var i = 0;
for (var j = 0; j < gTabbableTags.length; j++) {
var tagElements = document.getElementsByTagName(gTabbableTags[j]);
for (var k = 0 ; k < tagElements.length; k++) {
gTabIndexes = tagElements[k].tabIndex;
tagElements[k].tabIndex="-1";
i++;
}
}
}
}

// For IE. Restore tab-indexes.
function restoreTabIndexes() {
if (document.all) {
var i = 0;
for (var j = 0; j < gTabbableTags.length; j++) {
var tagElements = document.getElementsByTagName(gTabbableTags[j]);
for (var k = 0 ; k < tagElements.length; k++) {
tagElements[k].tabIndex = gTabIndexes;
tagElements[k].tabEnabled = true;
i++;
}
}
}
}


/**
* Hides all drop down form select boxes on the screen so they do not appear above the mask layer.
* IE has a problem with wanted select form tags to always be the topmost z-index or layer
*
* Thanks for the code Scott!
*/
function hideSelectBoxes() {
for(var i = 0; i < document.forms.length; i++) {
for(var e = 0; e < document.forms[i].length; e++){
if(document.forms[i].elements[e].tagName == "SELECT") {
document.forms[i].elements[e].style.visibility="hidden";
}
}
}
}

/**
* Makes all drop down form select boxes on the screen visible so they do not reappear after the dialog is closed.
* IE has a problem with wanted select form tags to always be the topmost z-index or layer
*/
function displaySelectBoxes() {
for(var i = 0; i < document.forms.length; i++) {
for(var e = 0; e < document.forms[i].length; e++){
if(document.forms[i].elements[e].tagName == "SELECT") {
document.forms[i].elements[e].style.visibility="visible";
}
}
}
}[/code]

posting_abbcodes_buttons.html translation (english)

Code: Select all

<!-- MOD : BBCODES by MSSTI - 2/2 INICIO -->
<style>
/**
 * POPUP CONTAINER STYLES
 */
#popupMask {
	position: absolute;
	z-index: 200;
	top: 0px;
	left: 0px;
	width: 98%;
	height: 100%;
	opacity: .4;
/*	filter: alpha(opacity=40);	*/
	/* this hack is so it works in IE
	 * I find setting the color in the css gives me more flexibility 
	 * than the PNG solution. */	 
	background-color:transparent !important;
	background-color: #333333;
	/* this hack is for opera support
	 * you can uncomment the background-image if you don't care about opera.
	 * this gives you the flexibility to use any bg color that you want, instead of the png	*/
	background-image: url("../../../images/maskBG.png") !important; /* For browsers Moz, Opera, etc. */
	background-image:none;
	background-repeat: repeat;
	display:none;
}

#popupContainer {
	position: absolute;
	z-index: 201;
	top: 0px;
	left: 0px;
	display:none;
	padding: 0px;
}
#popupInner {
	border: 2px solid #000000;
	background-color: #ffffff;
}

#popupFrame {
	margin: 0px;
	width: 100%;
	height: 100%;
	position: relative;
	z-index: 202;
}
#popupTitleBar {
	background-color: #486CAE;
	color: #ffffff;
	font-weight: bold;
	height: 1.3em;
	padding: 5px;
	border-bottom: 2px solid #000000;
	border-top: 1px solid #78A3F2;
	border-left: 1px solid #78A3F2;
	border-right: 1px solid #204095;
	position: relative;
	z-index: 203;
}
#popupTitle {
	float:left;
	font-size: 1.1em;
}
#popupControls {
	float: right;
	cursor: pointer;
/*	cursor: hand;	*/
}
#posttable img {
	cursor: pointer;
	border: 0;
}
</style>
		<table id="posttable" width="100%" border="1" bordercolor="#C0C0C0" style="border-collapse: collapse;" cellspacing="0" cellpadding="0" valign="top">
			<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}" height="30">
				<td background="bbcode_box/images/bg.gif" valign="middle" colspan="2">
					<span style="float:right;padding:5px 5px 0 0;font-size:10px;color:#cccccc;"><a href="http://www.mssti.com/phpbb2">Advanced BBCode Box 3</a></span>
					<img src="bbcode_box/images/dots.gif" style="padding-left: 4px;">
					<select style="height: 20px;" class="genmed"	name="ft" onChange="bbstyle2('ft',this.form.ft.options[this.form.ft.selectedIndex].value);this.form.ft.selectedIndex = 0" onMouseOver="helpline2('ft')" onMouseOut="helpline2('tip')">
						<option style="font-weight : bold;" selected="selected">Font Selection</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Arial;"					class="genmed"	value="Arial" >Arial</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Arial Black;"			class="genmed"	value="Arial Black" >Arial Black</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Century Gothic;"		class="genmed"	value="Century Gothic" >Century Gothic</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Comic Sans MS;"			class="genmed"	value="Comic Sans MS" >Comic Sans MS</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Courier New;"			class="genmed"	value="Courier New" >Courier New</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Georgia;"				class="genmed"	value="Georgia" >Georgia</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Lucida Console;"		class="genmed"	value="Lucida Console">Lucida Console</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Microsoft Sans Serif;"	class="genmed"	value="Microsoft Sans Serif" >Microsoft Sans Serif</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Symbol;"				class="genmed"	value="Symbol" >Symbol</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Tahoma;"				class="genmed"	value="Tahoma" >Tahoma</option>
						<option style="color:black; background-color: #FFFFFF; font-family: Trebuchet;"				class="genmed"	value="Trebuchet" >Trebuchet</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Times New Roman;"		class="genmed"	value="Times New Roman" >Times New Roman</option> 
						<option style="color:black; background-color: #FFFFFF; font-family: Verdana;"				class="genmed"	value="Verdana" >Verdana</option> 
					</select>
					<img src="bbcode_box/images/dots.gif" style="padding-left: 4px;">
					<select style="height: 20px" class="genmed"		name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 0;" onMouseOver="helpline2('fs')" onMouseOut="helpline2('tip')">
						<option style="font-weight : bold;" selected="selected">{L_FONT_SIZE}</option>
						<option style="font-size:50%"	class="genmed"	value="50">{L_FONT_TINY}</option>
						<option style="font-size:85%"	class="genmed"	value="85">{L_FONT_SMALL}</option>
						<option style="font-size:100%"	class="genmed"	value="100">{L_FONT_NORMAL}</option>
						<option style="font-size:150%"	class="genmed"	value="150">{L_FONT_LARGE}</option>
						<option style="font-size:200%"	class="genmed"	value="200">{L_FONT_HUGE}</option>
						<option style="font-size:300%"	class="genmed"	value="300">Gigante</option>
					</select>
					<img src="bbcode_box/images/dots.gif" style="padding-left: 4px;">
					<select style="height: 20px" class="genmed"		name="hili" onchange="bbfontstyle('[highlight=#' + this.form.hili.options[this.form.hili.selectedIndex].value + ']', '[/highlight]');this.form.hili.selectedIndex = 0;" onMouseOver="helpline2('hili')" onMouseOut="helpline2('tip')">
						<option value="" selected="selected">Highlight</option>
						<option value="000000" style="background-color:black">black</option>
						<option value="FFFFFF" style="background-color:white">white</option>
						<option value="00BFFF" style="background-color:skyblue">skyblue</option>
						<option value="4169E1" style="background-color:royalblue">royalblue</option>
						<option value="0000FF" style="background-color:blue">blue</option>
						<option value="00008B" style="background-color:darkblue">darkblue</option>
						<option value="FFA500" style="background-color:orange">orange</option>
						<option value="FF6347" style="background-color:tomato">tomato</option>
						<option value="FF7F50" style="background-color:coral">coral</option>
						<option value="FF4500" style="background-color:orangered">orangered</option>
						<option value="DC143C" style="background-color:crimson">crimson</option>
						<option value="FF0000" style="background-color:red">red</option>
						<option value="B22222" style="background-color:firebrick">firebrick</option>
						<option value="8B0000" style="background-color:darkred">darkred</option>
						<option value="008000" style="background-color:green">green</option>
						<option value="32CD32" style="background-color:limegreen">limegreen</option>
						<option value="2E8B57" style="background-color:seagreen">seagreen</option>
						<option value="FF1493" style="background-color:deeppink">deeppink</option>
						<option value="800080" style="background-color:purple">purple</option>
						<option value="4B0082" style="background-color:indigo">indigo</option>
						<option value="DEB887" style="background-color:burlywood">burlywood</option>
						<option value="F4A460" style="background-color:sandybrown">sandybrown</option>
						<option value="A0522D" style="background-color:sienna">sienna</option>
						<option value="D2691E" style="background-color:chocolate">chocolate</option>
						<option value="008080" style="background-color:teal">teal</option>
						<option value="C0C0C0" style="background-color:silver">silver</option>
						<option value="808080" style="background-color:gray">gray</option>
					</select>
				</td>
			</tr>
			<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}" height="30">
				<td background="bbcode_box/images/bg.gif" valign="middle" colspan="2"> 
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/justify.gif"	class="postimage"	type="image"	name="justify"		onClick="bbstyle2('justify')"	onMouseOver="helpline2('justify')"	onMouseOut="helpline2('tip')"	title="Justifide" />
					<img src="bbcode_box/images/right.gif" 		class="postimage"	type="image"	name="right"		onClick="bbstyle2('right')"		onMouseOver="helpline2('right')"	onMouseOut="helpline2('tip')"	title="Align Right" />
					<img src="bbcode_box/images/center.gif"		class="postimage"	type="image"	name="center"		onClick="bbstyle2('center')"	onMouseOver="helpline2('center')"	onMouseOut="helpline2('tip')"	title="Align Center" />
					<img src="bbcode_box/images/left.gif"		class="postimage"	type="image"	name="left"			onClick="bbstyle2('left')"		onMouseOver="helpline2('left')"		onMouseOut="helpline2('tip')"	title="Align Left" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/sup.gif"		class="postimage"	type="image"	name="supscript"	onClick="bbstyle2('sup')"		onMouseOver="helpline2('sup')"		onMouseOut="helpline2('tip')"	title="Superindice" />
					<img src="bbcode_box/images/sub.gif"		class="postimage"	type="image"	name="subs"			onClick="bbstyle2('sub')"		onMouseOver="helpline2('sub')"		onMouseOut="helpline2('tip')"	title="Subindice" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/bold.gif"		class="postimage"	type="image"	name="bold"			onClick="bbstyle2('bold')"		onMouseOver="helpline2('b')"		onMouseOut="helpline2('tip')"	title="Bold" />
					<img src="bbcode_box/images/italic.gif"		class="postimage"	type="image"	name="italic"		onClick="bbstyle2('italic')"	onMouseOver="helpline2('i')"		onMouseOut="helpline2('tip')"	title="Italic" />
					<img src="bbcode_box/images/under.gif"		class="postimage"	type="image"	name="under"		onClick="bbstyle2('under')"		onMouseOver="helpline2('u')"		onMouseOut="helpline2('tip')"	title="Underlined" />
					<img src="bbcode_box/images/strike.gif"		class="postimage"	type="image"	name="strik"		onClick="bbstyle2('strike')"	onMouseOver="helpline2('strike')"	onMouseOut="helpline2('tip')"	title="Strike through" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/fade.gif"		class="postimage"	type="image"	name="fade"			onClick="bbstyle2('fade')"		onMouseOver="helpline2('fade')"		onMouseOut="helpline2('tip')"	title="Fade" />
					<img src="bbcode_box/images/grad.gif"		class="postimage"	type="image"	name="grad"			onClick="bbstyle2('grad')"		onMouseOver="helpline2('grad')"		onMouseOut="helpline2('tip')"	title="Gradient" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/rtl.gif"		class="postimage"	type="image"	name="dirrtl"		onClick="bbstyle2('dirrtl')"	onMouseOver="helpline2('rtl')"		onMouseOut="helpline2('tip')"	title="Right to Left" />
					<img src="bbcode_box/images/ltr.gif"		class="postimage"	type="image"	name="dirltr"		onClick="bbstyle2('dirltr')"	onMouseOver="helpline2('ltr')"		onMouseOut="helpline2('tip')"	title="Left to Right" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/marqd.gif"		class="postimage"	type="image"	name="marqd"		onClick="bbstyle2('marqd')"		onMouseOver="helpline2('marqd')"	onMouseOut="helpline2('tip')"	title="Marquee down" />
					<img src="bbcode_box/images/marqu.gif"		class="postimage"	type="image"	name="marqu"		onClick="bbstyle2('marqu')"		onMouseOver="helpline2('marqu')"	onMouseOut="helpline2('tip')"	title="Marquee up" />
					<img src="bbcode_box/images/marql.gif"		class="postimage"	type="image"	name="marql"		onClick="bbstyle2('marql')"		onMouseOver="helpline2('marql')"	onMouseOut="helpline2('tip')"	title="Marquee left" />
					<img src="bbcode_box/images/marqr.gif"		class="postimage"	type="image"	name="marqr"		onClick="bbstyle2('marqr')"		onMouseOver="helpline2('marqr')"	onMouseOut="helpline2('tip')"	title="Marquee right" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/table.gif"		class="postimage"	type="image"	name="table"		onClick="bbstyle2('table')"		onMouseOver="helpline2('table')"	onMouseOut="helpline2('tip')"	title="Table Insert" />
				</td>
			</tr>
			<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}" height="30">
				<td background="bbcode_box/images/bg.gif" valign="middle" colspan="2">
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/code.gif"		class="postimage"	type="image"	name="code"			onClick="bbstyle2('code')"		onMouseOver="helpline2('code')"		onMouseOut="helpline2('tip')"	title="Code" />
					<img src="bbcode_box/images/quote.gif"		class="postimage"	type="image"	name="quote"		onClick="bbstyle2('quote')"		onMouseOver="helpline2('quote')"	onMouseOut="helpline2('tip')"	title="Quote" />
					<!-- IF S_BBCODE_QUOTE -->
					<img src="bbcode_box/images/spoil.gif"		class="postimage"	type="image"	name="spoil"		onClick="bbstyle2('spoil')"		onMouseOver="helpline2('spoil')"	onMouseOut="helpline2('tip')"	title="Spoiler" />
					<!-- ENDIF -->
					<!-- IF S_LINKS_ALLOWED -->
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/emule.gif"		class="postimage"	type="image"	name="url"			onClick="bbstyle2('url')"		onMouseOver="helpline2('url')"		onMouseOut="helpline2('tip')"	title="Emule" />
					<img src="bbcode_box/images/url.gif"		class="postimage"	type="image"	name="url"			onClick="bbstyle2('url')"		onMouseOver="helpline2('url')"		onMouseOut="helpline2('tip')"	title="Url" />
					<img src="bbcode_box/images/email.gif"		class="postimage"	type="image"	name="email"		onClick="bbstyle2('email')"		onMouseOver="helpline2('mail')"		onMouseOut="helpline2('tip')"	title="E-mail" />
					<!-- ENDIF -->
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<!-- IF S_BBCODE_IMG -->
					<img src="bbcode_box/images/img.gif"		class="postimage"	type="image"	name="img"			onClick="bbstyle2('img')"		onMouseOver="helpline2('img')"		onMouseOut="helpline2('tip')"	title="Image" />
					<!-- ENDIF -->
					<!-- IF S_BBCODE_FLASH -->
					<img src="bbcode_box/images/flash.gif"		class="postimage"	type="image"	name="flash"		onClick="bbstyle2('flash')"		onMouseOver="helpline2('flash')"	onMouseOut="helpline2('tip')"	title="Flash" />
					<!-- ENDIF -->
					<img src="bbcode_box/images/video.gif"		class="postimage"	type="image"	name="video"		onClick="bbstyle2('video')"		onMouseOver="helpline2('video')"	onMouseOut="helpline2('tip')"	title="Video" />
					<img src="bbcode_box/images/sound.gif"		class="postimage"	type="image"	name="stream"		onClick="bbstyle2('stream')"	onMouseOver="helpline2('stream')"	onMouseOut="helpline2('tip')"	title="Stream" />
					<img src="bbcode_box/images/ram.gif"		class="postimage"	type="image"	name="ram"			onClick="bbstyle2('ram')"		onMouseOver="helpline2('ram')"		onMouseOut="helpline2('tip')"	title="Real Media" />
					<img src="bbcode_box/images/stage.gif"		class="postimage"	type="image"	name="stage" 		onClick="bbstyle2('stage')"		onMouseOver="helpline2('stage6')"	onMouseOut="helpline2('tip')"	title="Stage6 Video" />
					<img src="bbcode_box/images/googlevid.gif"	class="postimage"	type="image"	name="GVideo"		onClick="bbstyle2('GVideo')"	onMouseOver="helpline2('googlevid')"onMouseOut="helpline2('tip')"	title="Google Video" />
					<img src="bbcode_box/images/youtube.gif"	class="postimage"	type="image"	name="youtube"		onClick="bbstyle2('youtube')"	onMouseOver="helpline2('youtube')"	onMouseOut="helpline2('tip')"	title="Youtube" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/listbullets.gif"class="postimage"	type="image"	name="listb"		onClick="bbstyle2('listb')"		onMouseOver="helpline2('listb')"	onMouseOut="helpline2('tip')"	title="Bullet List" />
					<img src="bbcode_box/images/listnumber.gif"	class="postimage"	type="image"	name="listm"		onClick="bbstyle2('listm')"		onMouseOver="helpline2('listm')"	onMouseOut="helpline2('tip')"	title="Ordered List" />
					<img src="bbcode_box/images/hr.gif"			class="postimage"	type="image"	name="hr"			onClick="bbstyle2('hr')"		onMouseOver="helpline2('hr')"		onMouseOut="helpline2('tip')"	title="Header" />
					<img src="bbcode_box/images/dots.gif"		style="padding-left: 4px;">
					<img src="bbcode_box/images/cut.gif"		class="postimage"	type="image"	name="cut"			onClick="bbstyle2('cut')"		onMouseOver="helpline2('cut')"		onMouseOut="helpline2('tip')" 	title="Erase" />
					<img src="bbcode_box/images/copy.gif"		class="postimage"	type="image"	name="copy"			onClick="bbstyle2('copy')"		onMouseOver="helpline2('copy')"		onMouseOut="helpline2('tip')" 	title="Clipboard" />
					<img src="bbcode_box/images/paste.gif"		class="postimage"	type="image"	name="paste"		onClick="bbstyle2('paste')"		onMouseOver="helpline2('paste')"	onMouseOut="helpline2('tip')" 	title="Paste" />
					<img src="bbcode_box/images/plain.gif"		class="postimage"	type="image"	name="plain"		onClick="bbstyle2('plain')"		onMouseOver="helpline2('plain')"	onMouseOut="helpline2('tip')" 	title="Plain" />
				</td>
			</tr>
			<!-- BEGIN custom_tags -->
			<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}" height="30">
				<td background="bbcode_box/images/bg.gif" valign="middle" colspan="2">
					<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
				</td>
			</tr>
			<!-- END custom_tags -->
		</table>
<!-- MOD : BBCODES by MSSTI - 2/2 FIN -->

User avatar
ahmedgroup
Registered User
Posts: 111
Joined: Thu Jul 19, 2007 12:45 pm

Re: [DEV] Advanced BBcode box 3

Post by ahmedgroup »

leviatan21 wrote:
ahmedgroup wrote:tables are not well made
plz make a box to ask user for number of rows and columns
but really it is very nice

plz also can u make a word interface
i mean that when user write
bb code dont appear but the colored text or the thing made
thnxxxxxxxxxxxx
Excuseme, my English is not my first language, I will make your table fix, but I don't understand the 2º part :(
thnxx for reply
1st part ---adjusting tables
2nd part--- i want that your bbcode box became an WYSIWYG editor
i mean that bbcode do not appear but the opeartion appear
operation means image or coloured text
i mean that it is like
http://www.phpbb.com/community/viewtopi ... 0&t=546265

tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [DEV] Advanced BBcode box 3

Post by tupeu »

could someone post a link to download this mod ? :roll:

Locked

Return to “[3.0.x] Abandoned MODs”