BBCodeBox3

prosilver | subsilver2

Willkommen und Guten Morgen, Guest  Beim nächsten Piep ist es zwischen 9:00 und 10:00 Uhr

It is currently Sun 26. Oct 2025, 10:36

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Mon 28. Sep 2009, 16:01 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

4S Preview before Submit
(Force Preview before Submit)

MOD-Title: 4S Preview before Submit
MOD-Version: 0.0.2
MOD-Author: 4seven

Request by: takufner, Susa

MOD-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

Image (follows)



Instruction:

open

posting.php

find

Code:
    // Start assigning vars for main posting page ...
    $template->assign_vars(array( 


before add

Code:
 // 4S Preview before Submit / 4seven / 2009
if(($mode == 'post' ||  $mode == 'quote' ||  $mode == 'edit' ||  $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 == 'quote' ||  $mode == 'edit' ||  $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 == 'quote' ||  $mode == 'edit' ||  $mode == 'reply') && ($preview && (!empty($preview_message)))){
$template->assign_vars(array(
'S_SUBMIT_BUTTON' => true));}
// 4S Preview before Submit / 4seven / 2009   


open

language/xx/common.php

find

Code:
    $lang = array_merge($lang, array( 


after add

Code:
        'USER_MUST_PREVIEW'    => 'You must click on Preview, before you can Submit', 


open

styles/prosilver/template/posting_editor.html

find

Code:
                <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp; 


replace with

Code:
                <!-- IF S_SUBMIT_BUTTON -->
                <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
                <!-- ENDIF --> 


open

styles/subsilver2/template/posting_body.html

find (2 x)

Code:
                &nbsp; <input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" /> 



replace (2 x) with

Code:
                <!-- IF S_SUBMIT_BUTTON -->
                &nbsp; <input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" />
                <!-- ENDIF --> 


Clear all Board- and Browser-Caches


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
POWERED_BY
[ Time : 0.111s | 16 Queries | GZIP : Off | Board-Version: 3.0.7 PL1 ]