########################################################
##
## Title: MSN Messenger Mod
## Version: 1.0.0 - final release (for now!)
## Author: Andareed (
and_a_reed@hotmail.com)
## Description:
## Changes the action when clicking on the msn messenger icon. When you click on it, you
## will be asked if you want to add the person to your contact list, and then it will ask
## if you want to send them an instant message. If messenger is not installed, an error
## message box is displayed. Currently, you must be signed in to messenger for this mod to
## work. This may be changed in a future release of this mod!
##
## Installation Level: Easy
## Installation Time: 2-5 Minutes
## Files To Edit: 4
## - privmsg.php
## - viewtopic.php
## - includes\usercp_viewprofile.php
## - templates\subSilver\overall_header.tpl
##
## Included Files: none
##
########################################################
##
## Version History:
##
## 1.0.0.0 Final.. No History unless someone finds a bug!
##
## (the phpBB Group Reserves The Right To Remove/Edit Author Notes, Should It Be Warranted)
##
#########################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#########################################################
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------
#
$msn_img = ( $privmsg['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $privmsg['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
#
#-----[ REPLACE WITH ]------------------------------
#
$msn_img = ( $privmsg['user_msnm'] ) ? '<a href=\'javascript:DoInstantMessage("'.$privmsg['user_msnm'].'","'.$privmsg['username_1'].'");\'><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = $msn_img;
#
#-----[ SAVE CLOSE UPLOAD ]---------------------------
#
privmsg.php
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$msn_img = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
#
#-----[ REPLACE WITH ]-----------------------------
#
$msn_img = ( $postrow[$i]['user_msnm'] ) ? '<a href=\'javascript:DoInstantMessage("'.$postrow[$i]['user_msnm'].'","'.$postrow[$i]['username'].'");\'><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = $msn_img;
#
#-----[ SAVE CLOSE UPLOAD ]--------------------------
#
viewtopic.php
#
#-----[ OPEN ]------------------------------------------
#
includes\usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$msn_img = ( $profiledata['user_msnm'] ) ? $profiledata['user_msnm'] : ' ';
$msn = $msn_img;
#
#-----[ REPLACE WITH ]-----------------------------
#
$msn_img = ( $profiledata['user_msnm'] ) ? '<a href=javascript:DoInstantMessage("'.$profiledata['user_msnm'].'","'.$profiledata['username'].'")><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSN'] . '" title="' . $lang['MSN'] . '" border="0" /></a>': ' ';
$msn = $msn_img;
#
#-----[ SAVE CLOSE UPLOAD ]--------------------------
#
includes\usercp_viewprofile.php
#
#-----[ OPEN ]------------------------------------------
#
templates\subSilver\overall_header.tpl
#
#-----[ ADD AT TOP ]------------------------------------------
#
<OBJECT classid='clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28' codeType='application/x-oleobject' height='1' id='MsgrObj' width='1'></OBJECT>
<script>
function DoInstantMessage(person,screen)
{
try
{
if(confirm("Add "+screen+" to your contact list?")==true)MsgrObj.AddContact(0,person);
if(confirm("Send "+screen+" an instant message?")==true)MsgrObj.InstantMessage(person);
}
catch(e)
{
alert("An error occured while attempting to launch Messenger!\nPlease verify you have Messenger installed and that you are logged onto the service.\n\nError Code: "+e.number);
}
}
</script>
#
#-----[ SAVE CLOSE UPLOAD ]--------------------------
#
templates\subSilver\overall_header.tpl
#
#-----[ EOM ]--------------------------------------------