Page 1 of 3

Please Wait II [MANUAL EDITS]

Posted: 23 Nov 2014, 10:11
by Stoker
Extension Name: Please Wait II
Author: Stoker

Description:
Convertion of my phpBB mod for 3.0.12 to 3.1.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}
			<!-- 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;">
			<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" type="button" value="<!-- IF S_IN_UCP -->{L_PM_LOAD_SENDING}<!-- ELSE -->{L_LOAD_SENDING}<!-- ENDIF -->" disabled="disabled" />&nbsp;
		</fieldset>
		<fieldset id="processingsave" class="submit-buttons" style="display:none;">
			<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" type="button" value="<!-- IF S_IN_UCP -->{L_PM_DRAFT_SENDING}<!-- ELSE -->{L_DRAFT_SENDING}<!-- ENDIF -->" disabled="disabled" />&nbsp;
		</fieldset>
		<fieldset id="processingprev" class="submit-buttons" style="display:none;">
			<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" type="button" value="<!-- IF S_IN_UCP -->{L_PM_PREVIEW_SENDING}<!-- ELSE -->{L_PREVIEW_SENDING}<!-- ENDIF -->" disabled="disabled" />&nbsp;
		</fieldset>
		<fieldset id="processingsub" class="submit-buttons" style="display:none;">
			<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" type="button" value="<!-- IF S_IN_UCP -->{L_PM_POST_SENDING}<!-- ELSE -->{L_POST_SENDING}<!-- ENDIF -->" disabled="disabled" />&nbsp;
		</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;">
					<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" type="button" value="{L_FULLED_SENDING}" disabled="disabled" />
				</fieldset>
				<fieldset id="processingsub" class="submit-buttons" style="display:none;">
					<img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /><input class="button1" 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!
Now we just need to put this image in your images folder. Its called loader.gif so make sure you have no conflicts
please_wait_loader.gif.zip
(1.82 KiB) Downloaded 291 times
Known bugs:
None

Re: Please Wait II

Posted: 23 Nov 2014, 13:53
by martin123456
I coded mine into the core files ages ago lol.

Re: Please Wait II

Posted: 23 Nov 2014, 15:55
by Stoker
I found out that I missed it :D

Re: Please Wait II

Posted: 23 Nov 2014, 17:35
by martin123456
Yeah it's a cool addon to phpbb.

Re: Please Wait II

Posted: 27 Nov 2014, 03:20
by Burke
Thanks, appreciate it.

Re: Please Wait II

Posted: 28 Nov 2014, 03:22
by sitesplat
Stoker wrote: Unfortunately there is no way of doing this without hacking the files the old way
Unfortunately until the phpBB team decide to listen to the developers and implement template events requested a lot of "MOD's" hmmm pardon me, "extensions" will be an hybrid. (Nothing wrong with that).

Nice one Ulrik. ;-)

Re: Please Wait II

Posted: 28 Nov 2014, 12:07
by Dragosvr92
hm.. My thoughts are insecure about the 3.1 extension system still. :|
I gathered that editing core files isnt recommended, but does it have any bad effects on forums?
Does it break events or does it affect installed extensions or make others unable to install...?

Re: Please Wait II

Posted: 28 Nov 2014, 12:36
by Stoker
I dont see how, this is only 2 edits of the template files.
But sure, the best way is withoput editing files. But I dont see how this is possible with this one.

Re: Please Wait II

Posted: 28 Nov 2014, 12:41
by martin123456
Stoker i'l send you a pm with some info.

Re: Please Wait II

Posted: 28 Nov 2014, 14:09
by RMcGirr83
Yeah, keep it private because it should remain so being GPL 2.0 and all. :roll: