##############################################################
## MOD Title:    Remove SpellingCow Spell Check
## MOD Author:   Nightrider < nightrider@4fxearth.net > (Blake) http://4fxearth.net/phpBB2
##
## MOD Description:  This MOD will remove the Spelling Cow 1.6.0...
## MOD Version:  1.0.0
##
## Installation Level:  easy
## Installation Time:   5 minutes
## Files To Edit:       posting.php
##                      privmsg.php
##                      includes/usercp_register.php
##                      templates/subSilver/posting_body.tpl
##                      templates/subSilver/profile_add_body.tpl
##                      language/lang_english/lang_main.php
## Included Files:      N/A
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/
############################################################## 
##
## Author Notes:
##
############################################################## 
##
## MOD History:
##    2006-11-04 - Version 1.0.0
##         + initial release
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]---------------------------------
#
posting.php
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
	'AUTO_SPELL' => $userdata['user_autospell'],
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ OPEN ]---------------------------------
#
privmsg.php
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
	'AUTO_SPELL' => $userdata['user_autospell'],
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ OPEN ]---------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
		$spellcheck = ( isset($HTTP_POST_VARS['spellcheck']) ) ? ( ($HTTP_POST_VARS['spellcheck']) ? TRUE : 0 ) : TRUE ;
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
		$spellcheck = ( isset($HTTP_POST_VARS['spellcheck']) ) ? ( ($HTTP_POST_VARS['spellcheck']) ? TRUE : 0 ) : $userdata['user_autospell'];
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
user_allowsmile = $allowsmilies, user_autospell = $spellcheck,
#
#-----[ IN-LINE FIND ]---------------------------------
#
user_allowsmile = $allowsmilies, user_autospell = $spellcheck,
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
user_allowsmile = $allowsmilies,
#
#-----[ FIND ]---------------------------------
#
user_allowsmile, user_autospell,
#
#-----[ IN-LINE FIND ]---------------------------------
#
user_allowsmile, user_autospell,
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
user_allowsmile,
#
#-----[ IN-LINE FIND ]---------------------------------
#
$allowsmilies, $spellcheck,
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
$allowsmilies,
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
	$spellcheck = $userdata['user_autospell'];
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
		'ALWAYS_SPELL_CHECK_YES' => ( $spellcheck ) ? 'checked="checked"' : '',
		'ALWAYS_SPELL_CHECK_NO' => ( !$spellcheck ) ? 'checked="checked"' : '',
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
		'L_ALWAYS_SPELL_CHECK' => $lang['Always_spellcheck'],
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
$lang['Always_spellcheck'] = 'Always check Spelling before posting';
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
function auto_check_spelling()
{
	// if we are auto checking, set value to 2 so the submit from checkForm will fail; open the checker window
	if (document.post.auto_spell_check.value == 1)
	{
		document.post.auto_spell_check.value = 2 ;
		window.open('spell-gw.php?mode=load&form=post&auto=check&source=message&button=post&type=phpBB', '_spellcheck', 'HEIGHT=484,resizable=yes,scrollbars=yes,WIDTH=595');
	}
}
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
// SPELLINGCOW - begin
	// if we set value to 2, then that means we are auto spell checking, so fail
	if (document.post.auto_spell_check.value == 2)
	{
		// reset our value
		document.post.auto_spell_check.value = 1 ;
		return false;
	}
// SPELLINGCOW - end
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
		<!-- =======================================================================
			Adjust the spellcheck_data line to use SpellingCow with ANY form and 
			ANY textarea or textbox.  Simply adjust the "value" data as follows:
				form:   Enter the form name to check.  Enter only one form name.
				source: Enter the form item to be checked.  Later versions will
						allow more than one item to be checked!
				button: Enter the name of the submit button for the form
				type:   phpBB, vB, IPB, or other - not used yet, but perhaps
						will be in the near future

			The following is optimized for a standard phpBB install but you can
				make any changes desired regarding style or to accommodate MODs
		     =======================================================================  -->
<!-- SPELL CHECKER -->
		  <tr align="center">
			<td colspan="4">
				<input type="hidden" name="auto_spell_check" value="{AUTO_SPELL}">
				<input type="button" name="spellcheck" class="liteoption" value="Spell Check" 
					onClick="window.open('spell-gw.php?mode=load&form=post&source=message&button=post&type=phpBB', '_spellcheck', 'HEIGHT=484,resizable=yes,scrollbars=yes,WIDTH=595');"><br>

				<style type="text/css"><!-- .spellcow, a.spellcow { font-size : 8px; color : #FFFFFF; } --></style>
				<!-- Removal of the following line may result in suspension of the service by SpellingCow.  Come on, linking back to us is not asking much but means a lot to us.  Thanks! ;-) -->
				<span class="spellcow">by <a href="http://www.spellingcow.com" target="_blank" class="spellcow">SpellingCow.com</a><a href="spell-gw.php" target="_blank" class="spellcow">.</a><br>
			</td>
		  </tr>
<!-- SPELL CHECKER -->
#
#-----[ REPLACE WITH ]---------------------------------
#
//
#
#-----[ FIND ]---------------------------------
#
#   NOTE - the complete line to find is:
# <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" onclick="javascript:preview_press()" />&nbsp;<input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
#
value="{L_SUBMIT}" onclick="javascript:auto_check_spelling()"
#
#-----[ IN-LINE FIND ]---------------------------------
#
value="{L_SUBMIT}" onclick="javascript:auto_check_spelling()"
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
value="{L_SUBMIT}"
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]---------------------------------
#
<!-- SPELLINGCOW begin -->
	<tr> 
	  <td class="row1"><span class="gen">{L_ALWAYS_SPELL_CHECK}:</span></td>
	  <td class="row2"> 
		<input type="radio" name="spellcheck" value="1" {ALWAYS_SPELL_CHECK_YES} />
		<span class="gen">{L_YES}</span>&nbsp;&nbsp; 
		<input type="radio" name="spellcheck" value="0" {ALWAYS_SPELL_CHECK_NO} />
		<span class="gen">{L_NO}</span></td>
	</tr>
<!-- SPELLINGCOW end -->
	<tr> 
	  <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
#
#-----[ REPLACE WITH ]---------------------------------
#
	<tr> 
	  <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/overall_footer.tpl
#
#-----[ FIND ]---------------------------------
#
phpBB Group :: Spelling by <a href="http://www.spellingcow.com/" target="_phpbb" class="copyright">SpellingCow</a><a href="spell-gw.php" target="_phpbb" class="copyright">.</a>
#
#-----[ IN-LINE FIND ]---------------------------------
#
phpBB Group :: Spelling by <a href="http://www.spellingcow.com/" target="_phpbb" class="copyright">SpellingCow</a><a href="spell-gw.php" target="_phpbb" class="copyright">.</a>
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
phpBB Group
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------
#
# EoM
