4S Preview before Submit(Force Preview before Submit)Snippet-Title: 4S Preview before Submit
Snippet-Version: 0.0.1
Snippet-Author: 4seven
Request by: takufnerRequest by: SusaSnippet-Description: This Mod prevents the Posting without Preview
phpBB-Version: phpBB 3.0.x
phpBB-Languages: mutlilingual (because of only 1 edit in language/xx/common.php)
phpBB-Styles: all Styles, that are based on prosilver and subsilver2
Features:- No posting without preview
- No going around by an empty postfield possible
Planned:- ACP Entry to switch Mod to Off
- Maybe a Module to prevent 'posting without preview' for chosen groups

follows

follows
Instruction:openposting.php
findCode:
$template->assign_vars(array(
before addCode:
if(($mode == 'post' || $mode == 'reply') && (!$preview && (empty($preview_message)))){
$error[] = $user->lang['USER_MUST_PREVIEW'];
$template->assign_vars(array(
'S_SUBMIT_BUTTON' => false));}
else if (($mode == 'post' || $mode == 'reply') && ($preview && (empty($preview_message)))){
$error[] = $user->lang['USER_MUST_PREVIEW'];
$template->assign_vars(array(
'S_SUBMIT_BUTTON' => false));}
else if (($mode == 'post' || $mode == 'reply') && ($preview && (!empty($preview_message)))){
$template->assign_vars(array(
'S_SUBMIT_BUTTON' => true));}
openlanguage/xx/common.php
findCode:
$lang = array_merge($lang, array(
after addCode:
'USER_MUST_PREVIEW' => 'You must click on Preview, before you can Submit',
openstyles/prosilver/template/posting_editor.html
findCode:
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />
replace with Code:
<!-- IF S_SUBMIT_BUTTON -->
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />
<!-- ENDIF -->
openstyles/subsilver2/template/posting_body.html
find (2 x) Code:
<input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" />
replace (2 x) withCode:
<!-- IF S_SUBMIT_BUTTON -->
<input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" />
<!-- ENDIF -->
Clear all Board- and Browser-Caches
Enjoy