Twilkey
06-20-2011, 08:19 AM
I am having an issue. Before 4.1.4 I used the old editor on my addon just fine. Now that we upgraded, only the smilies show up. When I refresh the page, a simple box shows up that seems like the textarea without any buttons. I have searched through vbulletins files to see if something changed with the code, but I am actually not seeing any real changes in the code needed to construct the editor. So i am not sure why this is happening. The editor works fine in the core vB system, just not in my addon.
Here is the code I use for the editor.
I have also included a screenshot of what i see on the page.
HTML
<form class="vbform block" action="{vb:raw formaction}" method="post" name="vbform" onsubmit="return vB_Editor['{vb:raw editor}'].prepare_submit(0, 0)">
<div class="blockbody formcontrols">
<h3 class="blocksubhead">{vb:raw formhead}</h3>
<div class="section">
<div class="blockrow">
<label for="keyword"><b>Title:</b><br /><i>What would you like the title to be?</i></label>
<ul class="multifield group">
<li>
<input type="text" class="textbox" name="posttitle" value="{vb:raw posttitle}" tabindex="1" />
</li>
</ul>
</div>
<div class="blockrow">
<label for="searchuser"><b>Description:</b></label>
<ul class="multifield group">
<li>
<div id="userfield" class="popupmenu nomouseover noclick nohovermenu">
{vb:raw messagearea}
</div>
</li>
</ul>
</div>
</div>
<div class="blockfoot actionbuttons"></div>
<h3 class="blocksubhead">Additional options </h3>
<div class="section" id="additionaloptions">
<div class="blockrow">
<label for="searchdate"><b>Co-Authors:</b><br /><i>(Seperate with commas)</i></label>
<ul class="multifield group">
<li>
<input type="text" class="textbox" name="postcoauthors" value="{vb:raw postcoauthors}" />
</li>
</ul>
</div>
<div class="blockfoot actionbuttons">
<div class="group">
<input type="submit" class="button" name="submit" value="Submit Now" tabindex="1" accesskey="s"/>
<input type="reset" class="button" value="Reset" tabindex="1" accesskey="r" />
</div>
</div>
</div>
</div>
<input type="hidden" name="subcatid" value="{vb:raw subcatid}" />
<input type="hidden" name="id" value="{vb:raw id}" />
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
</form>
PHP
require_once(DIR . '/includes/functions_editor.php');
$editor = construct_edit_toolbar($postdescription, 0, 'nonforum', 1, 1, 0, 'fe', '', '', 'content', 'vBForum_Post', 0, 0, 0, 1, $postid);
/* function construct_edit_toolbar($text = '', $ishtml = 0, $forumid = 0, $allowsmilie = 1, $parsesmilie = 1, $can_attach = false, $editor_type = 'fe', $force_editorid = '') */
$templater->register('messagearea', $messagearea);
$templater->register('editor', $editor);
Here is the code I use for the editor.
I have also included a screenshot of what i see on the page.
HTML
<form class="vbform block" action="{vb:raw formaction}" method="post" name="vbform" onsubmit="return vB_Editor['{vb:raw editor}'].prepare_submit(0, 0)">
<div class="blockbody formcontrols">
<h3 class="blocksubhead">{vb:raw formhead}</h3>
<div class="section">
<div class="blockrow">
<label for="keyword"><b>Title:</b><br /><i>What would you like the title to be?</i></label>
<ul class="multifield group">
<li>
<input type="text" class="textbox" name="posttitle" value="{vb:raw posttitle}" tabindex="1" />
</li>
</ul>
</div>
<div class="blockrow">
<label for="searchuser"><b>Description:</b></label>
<ul class="multifield group">
<li>
<div id="userfield" class="popupmenu nomouseover noclick nohovermenu">
{vb:raw messagearea}
</div>
</li>
</ul>
</div>
</div>
<div class="blockfoot actionbuttons"></div>
<h3 class="blocksubhead">Additional options </h3>
<div class="section" id="additionaloptions">
<div class="blockrow">
<label for="searchdate"><b>Co-Authors:</b><br /><i>(Seperate with commas)</i></label>
<ul class="multifield group">
<li>
<input type="text" class="textbox" name="postcoauthors" value="{vb:raw postcoauthors}" />
</li>
</ul>
</div>
<div class="blockfoot actionbuttons">
<div class="group">
<input type="submit" class="button" name="submit" value="Submit Now" tabindex="1" accesskey="s"/>
<input type="reset" class="button" value="Reset" tabindex="1" accesskey="r" />
</div>
</div>
</div>
</div>
<input type="hidden" name="subcatid" value="{vb:raw subcatid}" />
<input type="hidden" name="id" value="{vb:raw id}" />
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
</form>
PHP
require_once(DIR . '/includes/functions_editor.php');
$editor = construct_edit_toolbar($postdescription, 0, 'nonforum', 1, 1, 0, 'fe', '', '', 'content', 'vBForum_Post', 0, 0, 0, 1, $postid);
/* function construct_edit_toolbar($text = '', $ishtml = 0, $forumid = 0, $allowsmilie = 1, $parsesmilie = 1, $can_attach = false, $editor_type = 'fe', $force_editorid = '') */
$templater->register('messagearea', $messagearea);
$templater->register('editor', $editor);