Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> Web page/template Editing
Kersus

Color and Font not working properly.

http://tripleoakleaf.myfreeforum.org/


myff_tripleoakleaf1


I seem to have mucked something up.  I've added some button features (spoiler, mod, lm) and now I can't use the color and font tags as normal.

They still work when manually typing in, but if you're creating a post, highlight text, and try the drop down menus -  it won't work.  

What did I mess up, and how can I fix it?
myff admin

Use a browser that allows you to see a javascript error console and see what that says.
myff admin

You need to clear the console so you can see what is happening on your forum, not the arcade!
Kersus

Ah sorry....  I can't edit the post as it's passed the 20 minute mark.  Feel free to remove that post.  It has the same errors, but all that other junk was unnecessary.  This must be closer to what is needed I think:

CSS - http://tripleoakleaf.myfreeforum....=ea0219c691ca2ef19795175f252255d0
Inlined stylesheet
@import must precede other rules
Line 200:
 @import url("templates/myff_tripleoakleaf1/formIE.css");
 --------------------------------------------------------^
JavaScript - http://googleads.g.doubleclick.ne...p;u_nmime=233&ifi=1&dtd=M
Unknown thread
Error:
name: ReferenceError
message: Security error: attempted to read protected variable
stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'

--------------------------------------------------------^

JavaScript - http://tripleoakleaf.myfreeforum....=ea0219c691ca2ef19795175f252255d0
Event thread: change
Error:
name: TypeError
message: Statement on line 1: Cannot convert undefined or null to Object
Backtrace:
 Line 1 of function script
   bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;
 ...
stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
myff admin

Well it is complaining about an object being undefined.

The only object I can see is:

this.form.addbbcode18

So how is this one different to the similar objects? Have you simply missed defining it?
Kersus

It was working before, so I must have changed something.  Oddly after adding the ipligence map to a completely different tpl, the Font size part works, but still no color.

I'm not sure which part defines it.

myff_tripleoakleaf1/posting_body.tpl

The mod tag process I went through on howtodoit used bbcode18 for the mod tag....  This may be the problem...  Do you want the whole tpl file?


Here are parts that seemed related:

Code:
/ Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
x_help = "mods only button";
y_help = "mods only button";
z_help = "Add Spoiler: [spoiler]text[/spoiler]";

// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[mod]','[/mod]','[lm]','[/lm]','[spoiler]','[/spoiler]');
imageTag = false;

<snip>

<td><span class="genmed">
           <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" />
           </span></td>
         
         <td><span class="genmed">
           <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" />
           </span></td>
         
         <td><span class="genmed">
           <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px"  onClick="bbstyle(14)" onMouseOver="helpline('p')" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
           </span></td>
<td><span class="genmed">
           <input type="button" class="button" accesskey="z" name="addbbcode22" value="Spoiler" style="text-decoration: underline; width: 55px" onClick="bbstyle(22)" onMouseOver="helpline('z')" />
           </span></td>
<td><span class="genmed">
           <input type="button" class="button" accesskey="x" name="addbbcode18" value="Mod" style="text-decoration: underline; width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
           </span></td>


        </tr>
        <tr>
         <td colspan="9">
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><span class="genmed"> &nbsp;{L_FONT_COLOR}:
               <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
                 <option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
                 <option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
                 <option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
                 <option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
                 <option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
                 <option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
                 <option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
                 <option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
                 <option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
                 <option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
                 <option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
                 <option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
                 <option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
                 <option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
                 <option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.selectedIndex=0;" onMouseOver="helpline('f')">
myff admin

You really seem to have wrecked the code

The array of tags does not seem to match the addbbcode numbers.
     
For example position 2 is [i] which does match with the italic tag adbbcode2, but your new ones just don't match to my eye.
Kersus

Beyond the original, I followed http://howtodoit.myfreeforum.org/...nt&topicid=742&highlight= to the letter and then copied same to make the lm tag.  Then I removed the code and list= tags from the buttons.  That's it.  

So what you're saying is that there's no simple way to re-assign the colors or mod?  It seems the mod tag and the color tag have the same assignment 18....

That isn't the whole tpl, just a couple pieces.

I was going to add the spoiler tag, but it was already there prior to anything I did but I added the button for it.

The [i] tag and button work fine....
Kersus

Okay, I fixed it (hopefully not just a band-aid).  The howtodoit thing I followed basically killed the color by conflicting it with the mod button.  

18 was setup as color and 20 as size/font originally.  Thus when the howtodoit article walks you through using 18 for mod it caused the issue.  

My fix may not be proper, but it worked.  I put color and font into the array where they would be in the 2 point increments - and just put mod, spoiler, etc after them and it's all good.  

I went step by step through my current tpl and the backup (the original), and I can't see any other cause for the issue.

Methinks I'll stay away from the howtodoits from now on and use other forum coding as an example.
myff admin

