View Full Version : Integrated MSN Hack
globalwin
06-29-2002, 10:00 PM
Hi guys. I made this hack because I was sick of just having the standard messenger fields, so I decided to make a hack that integrated the MSN Messenger Handle professionally in like the other ones. Some screenies below:
Register & Edit Profile:
http://www.elemetrix.net/comp/regnprofile.gif
User Profile View:
http://www.elemetrix.net/comp/profile.gif
Postbit View:
http://www.elemetrix.net/comp/postbit.gif
As you can see this is integrated, and is quite different from Anime-loo's hack.
Install instructions updated!
Extra ability added - View MSN Info in Private Messages
bonnmac
06-30-2002, 05:10 PM
Hehe I'm the first one to say Thanks! I'm not a code writer so I really appreciate it when someone releases a hack that I'd really like. Haven't installed yet but I'm getting ready to. I'm sure it will work great!
globalwin
06-30-2002, 05:11 PM
Im not a code writer either, just a 14yr old with too much time on his hands :D
bluecat
06-30-2002, 06:12 PM
Cool! Thanks.
lordnet
06-30-2002, 06:23 PM
great hack ;)
my best wish...
LORD
bluecat
06-30-2002, 06:31 PM
edit: all set. :)
Boofo
06-30-2002, 06:46 PM
You forgot to add this in your instructions. :) I put it as number 8 and changed the other numbers after it to match.
NOTE: Don't forget to take the spaces out of the altcolor variables.
8. In getinfo template find:
<tr>
<td bgcolor="{ firstaltcolor}"><normalfont><b>AOL Instant Messenger Handle:</b></normalfont></td>
<td bgcolor="{ firstaltcolor}"><normalfont>$userinfo[aim] <!-- $ userinfo[aimicon] AIM ICON - remove comments --></normalfont></td>
</tr>
add under it:
<tr>
<td bgcolor="{ secondaltcolor}"><normalfont><b>MSN Messenger Handle:</b></normalfont></td>
<td bgcolor="{ secondaltcolor}"><normalfont>$userinfo[msn] <!-- $ userinfo[msnicon] MSN ICON - remove comments --></normalfont></td>
</tr>
Chris M
06-30-2002, 06:50 PM
Very easy to follow:)
Thanks:)
Satan
Enjoy Marcus
06-30-2002, 07:15 PM
There is a script that pops up the add a contact screen with the email when the msn icon is clicked, i found this, this is roughly it;
<SCRIPT language=VBScript id=mcvbs
src="mc.vbs"></SCRIPT><SCRIPT language=VBScript event=onReadyStateChange for=mcvbs>
If mcvbs.readyState="complete" And Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</SCRIPT>
<SCRIPT language=VBScript event=onload for=window>
If Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</script>
<script language=VBscript>
Function AddThisEmail(stremail)
If HasMsgrApp Then
MsgrApp.LaunchAddContactUI(strEmail)
end if
End Function
</SCRIPT>
<IMG id=mctrack height=1 alt="">
<SPAN id=appload
style="DISPLAY: none"></SPAN>
<br>
<a href='vbscript:AddThisEmail("$msnhandle")'><img src=$msnimg border=0></a></center>
<Div Style="display:none">
<script language="JavaScript" src="http://m1.nedstatbasic.net/basic.js">
</script>
<font color="#003399" size="3"><script language="JavaScript">
<!--
nedstatbasic("ABLLlwVVIdwIJ5qGuvn+ceABD/Pg", 1);
// -->
</script>
globalwin
06-30-2002, 07:30 PM
cool, will try adding it to the hack! :D
Link14716
06-30-2002, 08:00 PM
Cool, I will install it later...
NTLDR
06-30-2002, 09:48 PM
Great hack, installed without any problems, I've been looking to add this to my board for a while now.
bluecat
06-30-2002, 10:27 PM
Can someone tell me what I've done wrong? This is what I see now...
Under profile, it's the image below:
bluecat
06-30-2002, 10:28 PM
And in threads, the bottom lines shows this (below) and isn't linked (i.e. it won't open up the messenger).
globalwin
06-30-2002, 11:39 PM
Originally posted by bluecat
Can someone tell me what I've done wrong? This is what I see now...
Under profile, it's the image below:
Are you sure you closed the table tags? /
And the hack doesnt open messenger yet, im sure some Uber L33T person e.g. Boofo will add it :D
bluecat
07-01-2002, 12:09 AM
I apologize sounding stupid, but what do you mean by closing the tags?
SemperFidelis
07-01-2002, 02:17 AM
As per what bluecat asked :
Whats with the green ?
Apart from that, excellent idea.
And thankyou
:)
Boofo
07-01-2002, 02:19 AM
Check your colors. You have either firstaltcolor or secondaltcolor misspelled or put in there wrong in the code.
Originally posted by v-net
As per what bluecat asked :
Whats with the green ?
Apart from that, excellent idea.
And thankyou
:)
pattox2k1
07-01-2002, 03:25 AM
heh looks like you got around to it before me.....
SemperFidelis
07-01-2002, 04:50 AM
No good so far
(with the green colour I mean)
Just went thru the install instructions again - including the addtional bit - and its still green
Speeling of both firstaltcolor and secondaltcolor is the same as in the install file (and as above)
Any other ideas ?
Boofo
07-01-2002, 04:53 AM
PM me with the chunk of code that is giving you problems. Send the the code right above it too.
SemperFidelis
07-01-2002, 04:58 AM
Will do
Thanks Boofo
:)
pattox2k1
07-01-2002, 07:06 AM
i might check through the code and look for bugs if you want.....
Boofo
07-01-2002, 07:49 AM
I'll have a re-write for it shortly for globalwin to fix some errors and add the option to have the msnicon show up in the private.php and privmsg template.
globalwin
07-01-2002, 03:30 PM
looking forward to it :D
globalwin
07-01-2002, 03:43 PM
I hav just now made it show in the private.php and privmsg template. About to update...
Link14716
07-01-2002, 03:47 PM
/me installs.
globalwin
07-01-2002, 03:54 PM
hack updated with View MSN Info in Private Messages :D
Les Shaw
07-01-2002, 05:44 PM
Originally posted by Enjoy Marcus
There is a script that pops up the add a contact screen with the email when the msn icon is clicked, i found this, this is roughly it;
<SCRIPT language=VBScript id=mcvbs
src="mc.vbs"></SCRIPT><SCRIPT language=VBScript event=onReadyStateChange for=mcvbs>
If mcvbs.readyState="complete" And Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</SCRIPT>
<SCRIPT language=VBScript event=onload for=window>
If Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</script>
<script language=VBscript>
Function AddThisEmail(stremail)
If HasMsgrApp Then
MsgrApp.LaunchAddContactUI(strEmail)
end if
End Function
</SCRIPT>
<IMG id=mctrack height=1 alt="">
<SPAN id=appload
style="DISPLAY: none"></SPAN>
<br>
<a href='vbscript:AddThisEmail("$msnhandle")'><img src=$msnimg border=0></a></center>
<Div Style="display:none">
<script language="JavaScript" src="http://m1.nedstatbasic.net/basic.js">
</script>
<font color="#003399" size="3"><script language="JavaScript">
<!--
nedstatbasic("ABLLlwVVIdwIJ5qGuvn+ceABD/Pg", 1);
// -->
</script>
Please excuse my ignorance but where exactly do I install this script?
globalwin
07-05-2002, 07:17 PM
I think Boofo is adding it for me :)
Boofo
07-05-2002, 07:22 PM
* Boofo says he is working on it. :)
Originally posted by globalwin
I think Boofo is adding it for me :)
-Sidekick-
07-06-2002, 05:08 AM
lol, I'm stuck at step 1. Says modify database. Where do I do this?
Go go post #1. :bunny:
scsa20
07-06-2002, 09:09 AM
Originally posted by Enjoy Marcus
There is a script that pops up the add a contact screen with the email when the msn icon is clicked, i found this, this is roughly it;
<SCRIPT language=VBScript id=mcvbs
src="mc.vbs"></SCRIPT><SCRIPT language=VBScript event=onReadyStateChange for=mcvbs>
If mcvbs.readyState="complete" And Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</SCRIPT>
<SCRIPT language=VBScript event=onload for=window>
If Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</script>
<script language=VBscript>
Function AddThisEmail(stremail)
If HasMsgrApp Then
MsgrApp.LaunchAddContactUI(strEmail)
end if
End Function
</SCRIPT>
<IMG id=mctrack height=1 alt="">
<SPAN id=appload
style="DISPLAY: none"></SPAN>
<br>
<a href='vbscript:AddThisEmail("$msnhandle")'><img src=$msnimg border=0></a></center>
<Div Style="display:none">
<script language="JavaScript" src="http://m1.nedstatbasic.net/basic.js">
</script>
<font color="#003399" size="3"><script language="JavaScript">
<!--
nedstatbasic("ABLLlwVVIdwIJ5qGuvn+ceABD/Pg", 1);
// -->
</script>
I'm almost done with my hack that does that so stay tune
Roody
07-06-2002, 04:37 PM
i'm having problems understanding what this is telling me to do. Can someone break this down for me exactly?
1. Modofy the database (*Database* - Change this to your database name)
ALTER TABLE `*Database*`.`user` ADD `msn` VARCHAR(50) NOT NULL;
^^^^^^^^^^
Edit This
-Sidekick-
07-06-2002, 08:54 PM
Originally posted by Roody
i'm having problems understanding what this is telling me to do. Can someone break this down for me exactly?
1. Modofy the database (*Database* - Change this to your database name)
ALTER TABLE `*Database*`.`user` ADD `msn` VARCHAR(50) NOT NULL;
^^^^^^^^^^
Edit This
That's what I said. :classic:
scsa20
07-06-2002, 08:59 PM
just use this in PHPMyAdmin:
ALTER TABLE `user` ADD `msn` VARCHAR(50) NOT NULL;
Roody
07-06-2002, 09:15 PM
man i must be dumb man because i cant find a phpmyadmin file.
any help?
scsa20
07-06-2002, 09:19 PM
you need to get PHPMyAdmin, ususaly most host comes with PHPMyAdmin alreadly installed for you, with others you need to install it yourself. do a search on the web for PHPMyAdmin
Roody
07-07-2002, 08:49 PM
ok two questions regarding this hack. first off i have installed PHPMyAdmin on my server. Do i need to add it into my forums directory or can it reside anywhere on my server? Second, where do i go now SCSA to put that info you listed? Which particular file do i tweak?
Frank
08-13-2002, 10:28 AM
There is a bug in the HTML register code.
Change: 7. In registeradult and registercopper templates find:
<td bgcolor="#F1F1F1"><normalfont><b>AOL Instant Messenger Handle:</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont><input type="text" class="bginput" name="aim" size="25" maxlength="20"></normalfont></td>
</tr>
and under it:
<td bgcolor="#DFDFDF"><normalfont><b>MSN Messenger Handle:</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont><input type="text" class="bginput" name="msn" size="25" maxlength="20"></normalfont></td>
</tr>
to:
7. In registeradult and registercopper templates find:
<td bgcolor="#F1F1F1"><normalfont><b>AOL Instant Messenger Handle:</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont><input type="text" class="bginput" name="aim" size="25" maxlength="20"></normalfont></td>
</tr>
and under it:
<tr>
<td bgcolor="#DFDFDF"><normalfont><b>MSN Messenger Handle:</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont><input type="text" class="bginput" name="msn" size="25" maxlength="20"></normalfont></td>
</tr>
You missed off adding a <tr>
Nice hack.
DarkDraco07
08-13-2002, 11:15 AM
just the hack i needed
[D]Vincent
08-13-2002, 11:23 AM
Alot of my members use MSN so I'll install this when my site is back up ^^
globalwin
08-18-2002, 08:45 AM
Originally posted by Frank
There is a bug in the HTML register code.
Change:
to:
You missed off adding a <tr>
Nice hack.
thanks, hack updated.
Donkeyballz
08-18-2002, 09:21 AM
Wow this hack is sweet, man looks great :rambo: Thx
Reverend
09-03-2002, 07:43 PM
Nice hack.Thanks.
One question,what template do i need to hack to change the first alt & second alt colors in the profile field.
See attachment.
thanks for the hack, but shouldnt admins be able to edit msn info in the admin cp ??
58sniper
09-28-2002, 03:35 AM
Should this show up in the memberlist as well? I installed this with no problem, but it doesn't show up in memberlist like AIM/Yahoo
Icheb
12-09-2002, 10:58 PM
if ($post[msn]!="") {
eval("\$post[msnicon] = \"".gettemplate("msn")."\";");
} else {
$post[msn]="";
}
I do not understand the necessity of the else-condition in step 2. In the if-clause, you check whether $post[msn] is empty or not. If it is not empty, you evaluate the template, else (and that is if the variable is empty) you clear it. Eh?
Icheb
Link14716
12-10-2002, 01:20 AM
That's because there is no necessity. It's just how some people writes the code. I myself used to do that.
Erwin
12-10-2002, 01:39 AM
vB2 has code like that all over the place. It's just to ensure the variable is empty.
Icheb
12-10-2002, 01:56 AM
But it has to be empty in the first place so that the else-clause is parsed, in every other case the if-clause is used.
Although i realize that this discussion is sort of pointless ;) .
Tony DiMera
01-22-2003, 04:10 PM
Thanks a lot.
Booba88
01-23-2003, 11:44 PM
Hey fellas I've modified this hack so that when you click on the msn icon under the users post it will do the following:
1. Check if you are logged into msn messenger If you are not it will tell you so.
2. Check if the person you clicked on is in your contact list if not it will open a msn add contact box with that users msnid
3. Finally It will ask you whether you want to send a message to this person if you so it will open a msn chat to the person.
Currently it doesn't check whether the person is online. I am working on this.
Well I've enclosed a modified zip with the modified file. I'm not a very experienced vb hacker but I hope you all understand.
Regards,
Booba88
Cyberhouse
01-26-2003, 07:28 PM
Great hack, thanks :)
nnjj.net
01-31-2003, 08:21 AM
I did every thing that I must do but nothing apper !!!!!
Icheb
01-31-2003, 09:05 AM
If no one in your buddy list has either a AIM or MSN number provided, nothing can appear.
nnjj.net
01-31-2003, 09:16 AM
so are you saying I must add the member first to my buddy list in my vb in order to see the icon of the msn ??
I can see nothing even in showthread or postbet or any where
Icheb
01-31-2003, 09:29 AM
Never mind, just saw the thread title and confused it with another MSN hack.
The user has to provide a MSN number so that you can view the icon. If that's the case for you, you didn't do everything as it is stated in the manual.
nnjj.net
01-31-2003, 09:38 AM
I'll recheck it again now
wait :)
nnjj.net
01-31-2003, 09:47 AM
I checked everything
nothing wrong or missing but still I can't see it
BTW msn can offer if I put as an ex. ****@hotmail.com
right ?
uzitalk
02-14-2003, 09:48 PM
Installed at UZI Talk Forums (http://www.uzitalk.com/forums/). Thanks! :banana:
Etcher
02-18-2003, 08:57 PM
Does this one work with MSN 5?
The other hack seems to be having problems with that version, has any one tried?
jibious
03-30-2003, 01:30 AM
i've added on some things to make this a little more complete. gives search functionality in memberlist.php as well as the admin user section.
===============
in memberlist.php
===============
find:
aim
after it add:
,msn
then find:
if ($aim!="") {
$condition.=" AND aim LIKE '%".addslashes(htmlspecialchars($aim))."%' ";
}
after it add:
if ($msn!="") {
$condition.=" AND msn LIKE '%".addslashes(htmlspecialchars($msn))."%' ";
}
then find:
if ($userinfo[aim]!="") {
eval("\$userinfo[aimicon] = \"".gettemplate("aim")."\";");
} else {
$userinfo[aim]=" ";
}
after it add:
if ($userinfo[msn]!="") {
eval("\$userinfo[msnicon] = \"".gettemplate("msn")."\";");
} else {
$userinfo[msn]=" ";
}
then find:
&aim=$aim
after it add:
&msn=$msn
===============
in admin/user.php
===============
find:
makeinputcode("AIM Handle","aim");
after it add:
makeinputcode("MSN Messenger Handle","msn");
then find:
aim,
after it add:
msn,
then find:
'".addslashes(htmlspecialchars($aim))."',
after it add:
'".addslashes(htmlspecialchars($msn))."',
then find:
makeinputcode("AIM Handle","aim",$user[aim],0);
after it add:
makeinputcode("MSN Messenger Handle","msn",$user[msn],0);
then find:
,aim='".addslashes(htmlspecialchars($aim))."'
after it add:
,msn='".addslashes(htmlspecialchars($msn))."'
then find:
makeinputcode("and AIM Handle contains","aim");
after it add:
makeinputcode("and MSN Messenger Handle contains","msn");
then find:
makeyesnocode("Display AIM ID","displayaim",0);
after it add:
makeyesnocode("Display MSN ID","displaymsn",0);
then find:
and $displayaim == 0
after it add:
and $displaymsn == 0
then find:
if ($aim!="") {
$condition.=" AND INSTR(LCASE(aim),'".addslashes(strtolower($aim))."')>0";
}
after it add:
if ($msn!="") {
$condition.=" AND INSTR(LCASE(msn),'".addslashes(strtolower($msn))."')>0";
}
then find:
,aim
after it add:
,msn
then find:
if ($displayaim==1) {
echo "<td><p><b><span class='tblhead'>AIM ID</span></b></p></td>";
}
after it add:
if ($displaymsn==1) {
echo "<td><p><b><span class='tblhead'>MSN ID</span></b></p></td>";
}
then find:
if ($displayaim==1) {
if ($user[aim]=="") {
$user[aim]=" ";
}
echo "<td><p>$user[aim]</p></td>";
}
after it add:
if ($displaymsn==1) {
if ($user[msn]=="") {
$user[msn]=" ";
}
echo "<td><p>$user[msn]</p></td>";
}
then find:
makehiddencode("aim",$aim);
after it add:
makehiddencode("msn",$msn);
then find:
makehiddencode("displayaim",$displayaim);
after it add:
makehiddencode("displaymsn",$displaymsn);
==================
In memberlist template
==================
find:
<td align="center" bgcolor="{ tableheadbgcolor }"><smallfont color="{ tableheadtextcolor }"><b>AIM</b></smallfont></td>
add under it:
<td align="center" bgcolor="{ tableheadbgcolor }"><smallfont color="{ tableheadtextcolor }"><b>MSN</b></smallfont></td>
==================
in memberlistsearch template
==================
find:
<tr>
<td bgcolor="{ secondaltcolor }"><normalfont><b>and AIM Handle contains</b></normalfont></td>
<td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" size="35" name="aim" value=""></normalfont></td>
</tr>
add under it:
<tr>
<td bgcolor="{ firstaltcolor }"><normalfont><b>and MSN Messenger Handle contains</b></normalfont></td>
<td bgcolor="{ firstaltcolor }"><normalfont><input type="text" class="bginput" size="35" name="msn" value=""></normalfont></td>
</tr>
==================
in memberlistbit template
==================
find:
<td bgcolor="{firstaltcolor}">$ userinfo[aimicon]</td>
add under it:
<td bgcolor="{firstaltcolor}">$ userinfo[msnicon]</td>
*note: you will need to remove the spaces (" ") between the {} on the template mods for the colors. also, fix the secondalt and firstalt colors to suit your board (i use the same for both, so i didn't need to make any fixes).
leitel
03-31-2003, 02:40 PM
Before i go throught the install, it is important to first determine if the actual handle is EXPOSED to general users? I scanned all threads and haven't found the answer. I LOVE the concept.
jibious
03-31-2003, 02:47 PM
if someone puts in their handle and saves their profile, then yes, it will be exposed to general users. its just like AIM and Yahoo and ICQ defaultly setup with vBulletin...
thody
04-10-2003, 03:11 PM
Everything seems to work ok, except the javascript for sending a message. I just get a js error. Anyone else?
u2page
04-15-2003, 08:02 PM
I'm getting an error too, with MSN 5. Any suggestions?
u2page
04-15-2003, 08:33 PM
I found the problem. The script is called InstantMessage in the javascript that is included in headinclude, but it is linked as DoInstantMessage in the link to the icon on the posts. Just change one or the other, that solves it.
deepdark
04-18-2003, 08:50 PM
when i want to sen a message via link in showthread is making some error?
kdog316
04-19-2003, 05:50 PM
when i register and put in the msn messanger filed my name or if i try to update it it doesnt register it in.
jibious
04-24-2003, 01:53 PM
i just enabled the javascript code - and i, too, am getting a javascript error.
Line: 22
Char: 63
Error: Object doesn't support this property or method
Code: 0
Line 22, Char 63:
if(confirm("Add "+username+" to your contact list?")==true)MsgrObj.AddContact(0,msnid);
jibious
04-24-2003, 02:26 PM
okay, i've figured out why this doesn't work for MSN 5.0
they clsid used in the javascript is B69003B3-C55E-4b48-836C-BC5946FC3B28, which is found in the registry at:
HKEY_CLASSES_ROOT\CLSID\{B69003B3-C55E-4b48-836C-BC5946FC3B28}
the LocalServer32 key entry for this points to:
C:\Program Files\Messenger\msmsgs.exe
MSN Messenger 5 uses the clsid of:
F81CD990-910B-4bbf-9CB3-6A77F3D697B3
so thats the issue - its trying to call upon Windows Messenger rather than MSN Messenger. so if anyone knows how to fix this, muchos gracias... :)
jibious
04-24-2003, 03:43 PM
okay, so with a bit more digging an a guy who helped with the original code hacking of the Messenger API, i found out where most, if not all, the info someone would need to use is found. i attached the .js file from hotmail's webpages (you can view source once you login to your hotmail account and search for .js and grab this file, as an alternative).
anyhow, it seems that with MSN Messenger 5.0, it uses MsngrObj.AddContact rather than MsgrObj.AddContact as well as some other things. i've done testing with just replacing MsgrObj with MsngrObj on all the instances, but i ended up getting the same error i got above...
otto
Sam FT
05-19-2003, 05:10 AM
I really like this hack, but I have one problem with it. When a user is registering and then they add their msn username. When they go back to their profile the msn username isn't there. If you add it from in the control panel it stays, but it just doesn't stay when you register. I followed the instructions and I have no hacks installed on my website.
jibious
05-19-2003, 06:15 AM
good find :)
==========
in register.php
==========
find:
,aim
after it, add:
,msn
find:
'".addslashes(htmlspecialchars($aim))."',
after it, add:
'".addslashes(htmlspecialchars($msn))."',
yxboom
05-27-2003, 04:41 AM
I installed this 3 times to make sure and now all my Online clients, AIM, ICQ and Yahoo are all messed up. Can't figure out if its just coincidence or if something is going on with this hack. I am on vb2.2.9
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.