MyBB Central

Full Version: PM Quick Reply Modification (A sloppy 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 sloppy/incomplete and most likely doesn't work.

Whenever I place this code in the private_read template, I get the private message text box, buttons, check boxes, but inside the text box it displays the html/code of the post bit 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:

<script type="text/javascript" src="jscripts/usercp.js?ver=1400"></script>
<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">
<td valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<td class="thead" colspan="2"><strong>{$lang->compose_pm}</strong></td>
<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>
<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>
<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 />
<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" />

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

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

I apologize for posting this here, it seems the section/forum pertaining to customization/modding questions or help has disappeared or was deleted.
You just want a quick reply in the form?
Yes, on the private_read screen. This way someone can quickly reply to a pm rather than loading a new page. The code I posted above is based off of the html in the private_send template. I have edited bits of the code in attempt to try the modification myself, but as you can see it's quite a sloppy non-working implementation at this time.

Once I became stumped, I decided to seek help regarding this attempt at a modification. I know it can be done without requiring any core file edits, which I guessed. It's just a matter of grabbing the id of the PM you are viewing, adding a textbox/form below the pm itself, have the buttons functional etc....

Once I can figure out a working base for the modification, the editor itself could be tidied up into something more simplistic.
It should just be a form. If you don't figure this out and need help I can see what I can do later on.
Thanks, I am trying my best to figure it out and do this myself even though I admittedly don't have any idea what to do. I don't expect anyone to do it for me, but I would really appreciate help on getting it to work.

Should be simple enough to pull off but my lack of understanding of coding/html makes it much more difficult. I've attempted to learn some basic html in the past and while I do know basic html and basic iframes among other things, I don't have the skill to pull it off.

But I am trying, at least that counts eh? Tongue
What Plugins were you looking for?

I ask because i happen to catch your post on your forum which explained why you switched from mybb to IPB?

Pretty sure Labrocca could have done them up?
I can do this for you...don't go IPB. Give me a couple weeks please.
(Nov 07, 2008, 07:00 PM)Harry Wrote: [ -> ]What Plugins were you looking for?

I ask because i happen to catch your post on your forum which explained why you switched from mybb to IPB?

Pretty sure Labrocca could have done them up?

I switched to IPB only on my main forum, but I can assure the reasons behind it weren't due to the modification I was inquiring about receiving help with in this thread. The reasoning behind it was something else, mostly because there are more themes of better quality and a lot more decent modifications.

The SEO plugin by Spicefuse is quite buggy, and I don't like the default Mybb SEO feature with 1.4, so that partially contributed to the switch.

I still am using Mybb for another forum I am trying to get going, so I still need help with this modification to get a working implementation: Smile