TITLE: Invite Friend v1.0

DESCRIPTION:
This hack will add a link to the "Your Special Features" bar near the top of the index/start page of the forums [when logged in as a member].
This hack 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.8 Final and 1.8 Final SP1.

License Note: This mod is released under the GPL License.

Author Note:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this mod.
Downloading this mod from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMB Garage will not offer support for mods not offered in our mod 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.



Open Up Your Lang File

Add To Bottom Of File:

-------------------------------------------------------------------------------------------------------------------

// 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['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

-------------------------------------------------------------------------------------------------------------------

Save Changes And Upload Over Old Lang File



Create A Template: invitefriend

Put In The Following Into It:

-------------------------------------------------------------------------------------------------------------------

<form method="post" action="invitefriend.php">
<table cellspacing="0" cellpadding="0" border="0" width="$tablewidth" align="center">
 <tr>
  <td bgcolor="$bordercolor">
   <table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%">
    <tr class="header">
     <td colspan="2">$lang[textinvitefriend]</td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$altbg1" width="22%">$lang[textyourname]</td>
     <td bgcolor="$altbg2"><input type="text" name="fromname" size="30" maxlength="40" value="$yourname"></td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$altbg1">$lang[textyouremail]</td>
     <td bgcolor="$altbg2"><input type="text" name="fromemail" size="30" value="$youremail"></td>
    </tr>
    <tr class="tablerow">
     <td bgcolor="$altbg1">$lang[textsendtoname]</td>
      <td bgcolor="$altbg2"><input type="text" name="sendtoname" size="30" value="" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$altbg1">$lang[textsendtoemail]</td>
      <td bgcolor="$altbg2"><input type="text" name="sendtoemail" size="30" value="" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$altbg1">$lang[textsubject]</td>
      <td bgcolor="$altbg2">
      <input type="text" name="subject" size="30" value="$lang_textinvitefriendsubject" /></td>
     </tr>
     <tr class="tablerow">
      <td bgcolor="$altbg1" valign="top">$lang[textmessage]</td>
      <td bgcolor="$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>

-------------------------------------------------------------------------------------------------------------------

Save Changes



Open "index_welcome_member" Template

Find:

------------------------------------------------------------------------------------------------------------------

<td colspan="3">

------------------------------------------------------------------------------------------------------------------

Replace with:

------------------------------------------------------------------------------------------------------------------

<td colspan="4">

------------------------------------------------------------------------------------------------------------------

Find (3 times):

------------------------------------------------------------------------------------------------------------------

width="33%"

------------------------------------------------------------------------------------------------------------------

Replace with (3 times):

------------------------------------------------------------------------------------------------------------------

width="25%"

Find:

-------------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------------

Add Below That:

-------------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------------

Save Changes



Upload The "invitefriend.php" File To The Main Directory Of Your Forums [Where The "index.php", header.php", etc. Files Are].



Enjoy!


-Jonathon