TITLE: Invite A Friend v1.0

DESCRIPTION:
This modification will add a link to the "Your Personal Features" bar near the top of the index/start page of the forums [when logged in as a member].
This modification will allow you to send an email to invite a person to check out the forums the email is sent from.

VERSION: 1.0

CREATOR: Jonathon of JDMnet.org (jonathon@jdmnet.org)

COMPATIBILITY: Made to work with XMB version 1.9.8 SP3.

UPDATED FOR 1.9.8 SP3: WormHole @ XMB Garage

License Note: This modification is released under the GPL License. A copy is provided with this software package.

Author Note:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this modification.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMB Garage will not offer support for modifications not offered at our support forum.

NOTES: Make sure to make backup copies of files and templates that will be edited. Also, this version allows you to only invite one person/email 
address at a time. Future releases may support multiple email address.

============================================================================================================================
=======
Step 1.
=======
=======================
Edit File: lang/English.lang.php
=======================
==========================
Add To Bottom Of File Above ?>
==========================

// Invite A Friend Mod Begin
$lang['friendnonamemsg'] = "You did not enter your name on the form. Please go back and do so now.";
$lang['friendnoemailmsg'] = "The message area on the form is blank. Please go back and fill in a message now.";
$lang['friendnotonamemsg'] = "You did not enter your friend's name on the form. Please go back and do so now.";
$lang['friendnotoemailmsg'] = "You did not enter your friend's email address on the form. Please go back and do so now.";
$lang['friendnosubject'] = "You did not enter a subject on the form. Please go back and do so now.";
$lang['textinvitefriend'] = "Invite A Friend";
$lang['textinvitefriendsubject'] = "Check Out This Forum";
$lang['textinvitefriendmessage1'] = "wants you to check out $bbname. ";
$lang['textinvitefriendmessage2'] = "This is a forum/message board which is located at $boardurl";
$lang['textyourname'] = "Your Name:";
$lang['textyouremail'] = "Your Email";
$lang['textsendtoname'] = "Your Friend's Name";
$lang['textsendtoemail'] = "Your Friend's Email";
$lang['textinvitefriendsent'] = "Your Invitation Has Been Sent!";
$lang['textsend'] = "Send Invitation";
// Invite A Friend Hack Mod End

============================================================================================================================
=======
Step 2.
=======
==========================
Go To Admin Panel --> Templates
==========================
==========================
Create New Template: invitefriend
==========================
======================
Add Code and Click Submit
======================

<form method="post" action="invitefriend.php">
<table cellspacing="0" cellpadding="0" border="0" width="$THEME[tablewidth]" align="center">
 <tr>
  <td bgcolor="$THEME[bordercolor]">
   <table border="0" cellspacing="$THEME[borderwidth]" cellpadding="$THEME[tablespace]" width="100%">
    <tr class="header">
     <td colspan="2">$lang[textinvitefriend]</td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$THEME[altbg1]" width="22%">$lang[textyourname]</td>
     <td bgcolor="$THEME[altbg2]"><input type="text" name="fromname" size="30" maxlength="40" value="$yourname"></td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$THEME[altbg1]">$lang[textyouremail]</td>
     <td bgcolor="$THEME[altbg2]"><input type="text" name="fromemail" size="30" value="$youremail"></td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$THEME[altbg1]">$lang[textsendtoname]</td>
      <td bgcolor="$THEME[altbg2]"><input type="text" name="sendtoname" size="30" value="" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$THEME[altbg1]">$lang[textsendtoemail]</td>
      <td bgcolor="$THEME[altbg2]"><input type="text" name="sendtoemail" size="30" value="" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$THEME[altbg1]">$lang[textsubject]</td>
      <td bgcolor="$THEME[altbg2]">
      <input type="text" name="subject" size="30" value="$lang[textinvitefriendsubject]" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$THEME[altbg1]" valign="top">$lang[textmessage]</td>
      <td bgcolor="$THEME[altbg2]"><textarea rows="9" cols="45" name="message">$yourname $lang[textinvitefriendmessage1]$lang[textinvitefriendmessage2]</textarea></td>
     </tr>
    </table>
   </td>
  </tr>
 </table>
 <br>
<center><input type="submit" name="invitesubmit" value="$lang[textsend]" /></center>
</form>

============================================================================================================================
=======
Step 3.
=======
==========================
Go To Admin Panel --> Templates
==========================
=============================
Edit Template: index_welcome_member
=============================
==========
Find Code:
==========

<td colspan="3">

================
Replace Code With:
================

<td colspan="4">

================
Find Code (3 times):
================

width="33%"

=======================
Replace Code With (3 times):
=======================

width="25%"

==========
Find Code:
==========

<td width="25%"><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>

===============
Add Code Below:
===============

<td align="center" width="25%"><a href="invitefriend.php"><strong>$lang[textinvitefriend]</strong></a></td>

============================================================================================================================
=======
Step 4.
=======

Upload The "invitefriend.php" File To The Main Directory Of Your Forums.

============================================================================================================================
Enjoy!