Well done, the howtodoit should qualify the fact that the numbers are dependent of whether you have added other bbcodes. but then you can never make code edits blindly really. There will always be minor differences between templates.
symon

admin (no pm's please) wrote:
Well done, the howtodoit should qualify the fact that the numbers are dependent of whether you have added other bbcodes. but then you can never make code edits blindly really. There will always be minor differences between templates.


Missed that point and have now added a warning.

Thanks for the report.
chargers4life

I spent 3 hours this morning trying to fix the same problem. The conversation in this thread helped me understand what was going on much better, but I still can't get the mod button to work and it keeps on messing up all my other buttons (b,i, u, and so on.), even though I tried the same work around as Kersus - I most likely missed some minor detail(s) though.

It would be nice if the procedure could be corrected a bit. I see that a note has been made, but simply changing the bbstyle(1 and addbbcode18 to bbstyle(22) and addbbcode22 didn't fix the errors for me.

I might try it again later, but for now, I just reverted the code in Posting_body.tpl back to what it was before I started the procedure
Awesome forum, BTW. I have found it greatly helpful for adding goodies to my new forum: http://chargers.myfastforum.org

Kersus wrote:
Okay, I fixed it (hopefully not just a band-aid).  The howtodoit thing I followed basically killed the color by conflicting it with the mod button.  

18 was setup as color and 20 as size/font originally.  Thus when the howtodoit article walks you through using 18 for mod it caused the issue.  

My fix may not be proper, but it worked.  I put color and font into the array where they would be in the 2 point increments - and just put mod, spoiler, etc after them and it's all good.  

I went step by step through my current tpl and the backup (the original), and I can't see any other cause for the issue.

Methinks I'll stay away from the howtodoits from now on and use other forum coding as an example.

chargers4life

Okay, I gave it another shot, and I feel like I'm very close to getting it to work. I have input all the code and I'm not getting any errors. However, when I click on the mod button, all I get is the word "undefined". I'm at a loss. I tried changing

x_help = "mods only button";

to

x_help = "{L_BBCODE_X_HELP}";

but that had no affect. Probably considered a silly idea by those more knowledgeable then me.

I also changed word "MOD" to "mod" in the value field of the following code, thinking that maybe some case sensitive problem was going on:

<td><span class="genmed">
          <input type="button" class="button" accesskey="x" name="addbbcode18" value="MOD" style="text-decoration: underline; width: 40px" onClick="bbstyle(1" onMouseOver="helpline('x')" />
          </span></td>
myff admin

Point 1 of the posting check lists asks for a link to the problem. In your case that would be a link where a guest could post.
chargers4life

Well, I did provide a link to my forum, 3 times, but point taken, I did not have it open for guests to post. It's open to guests to post now.

Here is a direct link to where you can post: http://chargers.myfastforum.org/about14.html

admin (no pm's please) wrote:
Point 1 of the posting check lists asks for a link to the problem. In your case that would be a link where a guest could post.
myff admin

That link is not guest postable.
Zudane

new topics are, but not replies.

And yes, clicking the button shows "undefined" leading me to think it calls a portion of code it can't find.
myff admin

Well it is simply down to the numbers.

MOD is defined as bbstyle(22) but reading the bbtags:

Code:

bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[mod]','[/mod]');


I see mod as being at position 18 hence 22 is beyond the end of the array and undefined.
chargers4life

That makes sense, but 18 and 20 were already taken, so I'm not sure what I would do with that information. Thanks for your help!  

Anyway, I decided to switch to the wysiwyg/New Style Posting Panel, and it looks sweet. I wonder if the MOD button can be added to that.
myff admin

I think you can add stuff, but it is still a matter of being able to understand the javascript.

You are lost on the mod button with the normal posting panel as you are editing without understanding the code, and that is not something a guide can really address.
chargers4life

You said that you see the mod (x) as needing to be 18 instead of 22.

Actually, it looks to me like it should have been made 24.

I had to break it down, in order to see it. It is just a lot of code, and I'm sure I'm not the only person that gets tired eyes.

The order of the helpline's were not consistent with the order of the BBCODE's, but that does not appear to be important.

Here is the break down:

--------------------------
Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[mod]','[/mod]')
--------------------------

#0
b_help = "{L_BBCODE_B_HELP}"

#for

<input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" />

--------------------------
#2
i_help = "{L_BBCODE_I_HELP}";

#for

<input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" />
 </span></td>


--------------------------
#4
u_help = "{L_BBCODE_U_HELP}";

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" />
 </span></td>


--------------------------
#6

q_help = "{L_BBCODE_Q_HELP}"; for array quote
#for
<td><span class="genmed">
 <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" />
 </span></td>


--------------------------
#8
c_help = "{L_BBCODE_C_HELP}"; for array code

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(" onMouseOver="helpline('c')" />
 </span></td>


--------------------------
#10
l_help = "{L_BBCODE_L_HELP}"; for array list

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" />
 </span></td>


--------------------------
#12
o_help = "{L_BBCODE_O_HELP}"; for array list=

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" />
 </span></td>


--------------------------
#14
p_help = "{L_BBCODE_P_HELP}"; for array img

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px"  onClick="bbstyle(14)" onMouseOver="helpline('p')" />
 </span></td>


--------------------------
#16
w_help = "{L_BBCODE_W_HELP}"; for array url

#for

<td><span class="genmed">
 <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
 </span></td>

--------------------------
#18
a_help = "{L_BBCODE_A_HELP}"; for array mod

#for

<td><span class="genmed"> &nbsp;{L_FONT_COLOR}:
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
 <option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
 <option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
 <option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
 <option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
 <option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
 <option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
 <option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
 <option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
 <option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
 <option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
 <option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
 <option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
 <option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
 <option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
 <option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select>

--------------------------

#THE DATA ABOVE SEEMS TO BE OUT OF SEQUENCE. IT HELPLINE HAS A OF "S", BUT THE BBCODE IS AN "A"

--------------------------
#20
s_help = "{L_BBCODE_S_HELP}";

for

&nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.selectedIndex=0;" onMouseOver="helpline('f')">
 <option value="0" class="genmed">{L_FONT_SIZE}</option>
 <option value="7" class="genmed">{L_FONT_TINY}</option>
 <option value="9" class="genmed">{L_FONT_SMALL}</option>
 <option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
 <option value="18" class="genmed">{L_FONT_LARGE}</option>
 <option  value="24" class="genmed">{L_FONT_HUGE}</option>
</select>
</span></td>
 <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
 </table>
</td>
<td><span class="genmed">

--------------------------

#THE CODE ABOVE APPEARS TO BE OUT OF SEQUENCE, BECAUSE THE HELPLINE IS AN "F", BUT THE BBCODE IS AN "S".

--------------------------
#22 f_help = "{L_BBCODE_F_HELP}";

FOR

<td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>

---------------------------

#CODE ABOVE APPEARS TO BE OUT OF SEQUENCE, BECAUSE THE HELPLINE IS AN "A", BUT THE BBCODE IS AN F.

--------------------------
#24
x_help = "{L_BBCODE_X_HELP}"; for array mod

FOR

<td><span class="genmed">
          <input type="button" class="button" accesskey="x" name="addbbcode22" value="mod" style="text-decoration: underline; width: 40px" onClick="bbstyle(22)" onMouseOver="helpline('x')" />
          </span></td>
----------------------------

#Code above appears to be where I goofed up. I probably should have use 24 for the addbbcode and bbstyle.
myff admin

The key is that the positions if the array:

Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[mod]','[/mod]')

add the same as the  bbcode numbers you use. At the moment the mod code is at 18 in that array, and the array only has the 18 elements, hence what ever is using 18 is wrong if it is not the mod code line, and if it is above 18 it will be undefined.
chargers4life

My thinking is that the array is fine.

Maybe following these steps would make it work:

Insert:
Code:
<td><span class="genmed">
          <input type="button" class="button" accesskey="x" name="addbbcode18" value="mod" style="text-decoration: underline; width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
          </span></td>

Right Before:
Code:
<td><span class="genmed"> &nbsp;{L_FONT_COLOR}:
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
 <option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
 <option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
 <option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
 <option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
 <option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
 <option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
 <option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
 <option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
 <option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
 <option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
 <option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
 <option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
 <option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
 <option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
 <option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select>

Then change, in the above code, addbbcode18 to addbbcode20.
And change, in the code below, addbbcode20 to addbbcode22
Code:
&nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.selectedIndex=0;" onMouseOver="helpline('f')">
 <option value="0" class="genmed">{L_FONT_SIZE}</option>
 <option value="7" class="genmed">{L_FONT_TINY}</option>
 <option value="9" class="genmed">{L_FONT_SMALL}</option>
 <option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
 <option value="18" class="genmed">{L_FONT_LARGE}</option>
 <option  value="24" class="genmed">{L_FONT_HUGE}</option>
</select>
</span></td>
 <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
 </table>
</td>
<td><span class="genmed">
myff admin

Since the array only has 18 elements code change that involve anything above addbbcode(1 have to be wrong.
chargers4life

You guys might want to consider updating the default code then, because I was given, by default, fewer elements than the number of numbered addbbcodes.

It's really not a big deal for me, because I completely wrote over that default code to get the wysiwyg/New Style Posting Panel.
admin (no pm's please) wrote:
Since the array only has 18 elements code change that involve anything above addbbcode(1 have to be wrong.

       myfreeforum.org Forum Index -> Web page/template Editing
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum