==README for addon_preview.php==
Release date: November 30, 2004.
Latest update: July 29, 2020.
miniBB version: 3.4 and up
Author: Paul Puzyrev (minibb.com).

"Preview" is an addon for miniBB (http://www.minibb.com) which allows visitors simply previewing of their messages before posting them to forums. Users can preview both new topics and replies in a very native layout. Preview appears in a new pop-up window (JavaScript must be enabled).


==INSTALLATION==

* Copy addon_preview.php to your forums folder.

* Create a folder /preview/ and then copy /preview/index.php to your forums folder. This file is possible to rename, however then it needs to be specified properly in bb_plugins.php code (see below). This is a JavaScript-based file which will prepare all necessary parameters for Previewing the form.

* Copy templates/addon_preview.html to your forums/templates folder.

* Edit templates/main_post_area.html and add {$previewButton} next or in front of Submit button that way:

document.write('<input type="button" name="subbut" value="{$l_sub_post_msg}" class="inputButton" tabindex="5" onclick="submitForm();" />{$previewButton}');

* Edit templates/main_topics.html and in the same manner as above, modify Submit button's code adding Preview button next to it:

document.write('<input type="button" name="subbut" value="{$l_sub_post_tpc}" class="inputButton" tabindex="5" onclick="submitForm();" />{$previewButton}');

* Edit templates/tools_edit_post.html and in the same manner as above, modify Submit button's code adding Preview button next to it:

document.write('<input type="button" name="subbut" value="{$l_edit}" class="inputButton" onclick="submitForm();" />{$previewButton}');

* If you have the Private Messaging add-on installed, refer to it's README.txt for enabling the Preview button in PM forms.

* AT THE END of /templates/form.js file of your forums, paste the code provided in /templates/form_js.code.txt.

In this code, you may edit preview window's width, height (winWidth, winHeight) and other parameters which appear in window.open procedure.

* Modify your language pack(s) [lang/eng.php or whatever] and before the closing ?> tag, add the language defs provided in lang/eng.code.txt (or for related language).

* Paste the code provided in bb_plugins.code.txt, in bb_plugins.php of your forums. Preview button is defined in this code. If you renamed /preview/index.php or put it as a different name file, its URL needs to be specified in the $previewButton's code. 

Notes:

- If you have the Private Messaging add-on installed, this code should be pasted ABOVE the code named /* Private Messaging top link */.

- If you have Smilies or Badwords plugin, or both, paste this code BELOW the codes for these addons.


==FINALLY==

We hope you'll enjoy. Please, post bugs and suggestions on our forums:
http://www.minibb.com/forums/11_4176_0.html
