MyBB Community Forums

Full Version: PM Quick Reply Modification (Severely a WIP)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to attempt a modification myself for a private message quick reply...

I want to place a private message text box on the screen where you read a private message, in the private_read template.

It needs to be able to fetch the pm id/post id of the private message you are viewing, place the text box on the private_read screen with the appropriate buttons to sent/preview the private message as well as mark the read receipt.

I attempted this using slightly modified code from the private_send template excluding anything that is unneeded.

This is just code that is the base of the modification and is quite shakey/incomplete and most likely doesn't work.

Whenever I place this code in the private_read template, I get the privae message text box, buttons, check boxes, but inside the textbox it displays the html/code of the postbit that is in the pm that you are currently viewing which I think is the result of something I did wrong.

I don't really have the slightest idea what I am doing, but I would really like to make this work so I decided to post here for help.

Here is the code that I am using as a base for the modification:

<html>
<head>
<title>{$lang->compose_pm}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/usercp.js?ver=1400"></script>
</head>
<body>
<form action="private.php" method="post" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
<td valign="top">
{$preview}
{$send_errors}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->compose_pm}</strong></td>
<tr>
<td class="trow1"><strong>{$lang->compose_subject}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="3" /></td>
</tr>
{$posticons}
<tr>
<td class="trow2" valign="top"><strong>{$lang->compose_message}</strong>{$smilieinserter}</td>
<td class="trow2">
<textarea name="message" id="message" rows="20" cols="70" tabindex="4">{$message}</textarea>
{$codebuttons}
</td>
</tr>
<tr>
<td class="trow1" valign="top"><strong>{$lang->compose_options}</strong></td>
<td class="trow1"><span class="smalltext">
<label><input type="checkbox" class="checkbox" name="options[signature]" value="1" tabindex="5" {$optionschecked['signature']} />{$lang->options_sig}</label><br />
<label><input type="checkbox" class="checkbox" name="options[disablesmilies]" value="1" tabindex="6" {$optionschecked['disablesmilies']} />{$lang->options_disable_smilies}</label><br />
<label><input type="checkbox" class="checkbox" name="options[savecopy]" value="1" tabindex="7" {$optionschecked['savecopy']} />{$lang->options_save_copy}</label><br />
<label><input type="checkbox" class="checkbox" name="options[readreceipt]" value="1" tabindex="8" {$optionschecked['readreceipt']} />{$lang->options_read_receipt}</label><br />
</span></td>
</tr>
</table>
<br />
<input type="hidden" name="action" value="do_send" />
<input type="hidden" name="pmid" value="{$pmid}" />
<input type="hidden" name="do" value="{$do}" />
<div style="text-align: center;">
<input type="submit" class="button" name="submit" value="{$lang->send_message}" tabindex="9" accesskey="s" />
<input type="submit" class="button" name="saveasdraft" value="{$lang->save_draft}" tabindex="10" />
<input type="submit" class="button" name="preview" value="{$lang->preview}" tabindex="11" />
</div>
</td>
</tr>
</table>
</form>

As you can see it's rally awful at this time and quite a non-working WIP modification.

Thanks if anyone can provide any insight or help regarding this. Smile