PDA

View Full Version : Increase & Decrease Editor Size Broken?


CoryNickerson
02-19-2008, 04:17 AM
Hello,

I still can't figure this out. I've re-designed my editor interface and moved the increase/decrease size for the editor to the bottom right of the editor. But now the buttons aren't working. They aren't even working as links.

<td class="editor_bottom" align="right">
<div class="imagebutton" id="{$editorid}_cmd_resize_0_100"><img src="$stylevar[imgdir_editor]/resize_0.png" width="21" height="9" alt="$vbphrase[decrease_size]" /></div>
<div class="imagebutton" id="{$editorid}_cmd_resize_1_100"><img src="$stylevar[imgdir_editor]/resize_1.png" width="21" height="9" alt="$vbphrase[increase_size]" /></div>
</td>

It looks to be fine. Anyone see any mistakes or conflicts that may be causing this error?

Antivirus
02-19-2008, 03:10 PM
i suspect an association with your javascript file

CoryNickerson
02-19-2008, 05:10 PM
I thought it may have something to do with that as well. But it still works in the "quick edit post" editor. Just not in new reply and new thread. Those both use the same templates. With the fact that I didn't edit the JS would lead me to the conclusion that somethings wrong in the template.

Heres the full template.

$vBeditTemplate[clientscript]

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="$editorid" class="editor_top">
<div id="{$editorid}_controls" class="controlbar">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<if condition="$show['font_bbcode']">
<td><div class="imagebutton" id="{$editorid}_popup_fontname" title="$vbphrase[fonts]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="popup_feedback"><div id="{$editorid}_font_out" style="width:91px">&nbsp;</div></td>
<td class="popup_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.png" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>
<if condition="$show['size_bbcode']">
<td><div class="imagebutton" id="{$editorid}_popup_fontsize" title="$vbphrase[sizes]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="popup_feedback"><div id="{$editorid}_size_out" style="width:25px">&nbsp;</div></td>
<td class="popup_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.png" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>
<if condition="$show['color_bbcode']">
<td><div class="imagebutton" id="{$editorid}_popup_forecolor" title="$vbphrase[colors]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="{$editorid}_color_out"><img src="$stylevar[imgdir_editor]/color.png" width="21" height="16" alt="" /><br /><img src="$vboptions[cleargifurl]" id="{$editorid}_color_bar" alt="" style="background-color:black" width="21" height="4" /></td>
</tr>
</table>
</div></td>
</if>
<if condition="$show['wysiwygsmilies']">
<td>|</td>
<td><div class="imagebutton" id="{$editorid}_popup_smilie" title="$vbphrase[smilies]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_editor]/smilie.png" alt="" width="21" height="20" /></td>
</tr>
</table>
</div></td>
</if>

