Jaxel
05-01-2010, 07:40 PM
Okay, this is the code for my Quick Reply Form in my mod...
require_once(DIR . '/includes/functions_editor.php');
$editorid = construct_edit_toolbar('',0,'nonforum',1,1,0,'qr') ;
$templater->register('editorid', $editorid);
$templater->register('messagearea', $messagearea);
<script type="text/javascript" src="clientscript/vbulletin-editor.js?v={vb:raw vboptions.simpleversion}"></script>
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
<form action="media.php" name="vbform" method="post" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.inputname.value, {vb:raw vboptions.postminchars})">
<div name="commentform" id="commentform">
<div class="mediarow floatcontainer" style="padding: 10px;">
{vb:raw messagearea}
</div>
</div>
<div style="padding-right: 30px; text-align: right;">
<input type="submit" class="button" name="commentsubmit" id="commentsubmit" value="{vb:phrase media_comment_submit}" />
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="comment" />
</form>
Simple right? Looks like it should be working. However, I am having an issue where the buttons on the form (for bold, italics, etc) do not work. If I switch it from the Quick Reply to the Full Editor, the buttons work fine, its only in the Quick Reply that it doesnt work. Also, when using QR, I get the following error "Uncaught ReferenceError: vB_Text_Editor is not defined", which I do not get when using the FE. I have tried the HOW TO thread in the articles section, but I did not receive the answers I was looking for.
Also, how do I disable the REQUIRE CLICK option? In VB3, I would use "$show['qr_require_click'] = 0;", but it appears that this function is no longer working.
require_once(DIR . '/includes/functions_editor.php');
$editorid = construct_edit_toolbar('',0,'nonforum',1,1,0,'qr') ;
$templater->register('editorid', $editorid);
$templater->register('messagearea', $messagearea);
<script type="text/javascript" src="clientscript/vbulletin-editor.js?v={vb:raw vboptions.simpleversion}"></script>
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
<form action="media.php" name="vbform" method="post" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.inputname.value, {vb:raw vboptions.postminchars})">
<div name="commentform" id="commentform">
<div class="mediarow floatcontainer" style="padding: 10px;">
{vb:raw messagearea}
</div>
</div>
<div style="padding-right: 30px; text-align: right;">
<input type="submit" class="button" name="commentsubmit" id="commentsubmit" value="{vb:phrase media_comment_submit}" />
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="comment" />
</form>
Simple right? Looks like it should be working. However, I am having an issue where the buttons on the form (for bold, italics, etc) do not work. If I switch it from the Quick Reply to the Full Editor, the buttons work fine, its only in the Quick Reply that it doesnt work. Also, when using QR, I get the following error "Uncaught ReferenceError: vB_Text_Editor is not defined", which I do not get when using the FE. I have tried the HOW TO thread in the articles section, but I did not receive the answers I was looking for.
Also, how do I disable the REQUIRE CLICK option? In VB3, I would use "$show['qr_require_click'] = 0;", but it appears that this function is no longer working.