Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 5 Months, 1 Week ago How to add page breaks and cursor for private message replies?
#1
Solved: 8 Years, 5 Months, 1 Week ago
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.

Thanks

       
#2
Solved: 8 Years, 5 Months, 1 Week ago
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)
#3
Solved: 8 Years, 5 Months, 1 Week ago
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?
#4
Solved: 8 Years, 5 Months, 1 Week ago
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
#5
Solved: 8 Years, 5 Months, 1 Week ago
The replybox won't accept HTML so he'd have to use \n instead for a new line.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)