Mod Title: Gmail Addon v1.0

Mod Author: John Briggs

Gmail Graphics By: torb

Last Updated: 04/13/06

Mod Description:
This mod will provide a full addon for the popular Gmail (Google Mail) address.

Supported Version: XMB 1.9.5 Nexus Final

Installation Note: Before adding this mod to your forum, you should back up all files related to this mod.

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

Author Note:
For security purposes, Please Check: http://www.xmbmods.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, xmbmods.com will not offer support for mod's not offered in our mod forum.

=======================================================================================================================
=======
Step 1:
=======

===========================================
Go To Administration Panel-->Insert Raw SQL
===========================================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

=======================================================================================================================
=======
Step 2:
=======

==========================
Edit File: editprofile.php
==========================

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

    $sig            = isset($newsig) ? checkInput($newsig, '', $SETTINGS['sightml'], '', false) : '';

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

    $gmail          = isset($newgmail) ? checkInput($newgmail, 'no', 'no', 'javascript', false) : '';

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

    $memlocation    = addslashes($newmemlocation);

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

    $gmail	= addslashes($gmail);

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

$db->query("UPDATE $table_members SET email='$email',

==================================================
Find Code In-Line At End Of Above Query Statement:
==================================================

 WHERE uid='".$member['uid']."'");

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

, gmail='$gmail' WHERE uid='".$member['uid']."'");

=======================================================================================================================
=======
Step 3:
=======

====================
Edit File: memcp.php
====================

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

        $sig            = isset($newsig) ? checkInput($newsig, '', $SETTINGS['sightml'], '', false) : '';

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

        $gmail          = isset($newgmail) ? checkInput($newgmail, '', '', 'javascript', false) : '';

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

        $memlocation    = addslashes($memlocation);

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

        $gmail	= addslashes($gmail);

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

$db->query("UPDATE $table_members SET $pwtxt email='$email'

==================================================
Find Code In-Line At End Of Above Query Statement:
==================================================

 WHERE username='$xmbuser'");

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

, gmail='$gmail' WHERE username='$xmbuser'");

=======================================================================================================================
=======
Step 4:
=======

=====================
Edit File: member.php
=====================

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

,'member_profile_email'

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

,'member_profile_email','member_profile_gmail'

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

        $sig           = checkInput($_POST['sig']);

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

        $gmail       = isset($gmail) ? checkInput($gmail, '', '', "javascript", false) : '';

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

        $locationnew   = addslashes($locationnew);

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

        $gmail	= addslashes($gmail);

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

$db->query("INSERT INTO $table_members (uid,

==============================================
Find Code In-Line In Of Above Query Statement:
==============================================

) VALUES ('', '$username',

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

, gmail) VALUES ('', '$username',

==================================================
Find Code In-Line At End Of Above Query Statement:
==================================================

)");

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

, '$gmail')");

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

            if ($memberinfo['showemail'] == "yes") {
                eval("\$emailblock = \"".template("member_profile_email")."\";");
            } else {
                $emailblock = '';
            }

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

            $gmailblock = '';
            if (X_MEMBER && !empty($memberinfo['gmail'])) {
                eval("\$gmailblock = \"".template('member_profile_gmail')."\";");
            }

=======================================================================================================================
=======
Step 5:
=======

===================
Edit File: misc.php
===================

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

, 'misc_mlist_row_email'

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

, 'misc_mlist_row_email', 'misc_mlist_row_gmail'

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

                    if ($member['email'] != "" && $member['showemail'] == "yes") {
                        eval("\$email = \"".template("misc_mlist_row_email")."\";");
                    } else {
                        $email = "&nbsp;";
                    }

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

                    $gmail = '';
                    if (X_MEMBER && !empty($member['gmail'])) {
                        eval("\$gmail = \"".template('misc_mlist_row_gmail')."\";");
                    }

=======================================================================================================================
=======
Step 6:
=======

=========================
Edit File: viewthread.php
=========================

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

,'viewthread_post_email'

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

,'viewthread_post_email','viewthread_post_gmail'

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

            if ($post['showemail'] == 'yes') {
                eval("\$email = \"".template('viewthread_post_email')."\";");
            } else {
                $email = "";
            }

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

            $gmail = '';
            if (X_MEMBER && !empty($post['gmail'])) {
                eval("\$gmail = \"".template('viewthread_post_gmail')."\";");
            }

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

            $location = '';
            $mood = '';

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

            $gmail = '';

=======================================================================================================================
=======
Step 7:
=======

=================================
Edit File: /lang/English.lang.php
=================================

================
Add To End Of File:
================

// Gmail Addon Mod Begin
$lang['gmail'] = 'GMail&#8482;:';
$lang['gmailalt'] = 'Gmail&#8482; This Member';
// Gmail Addon Mod End

=======================================================================================================================
=======
Step 7:
=======

==============================================================================
Go to admin panel -> templates -> create template name -> member_profile_gmail
==============================================================================

==================
Add Code & Submit:
==================

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[gmail]</td>
<td bgcolor="$altbg2" class="tablerow"><a href="mailto:$memberinfo[gmail]" title="$lang[gmailalt]">$memberinfo[gmail]</a></td>
</tr>

=======================================================================================================================
=======
Step 8:
=======

==============================================================================
Go to admin panel -> templates -> create template name -> misc_mlist_row_gmail
==============================================================================

==================
Add Code & Submit:
==================

<a href="mailto:$member[gmail]"><img src="$imgdir/gmail.gif" border="0" alt="$lang[gmailalt]" title="$lang[gmailalt]" /></a>

=======================================================================================================================
=======
Step 9:
=======

===============================================================================
Go to admin panel -> templates -> create template name -> viewthread_post_gmail
===============================================================================

==================
Add Code & Submit:
==================

<a href="mailto:$post[gmail]"><img src="$imgdir/gmail.gif" border="0" alt="$lang[gmailalt]" title="$lang[gmailalt]" /></a>

=======================================================================================================================
=======
Step 10:
=======

=======================================================
Go to admin panel -> templates -> admintool_editprofile
=======================================================

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

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[textemail]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newemail" size="25" value="$member[email]" /><br /><a href="http://www.network-tools.com/default.asp?prog=validate&amp;Netnic=whois.arin.net&amp;host=$member[email]" target="_blank">$lang[adminverifyemail]</a></td>
</tr>

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

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[gmail]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newgmail" size="25" value="$member[gmail]" /></td>
</tr>

=======================================================================================================================
=======
Step 11:
=======

===============================================
Go to admin panel -> templates -> memcp_profile
===============================================

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

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[textemail]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newemail" size="25" value="$member[email]" /></td>
</tr>

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

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[gmail]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newgmail" size="25" value="$member[gmail]" /></td>
</tr>

=======================================================================================================================
=======
Step 12:
=======

================================================
Go to admin panel -> templates -> member_profile
================================================

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

$emailblock

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

$gmailblock

=======================================================================================================================
=======
Step 13:
=======

=================================================
Go to admin panel -> templates -> viewthread_post
=================================================

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

$yahoo

===============
Add Code After:
===============

$gmail

=======================================================================================================================
=======
Step 14:
=======

============================================
Go to admin panel -> templates -> member_reg
============================================

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

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[textsite]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="site" size="25" /></td>
</tr>

===============
Add Code Above:
===============

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[gmail]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="gmail" size="25" /></td>
</tr>

=======================================================================================================================
=======
Step 15:
=======

================================================
Go to admin panel -> templates -> misc_mlist_row
================================================

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

<td bgcolor="$altbg2" class="ctrtablerow">$email</td>

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

<td bgcolor="$altbg2" class="ctrtablerow">$gmail</td>

=======================================================================================================================
=======
Step 16:
=======

============================================
Go to admin panel -> templates -> misc_mlist
============================================

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

<td width="10%" class="header" align="center">$lang[textemail]:</td>

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

<td width="10%" class="header" align="center">$lang[gmail]</td>

=======================================================================================================================
=======
Step 17:
=======

==================================================
Go to admin panel -> templates -> misc_mlist_admin
==================================================

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

<td width="10%" class="header" align="center">$lang[textemail]:</td>

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

<td width="10%" class="header" align="center">$lang[gmail]</td>

=======================================================================================================================
=======
Step 18:
=======

=================================================================================
Go to admin panel -> templates -> misc_mlist_multipage, misc_mlist_results_none and misc_mlist_separator
=================================================================================

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

colspan="8"

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

colspan="9"

=======================================================================================================================
=======
Step 19:
=======

There are "gmail.gif" images provided for all the XMB default themes.
If you use these themes then you can use the images.

Upload "gmail.gif" to all theme images folders.

=======================================================================================================================