<if condition="$show['basic_bbcode']">
<td>|</td>
<td><div class="imagebutton" id="{$editorid}_cmd_bold"><img src="$stylevar[imgdir_editor]/bold.png" width="21" height="20" alt="$vbphrase[bold]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_italic"><img src="$stylevar[imgdir_editor]/italic.png" width="21" height="20" alt="$vbphrase[italic]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_underline"><img src="$stylevar[imgdir_editor]/underline.png" width="21" height="20" alt="$vbphrase[underline]" /></div></td>
<td>|</td>
</if>
<if condition="$show['align_bbcode']">
<if condition="$stylevar['textdirection'] == 'ltr'">
<td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.png" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.png" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.png" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
<else />
<td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.png" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.png" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.png" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
</if>
<td>|</td>
</if>
<if condition="$show['list_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_insertorderedlist"><img src="$stylevar[imgdir_editor]/insertorderedlist.png" width="21" height="20" alt="$vbphrase[ordered_list]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_insertunorderedlist"><img src="$stylevar[imgdir_editor]/insertunorderedlist.png" width="21" height="20" alt="$vbphrase[unordered_list]" /></div></td>
</if>
<if condition="$show['align_bbcode'] OR $show['list_bbcode']">
<if condition="$stylevar['textdirection'] == 'ltr'">
<td><div class="imagebutton" id="{$editorid}_cmd_outdent"><img src="$stylevar[imgdir_editor]/outdent.png" width="21" height="20" alt="$vbphrase[decrease_indent]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_indent"><img src="$stylevar[imgdir_editor]/indent.png" width="21" height="20" alt="$vbphrase[increase_indent]" /></div></td>
<else />
<td><div class="imagebutton" id="{$editorid}_cmd_outdent"><img src="$stylevar[imgdir_editor]/indent.png" width="21" height="20" alt="$vbphrase[decrease_indent]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_indent"><img src="$stylevar[imgdir_editor]/outdent.png" width="21" height="20" alt="$vbphrase[increase_indent]" /></div></td>
</if>
<td>|</td>
</if>
<if condition="$show['url_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_createlink"><img src="$stylevar[imgdir_editor]/createlink.png" width="21" height="20" alt="$vbphrase[insert_link]" /></div></td>
</if>
<if condition="$show['img_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_insertimage"><img src="$stylevar[imgdir_editor]/insertimage.png" width="21" height="20" alt="$vbphrase[insert_image]" /></div></td>
</if>
<if condition="$show['quote_bbcode']">
<td>|</td>
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar[imgdir_editor]/quote.png" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>
<td>|</td>
</if>
<if condition="$show['code_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_code"><img src="$stylevar[imgdir_editor]/code.png" width="21" height="20" alt="$vbphrase[wrap_code_tags]" /></div></td>
</if>
<!--
<td>|</td>
<td><div class="imagebutton" id="{$editorid}_cmd_cut"><img src="$stylevar[imgdir_editor]/cut.png" width="21" height="20" alt="$vbphrase[cut]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_copy"><img src="$stylevar[imgdir_editor]/copy.png" width="21" height="20" alt="$vbphrase[copy]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_paste"><img src="$stylevar[imgdir_editor]/paste.png" width="21" height="20" alt="$vbphrase[paste]" /></div></td>
-->
<td>|</td>
<td><div class="imagebutton" id="{$editorid}_cmd_undo"><img src="$stylevar[imgdir_editor]/undo.png" width="16" height="16" alt="$vbphrase[undo]" /></div></td>
<td><div class="imagebutton" id="{$editorid}_cmd_redo"><img src="$stylevar[imgdir_editor]/redo.png" width="16" height="16" alt="$vbphrase[redo]" /></div></td>
<td width="100%">&nbsp;</td>
<if condition="is_browser('ie') AND !is_browser('mac')">
<td><div class="imagebutton" id="{$editorid}_cmd_spelling"><img src="$stylevar[imgdir_editor]/spelling.png" width="21" height="20" alt="$vbphrase[check_spelling]" /></div></td>
</if>


$vBeditTemplate[extrabuttons]

</tr>
</table>

</div>
</td>
</tr>
<tr>
<td class="editor_middle">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="top">
<td>
<textarea name="message" id="{$editorid}_textarea" style="border:none; width:100%; height:300px;" tabindex="1" dir="$stylevar[textdirection]">$newpost[message]</textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="editor_bottom" align="right">
<div class="imagebutton" id="{$editorid}_cmd_resize_0_100"><img src="$stylevar[imgdir_editor]/resize_0.png" width="21" height="9" alt="$vbphrase[decrease_size]" /></div>
<div class="imagebutton" id="{$editorid}_cmd_resize_1_100"><img src="$stylevar[imgdir_editor]/resize_1.png" width="21" height="9" alt="$vbphrase[increase_size]" /></div>
</td>
</tr>
</table>

<input type="hidden" name="wysiwyg" id="{$editorid}_mode" value="$editortype" />

<script type="text/javascript">
<!--
vB_Editor['$editorid'] = new vB_Text_Editor('$editorid', $editortype, '$forumid', '$parsesmilie', undefined, '$ajax_extra');
//-->
</script>