MyBB Community Forums

Full Version: How to add page breaks and cursor for private message replies?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One thing that really bugs me is the code that appears when users reply to private message on a myBB forum.

I understand that this code cannot be avoided, but is there a way to make it appear with 3 page break lines above the code and have the cursor positioned in the message box at the top, rather than the user having to create these page breaks themselves before they reply?

This would also help to standardize they way people reply and quote as some people might write at the footer or the code and others might right above it.

Here's two screenshots of what it currently does and how I'd like it to appear automatically to the user.

I would be grateful if anyone know if this is possible.


You can add some line breaks in the template.

Admin CP >> Templates >> <yourtemplate> >> Private Message Templates >> Send

In the part where you see

<textarea name="message" id="message" rows="20" cols="70" tabindex="4">{$message}</textarea>

You could add some linebreaks before {$message}

(line breaks are <br/> in HTML)
Thank you! That's great that solves most of this as it would suggest to the user to write the message above the piece of code. Any idea if it's possible to force the cursor to flash on line 1 instead of the user having to click in there?
You will need to add something like this to one of the javascript files

JavaScript document.getElementById("message").focus();

although you should, or may have to do this in prototypjs instead. which off the top of my head I am not sure.

generally however that should work
The replybox won't accept HTML so he'd have to use \n instead for a new line.