PDA

View Full Version : WYSIWYG In new file...


WhSox21
02-27-2005, 05:21 PM
Yes, I've browsed the forums numerous times. But nothing has helped me. I have no idea why this doesn't work. It works in FireFox but not in IE? There are no javascript errors in IE and no problems with FireFox. Does anyone have any idea how to help me. Here's what I have so far:
$stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];
construct_edit_toolbar('', 0, 'privatemessage');
eval('$HTML .= "' . fetch_template('helpdesk_quickreply') . '";');

There is no problems with this, it is being called correctly.

My Template:
<form action="helpdesk.php" method="post" name="vbform"<if condition="!is_browser('webtv')"> onsubmit="return validatePost(this, this.subject.value, $vboptions[postminchars], $vboptions[postmaxchars]);" onreset="vB_RESET(this);"</if>>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[ticket_reply]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">

<table cellpadding="0" cellspacing="0" border="0" class="fieldset">
<tr>
<td class="smallfont" colspan="3">$vbphrase[title]:</td>
</tr>
<tr>
<td><input type="text" class="bginput" name="subject" value="$subject" size="40" maxlength="85" tabindex="1" /></td>
<td>&nbsp;&nbsp;</td>
<td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> </tr>
</table>

<table cellpadding="0" cellspacing="0" border="0" class="fieldset">
<tr>
<td>

<!-- message area -->
$messagearea
<!-- / message area -->

</td>
</tr>
</table>

</div>

<div style="margin-top:$stylevar[cellpadding]px">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="ticketreply" />
<input type="hidden" name="tid" value="$_REQUEST[tid]" />
<input type="hidden" name="title" value="Allow this to pass without a real test." />
<input type="submit" class="button" name="sbutton" value="$vbphrase[reply_to_ticket]" accesskey="s" tabindex="1" />
</div>
</td>
</tr>
</table>
</form>

Does anyone have any idea how to fix this? It's driving me insane!

EDIT: What's not working is the $_POST['WYSIWYG_HTML'] variable is empty? So it seems like a template problem where the code is not being copied into that variable onsubmit! :(

noppid
02-27-2005, 05:28 PM
You are missing includes, java, and variables. Look at profile.php and the edit signature templates/proceedure to see how it's done. It's very easy to see.

Maybe some of the comments in vBGarage.php from the vBG 4.1.0 beta release will give you some clues too.

WhSox21
02-27-2005, 05:31 PM
The includes are at the top. I just forgot to include that in my post.

require_once('./includes/functions_newpost.php');
require_once('./includes/functions_editor.php');

Along with global.php.

noppid
02-27-2005, 05:38 PM
PHP FILE:
define('GET_EDIT_TEMPLATES', 'editgarage,edit,newgarage');

PHP FILE AND TEMPLATE:
// initialise onload event
$onload = '';

Recieve the incoming vars and globalize them as the proper type too.

There more to do too. You're not showing enough code to be specific.

WhSox21
02-27-2005, 05:39 PM
I got it working! :( I changed something because I thought it wasn't needed but I guess it was for IE! :(

noppid
02-27-2005, 05:41 PM
Cool. Now try fiefox, if it works there you're done.

WhSox21
02-27-2005, 05:53 PM
It was always working in firefox! :) Thanks for your help!