1

Topic: Private Message mod v1.2.4a - unofficial update

Update available that fixes many bugs and vulnerabilities in the Private Message mod for punbb 1.2.

Click here for more details.

Re: Private Message mod v1.2.4a - unofficial update

Has anyone ever added a preview button to new messages or reply's? My users ask me if I can add one so they can preview their messages before they send or reply. I figured out how to add the BBCode mod in there so they can put smilies. Would adding preview be just as easy?

3 (edited by MattF 2009-07-31 00:48)

Re: Private Message mod v1.2.4a - unofficial update

Have a look at the code in post.php. With a few minor adjustments, you can copy and make that preview code work in the message_send.php? file.

Re: Private Message mod v1.2.4a - unofficial update

Thanks. I'll have a look.

Re: Private Message mod v1.2.4a - unofficial update

Well it seems like there are two things to add. I found these in post.php

<?php

}
else if (isset($_POST['preview']))
{
    require_once PUN_ROOT.'include/parser.php';
    $preview_message = parse_message($message, $hide_smilies);

?>
<div id="postpreview" class="blockpost">
    <h2><span><?php echo $lang_post['Post preview'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <div class="postright">
                <div class="postmsg">
                    <?php echo $preview_message."\n" ?>
                </div>
            </div>
        </div>
    </div>
</div>

and this goes next to where the Submit button is

<input type="submit" name="preview" value="<?php echo $lang_pms['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" />

I tried stuffing it where I THINK it should go in message_send.php but I can't get it to work.