So while i was making a new forum that most of my family will enjoy, I was testing before the release of the forum. During the test, I find that the posting buttons aren't working! When I click them, the button does not place the bbcode on the editor. I also find that the colors that were on the right side were gone. What Happened????
Image:
http://i39.tinypic.com/2ccqng9.png
Yes, i made the editor myself. Source:
Posting_buttons.html
','
','','','[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="{ROOT_PATH}js/editor.js"></script>
<tr>
<td align="center">
<div class="postbuttonsframe">
<!-- IF S_BBCODE_ALLOWED -->
<input type="button" class="buttonz" accesskey="b" name="addbbcode0" value="" onclick="bbstyle(0)" title="Bold" style="background: url('images/bbcode/text_bold.png');" />
<input type="button" class="buttonz" accesskey="i" name="addbbcode2" value="" onclick="bbstyle(2)" title="Italic" style="background: url('images/bbcode/text_italic.png');" />
<input type="button" class="buttonz" accesskey="u" name="addbbcode4" value="" onclick="bbstyle(4)" title="Underline" style="background: url('images/bbcode/text_underline.png');" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="buttonz" accesskey="q" name="addbbcode6" value="" onclick="bbstyle(6)" title="Quote" style="background: url('images/bbcode/comment.png');" />
<!-- ENDIF -->
<input type="button" class="buttonz" accesskey="c" name="addbbcode8" value="" onclick="bbstyle(8)" title="Code" style="background: url('images/bbcode/script_code.png');" />
<input type="button" class="buttonz" accesskey="l" name="addbbcode10" value="" onclick="bbstyle(10)" title="List Top" style="background: url('images/bbcode/page.png');" />
<input type="button" class="buttonz" accesskey="" name="addbbcode12" value="" onclick="bbstyle(12)" title="List" style="background: url('images/bbcode/page_white_cd.png');" />
<input type="button" class="buttonz" accesskey="" name="addlitsitem" value="" onclick="bbstyle(-1)" title="Item" style="background: url('images/bbcode/bullet_black.png');" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="buttonz" accesskey="" name="addbbcode14" value="" onclick="bbstyle(14)" title="Image" style="background: url('images/bbcode/photo_add.png');" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="buttonz" accesskey="" name="addbbcode16" value="" onclick="bbstyle(16)" title="Link" style="background: url('images/bbcode/link.png');" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="buttonz" accesskey="" name="addbbcode18" value="" onclick="bbstyle(18)" title="Flash" style="background: url('images/bbcode/film.png');" />
<input class="buttonz" name="addbbcode22" value="" onclick="bbstyle(22)" title="Youtube (post full youtube link)" type="button" style="background: url('images/bbcode/youtube.png');" />
<!-- ENDIF -->
<select class="fonteditor" 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>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
<option value="150">{L_FONT_LARGE}</option>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
<option value="200">{L_FONT_HUGE}</option>
<!-- ENDIF -->
<!-- ENDIF -->
</select>
<!-- 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 -->
</div>
</td>
</tr>
<tr>
<td id="helpline"<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->>{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]
CSS for it:
Image:
http://i39.tinypic.com/2ccqng9.png
Yes, i made the editor myself. Source:
Posting_buttons.html
Code:
<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]','
- ','
- ','
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="{ROOT_PATH}js/editor.js"></script>
<tr>
<td align="center">
<div class="postbuttonsframe">
<!-- IF S_BBCODE_ALLOWED -->
<input type="button" class="buttonz" accesskey="b" name="addbbcode0" value="" onclick="bbstyle(0)" title="Bold" style="background: url('images/bbcode/text_bold.png');" />
<input type="button" class="buttonz" accesskey="i" name="addbbcode2" value="" onclick="bbstyle(2)" title="Italic" style="background: url('images/bbcode/text_italic.png');" />
<input type="button" class="buttonz" accesskey="u" name="addbbcode4" value="" onclick="bbstyle(4)" title="Underline" style="background: url('images/bbcode/text_underline.png');" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="buttonz" accesskey="q" name="addbbcode6" value="" onclick="bbstyle(6)" title="Quote" style="background: url('images/bbcode/comment.png');" />
<!-- ENDIF -->
<input type="button" class="buttonz" accesskey="c" name="addbbcode8" value="" onclick="bbstyle(8)" title="Code" style="background: url('images/bbcode/script_code.png');" />
<input type="button" class="buttonz" accesskey="l" name="addbbcode10" value="" onclick="bbstyle(10)" title="List Top" style="background: url('images/bbcode/page.png');" />
<input type="button" class="buttonz" accesskey="" name="addbbcode12" value="" onclick="bbstyle(12)" title="List" style="background: url('images/bbcode/page_white_cd.png');" />
<input type="button" class="buttonz" accesskey="" name="addlitsitem" value="" onclick="bbstyle(-1)" title="Item" style="background: url('images/bbcode/bullet_black.png');" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="buttonz" accesskey="" name="addbbcode14" value="" onclick="bbstyle(14)" title="Image" style="background: url('images/bbcode/photo_add.png');" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="buttonz" accesskey="" name="addbbcode16" value="" onclick="bbstyle(16)" title="Link" style="background: url('images/bbcode/link.png');" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="buttonz" accesskey="" name="addbbcode18" value="" onclick="bbstyle(18)" title="Flash" style="background: url('images/bbcode/film.png');" />
<input class="buttonz" name="addbbcode22" value="" onclick="bbstyle(22)" title="Youtube (post full youtube link)" type="button" style="background: url('images/bbcode/youtube.png');" />
<!-- ENDIF -->
<select class="fonteditor" 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>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
<option value="150">{L_FONT_LARGE}</option>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
<option value="200">{L_FONT_HUGE}</option>
<!-- ENDIF -->
<!-- ENDIF -->
</select>
<!-- 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 -->
</div>
</td>
</tr>
<tr>
<td id="helpline"<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->>{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]
CSS for it:
Code:
/* misc */
.buttonz {
width: 24px !important;
height: 24px !important;
background-position: center !important;
background-repeat: no-repeat !important;
margin: 6px 0px !important;
opacity: .65 !important;
border: 0 !important;
}
.buttonz:hover {
opacity: .99 !important;
background-color: #ffffdf !important;
border: 1px solid #2f2f2f !important;
}
.postbuttonsframe {
background-image: url("/images/bbcode/frame.png");
}
.fonteditor {
background-color: #ffffff;
color: black;
margin: 1px 1px;
font-size: 1em;
}







