############################################################## 
## MOD Title: Recommend Forum - EM Friendly
## MOD Author: acoolwelshbloke < acoolwelshbloke@tec2spec.co.uk > (Paul Norman) http://www.tec2spec.co.uk 
## MOD Description: Allows members to recommend your forum to a friend.
## MOD Version: 1.0.2
##
## Installation Level: (easy)
## Installation Time: 5 Minutes 
## Files To Edit: 6		
## 		 		  index.php,
##				  viewonline.php,
##				  admin/index.php,
##				  includes/constants.php,
##				  language/lang_english/lang_main.php
##				  templates/subSilver/index_body.tpl,
##
## Included Files: 3
## 				   recommend.php,
##				   recommend_body.tpl,
##				   recommend_email.tpl
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
############################################################## 
## Author Notes:
## 
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY 
## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
## FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL 
## THE AUTHOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
## INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
## ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
##
############################################################## 
## MOD History:
##
##   2006-05-09 - Version 1.0.2
##      	- Fixed Senders Email Address 
##      	- Fixed Email Reply Address
##      	- Unlocked Message Box
##
##   2006-01-28 - Version 1.0.1
##      	- Added Name Verification 
##      	- Added Email Verification
##      	- Added Message Verification
##      	- Added Email Validation
##      	- Fixed "Friends Name" Bug
##      	- Locked Message box
##
##   2005-04-18 - Version 1.0.0  
##      	- First release
##					 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ DIY INSTRUCTIONS ]----------------------------------------- 
# 
Please change the last entry in the lang_english modifications at the end of 
this MOD script to reflect your forum URL!  Currently it is recommending
the following forum and will continue to do so if you don't change this link near the 
bottom of this MOD script:  http://www.tec2spec.co.uk/forum/

# 
#-----[ COPY ]------------------------------------------------ 
# 
copy recommend.php to recommend.php
copy recommend_body.tpl to templates/subSilver/recommend_body.tpl
copy recommend_email.tpl to language/lang_english/email/recommend_email.tpl

# 
#-----[ OPEN ]------------------------------------------------ 
# 
index.php 
# 
#-----[ FIND ]------------------------------------------------ 
# 
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
		'L_RECOMMEND_FORUM' => $lang['Recommend_Forum'],
		'U_RECOMMEND_FORUM' => append_sid("recommend.$phpEx"),
# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/constants.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
define('PAGE_TOPIC_OFFSET', 5000);
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
define('PAGE_RECOMMEND', -8004);
# 
#-----[ OPEN ]------------------------------------------------ 
# 
viewonline.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
				default:
					$location = $lang['Forum_index'];
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
				case PAGE_RECOMMEND:
					$location = $lang['Viewing_Recommend'];
					$location_url = "recommend.$phpEx";
					break;
# 
#-----[ OPEN ]------------------------------------------------ 
# 
admin/index.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
						default:
							$location = $lang['Forum_index'];
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
						case PAGE_RECOMMEND:
							$location = $lang['Viewing_Recommend'];
							$location_url = "index.$phpEx?pane=right";
							break;
# 
#-----[ FIND ]------------------------------------------------ 
# 
					default:
						$location = $lang['Forum_index'];
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
					case PAGE_RECOMMEND:
						$location = $lang['Viewing_Recommend'];
						$location_url = "index.$phpEx?pane=right";
						break;		
# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/index_body.tpl
# 
#-----[ FIND ]------------------------------------------------ 
# 
rowspan="2"
# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
rowspan="2"
# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
# 
rowspan="3"
# 
#-----[ FIND ]------------------------------------------------ 
#
{TOTAL_USERS_ONLINE}
# 
#-----[ FIND ]------------------------------------------------ 
#
</tr>
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
<!-- BEGIN switch_user_logged_in -->
<tr>
	<td colspan="2" class="row1" align="left"><span class="gensmall"><b><a href="{U_RECOMMEND_FORUM}">{L_RECOMMEND_FORUM}</a></b></span></td>	  
</tr>
<!-- END switch_user_logged_in -->
# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_english/lang_main.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
$lang['Viewing_FAQ'] =

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$lang['Viewing_Recommend'] = 'Recommends the forum';

# 
#-----[ FIND ]------------------------------------------------ 
# 
?>
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# Please change the last entry to reflect your forum URL!

//
// Recommend forum
//
$lang['Recommend_Forum'] = "Recommend this forum to a friend";
$lang['Recommend_Forum_Sender_User'] = "Your Name:";
$lang['Recommend_Forum_Sender_Email'] = "Your Email:";
$lang['Recommend_Forum_Reciever_User'] = "Your Friend's Name:";
$lang['Recommend_Forum_Reciever_Email'] = "Your Friend's Email:";
$lang['Recommend_Forum_Msg'] = "Your message:";
$lang['Recommend_Forum_Body'] = "Hi,\n\nI just visited the %s forum board and thought you might be interested in what is happening there. Here is the link: %s"; // %s is replaced by sitename and the forum's url
$lang['Recommend_Forum_error'] = "You have not entered a (valid) email address";
$lang['Recommend_Forum_URL'] = "http://www.tec2spec.co.uk/forum/"; // change this to your forum URL

# 
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------- 
# 
# EoM