[SNIPPET] Please Wait

Extensions & Styles for phpBB 3.2.X maintained and supported by Stoker
User avatar
Stoker
Site Admin
Site Admin
Posts: 3535
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

[SNIPPET] Please Wait

Post by Stoker » 14 Jan 2018, 14:46

Extension Name: Please Wait II
Author: Stoker

Description:
Convertion of my phpBB mod for 3.0.12 to 3.2.X
Unfortunately there is no way of doing this without hacking the files the old way

Please make a Donation

Version: 1.0.0
100%

Demo:
This board

Download:
None

Installation:
This is for the posting page on viewtopic and PM
Open styles/prosilver/template/posting_editor.html
Find:

Code: Select all

<fieldset class="submit-buttons">
			{S_HIDDEN_ADDRESS_FIELD}
			{S_HIDDEN_FIELDS}
			<!-- EVENT posting_editor_submit_buttons -->
			<!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD_DRAFT}" class="button2" onclick="load_draft = true;" />&nbsp; <!-- ENDIF -->
			<!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE_DRAFT}" class="button2" />&nbsp; <!-- ENDIF -->
			<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1"<!-- IF not S_PRIVMSGS --> onclick="document.getElementById('postform').action += '#preview';"<!-- ENDIF --> />&nbsp;
			<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1 default-submit-action" />&nbsp;

		</fieldset>
Replace with:

Code: Select all

<fieldset id="buttons" class="submit-buttons">
			{S_HIDDEN_ADDRESS_FIELD}
			{S_HIDDEN_FIELDS}
			<!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD_DRAFT}" class="button2" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingload').style.display='block';load_draft = true;" />&nbsp; <!-- ENDIF -->
			<!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE_DRAFT}" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingsave').style.display='block';" class="button2" />&nbsp; <!-- ENDIF -->
			<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingprev').style.display='block';<!-- IF not S_PRIVMSGS --> document.getElementById('postform').action += '#preview';<!-- ENDIF -->" class="button1" />&nbsp;
			<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingsub').style.display='block';" class="button1 default-submit-action" />&nbsp;
		</fieldset>
		
		<fieldset id="processingload" class="submit-buttons" style="display:none;">
			<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="<!-- IF S_IN_UCP -->{L_PM_LOAD_SENDING}<!-- ELSE -->{L_LOAD_SENDING}<!-- ENDIF -->" disabled="disabled" />
		</fieldset>
		<fieldset id="processingsave" class="submit-buttons" style="display:none;">
			<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="<!-- IF S_IN_UCP -->{L_PM_DRAFT_SENDING}<!-- ELSE -->{L_DRAFT_SENDING}<!-- ENDIF -->" disabled="disabled" />
		</fieldset>
		<fieldset id="processingprev" class="submit-buttons" style="display:none;">
			<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="<!-- IF S_IN_UCP -->{L_PM_PREVIEW_SENDING}<!-- ELSE -->{L_PREVIEW_SENDING}<!-- ENDIF -->" disabled="disabled" />
		</fieldset>
		<fieldset id="processingsub" class="submit-buttons" style="display:none;">
			<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="<!-- IF S_IN_UCP -->{L_PM_POST_SENDING}<!-- ELSE -->{L_POST_SENDING}<!-- ENDIF -->" disabled="disabled" />
		</fieldset>
This is for the posting page on viewtopic and PM
Open styles/prosilver/template/quickreply_editor.html
Find:

Code: Select all

<fieldset class="submit-buttons">
					{S_FORM_TOKEN}
					{QR_HIDDEN_FIELDS}
					<input type="submit" accesskey="f" tabindex="6" name="preview" value="{L_FULL_EDITOR}" class="button2" id="qr_full_editor" />&nbsp;
					<input type="submit" accesskey="s" tabindex="7" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
				</fieldset>
Replace with:

Code: Select all

<fieldset id="buttons" class="submit-buttons">
					{S_FORM_TOKEN}
					{QR_HIDDEN_FIELDS}
					<input type="submit" accesskey="f" tabindex="6" name="preview" value="{L_FULL_EDITOR}" class="button2" id="qr_full_editor" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingfed').style.display='block';" />&nbsp;				
					<input type="submit" accesskey="s" tabindex="7" name="post" value="{L_SUBMIT}" class="button1" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingsub').style.display='block';" />&nbsp;
				</fieldset>
				<fieldset id="processingfed" class="submit-buttons" style="display:none;">
					<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="{L_FULLED_SENDING}" disabled="disabled" />
				</fieldset>
				<fieldset id="processingsub" class="submit-buttons" style="display:none;">
					<i class="fa fa-refresh fa-spin fa-fw"></i> <input class="buttonpw buttonpwbg" type="button" value="{L_POST_SENDING}" disabled="disabled" />
				</fieldset>
And add this to the bottom of language/en/common.php

Code: Select all

//Posting , draft , preview , cancel message... [Please Wait]
$lang = array_merge($lang, array(
	'POST_SENDING'					=> 'Sending post - Please wait...',
	'DRAFT_SENDING'					=> 'Saving post - Please wait...',
	'LOAD_SENDING'					=> 'Loading post - Please wait...',
	'PREVIEW_SENDING'				=> 'Loading preview - Please wait...',
	'PM_POST_SENDING'				=> 'Sending PM - Please wait...',
	'PM_DRAFT_SENDING'				=> 'Saving PM - Please wait...',
	'PM_LOAD_SENDING'				=> 'Loading PM  - Please wait...',
	'PM_PREVIEW_SENDING'			=> 'Loading preview - Please wait...',
	'AT_FILE_UPLOADING'				=> 'Uploading file - Please wait...',
));
Save files, upload and purge cache!

Known bugs:
None
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear