2015-01-06, 01:08 PM
(2012-07-24, 02:45 AM)brad-t Wrote: Nice. One problem with using the Preview button this way is if you hit "Full Editor" without entering anything, you'll get an error message. Not sure what to do about that.
First of all, good job with this project.
I always defended minimalism and functionality that hundreds and hundreds of configurable options.
On the issue of quick_reply, I solve it without modification of the core, with just a plugin (PHP in Templates and Template Conditionals) and two templates.
In template showthread_quickreply, find:
<form method="post" action="newreply.php?tid={$tid}&processed=1" name="quick_reply_form" id="quick_reply_form">
Replace it to:
<form method="post" action="newreply.php?tid={$tid}&processed=1&fulleditor=1" name="quick_reply_form" id="quick_reply_form">
In newpreply, find:
{$reply_errors}
And replace it to:
<if $_GET["fulleditor"] != 1 then>{$reply_errors}</if>
This method does not allow empty post messages, and if you press "Preview" or "Post" in the page "newreply" (only in the newreply page or full editor page) MyBB display the error message.