TinyPortal

Development => Support => Topic started by: rctxtreme on August 23, 2006, 09:18:23 AM

Title: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 23, 2006, 09:18:23 AM
http://dev.live.com/contactsgadget/getstarted.aspx (http://dev.live.com/contactsgadget/getstarted.aspx)
Is there a way to integrate this into SMF so people can enter their e-mail into somewhere on the forum without bothering to open their contacts list?
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 23, 2006, 08:00:52 PM
You should be able to put all of that into and html file and then include('path/to/the/file.html'); in a phpbox and get it to work.
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 23, 2006, 08:07:40 PM
Sweet... I'm gonna add this.
Nice find dude. ;)

Can this also be added to an article page?
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 23, 2006, 08:08:48 PM
Block code snippets when your done Jpg! :)
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 23, 2006, 08:27:05 PM
Hmmm....I tried this but no luck. :\
It seems I made the Html block but it just shows one huge blank box...I tried it in a php article and no luck either.

Edit: It probably has to do with the
http://dev.live.com/scripts/AddressManager/channel.htm
I uploaded it but I don't know if I downloaded the htm properly....hmmm..
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 23, 2006, 08:38:16 PM
Here I'm posting the installation directions...Maybe one of you guys can get it working.

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

   1. First, you need to include the gadget’s JavaScript source files into your HTML page. Place the following statements between the <head> and </head> tags at the top of your HTML page:

     <script type="text/javascript"
      src="http://dev.live.com/scripts/AddressManager/ContactSelectorPartner.js"> </script>
      <script type=â€Ã,text/javascriptâ€Ã,
      src=â€Ã,http://dev.live.com/scripts/AddressManager/proxy.jsâ€Ã,>
      </script>


   2. Next, you need a place to display the contacts gadget. Insert a DIV element in your HTML page and give it a unique ID. You can use CSS or other means to control the position and size of the gadget on the page. (Note: limit the width to 500 or fewer pixels).   Here’s an example of a DIV tag with an ID of â€Ã...“ContactsGadgetSiteâ€Ã,:

      <div id="ContactsGadgetSite" style="width:250px;height:500px"></div>

   3. The Windows Live Contacts gadget uses a communication channel technique to send data between pages from different domains within the browser. To enable your web site to receive data from the gadget, you need to copy the file http://dev.live.com/scripts/AddressManager/channel.htm to a location on your web server. Let’s say your web site is www.mydomain.com; you could copy channel.htm to the root directory of your web server, so that the file would appear as http://www.mydomain.com/channel.htm to the outside world.

   4. Next, you need to write a little bit of JavaScript to instantiate the Windows Live Contacts gadget, tell it what kind of data you want from the user’s contacts (email, postal address, etc), where you want it to sit on your page, what to do with the data that is returned, and a few other housekeeping bits. This JavaScript code should execute after your page has loaded, so place the script either at the very bottom of your HTML page (just before the </body> tag) or in the onLoad event of the body element.

      <script type=â€Ã,text/javascriptâ€Ã,>
           var CP = new Microsoft.Gadget.ContactSelectorPartner(
           document.getElementById("ContactGadgetSite"),
           "http://mydomain.com/privacyStatement.html", //privacy statement
           URL
           "name,email", //comma delimited list of requested columns to
           return
           myCallbackFunction, //callback function
           "http://www.mydomain.com/channel.htm");  // communication
           endpoint in your domain
      </script>


      Make sure that the last parameter contains the fully qualified URL path to the copy of channel.htm on your web site. There’s no point in referring to channel.htm on some other domain â€ââ,¬Å" the whole point of it is to provide a destination inside your domain!

   5. Finally, write the callback function to receive contact information from the gadget:

      <script>
      function myCallbackFunction(p_command, p_contacts) {
        switch (p_command)
        {
          case "SIGN_OUT":  break; // user is not signed in to live.com
          case "SIGN_IN":   break; // user is signed in
          case "DATA":      // here comes the data!
            var s = "Done! " + p_contacts.length + " records received. <br>";
            for (var i = 0; i < p_contacts.length; i++)
            {
              s += â€Ã...“<p>â€Ã,;
              s += â€Ã...“Name: â€Ã...“ + p_contacts[i].name +â€Ã,<br>â€Ã,;
              s += â€Ã...“Email: â€Ã...“ + p_contacts[i].email;
              s += "</p>";
            }
            document.getElementById("ContactsDisplay").innerHTML = s;
            break;     
        }
      };
      </script>


That’s it! Your customers can now send their Windows Live and MSN contact lists to your web site. That’s more than 400 million contact records available to you through your users!
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: alan s on August 23, 2006, 08:47:12 PM
i think i can get this working in maybe 15 min?
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: alan s on August 23, 2006, 08:59:20 PM
Actually forget what i said there , i get a white page too and the actual content of the /channel.htm you download is

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

So i'd say theres something wrong with that
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 23, 2006, 10:23:04 PM
Same here. The channel seems to be my problem. I think I can find a good copy of the channel.htm by doing some google searches.

Edit:Here.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Channel</title>
<meta name="ROBOTS" content="NONE"/>

<script type="text/javascript">
function doc_loaded()
{
    try
    {
        window.location = "about:blank";
        var hash = window.location.hash.substr(1);
        var name = hash.split("/")[0];
        var win = null;
        if (name)
            win = window.parent.frames[name];
        else
            win = window.parent.parent;
        win.Microsoft.Internal.ChannelMux._recv_chunk(window.location);
    }
    catch (ex)
    {
        /* ignore */
    }
}
</script>
</head>
<body onload="doc_loaded()"></body>
</html>
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 23, 2006, 11:33:10 PM
Wow I've just started a huge topic for the first time... anyway good luck on getting it to work... whoever gets it to work gets credit below the box!
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 24, 2006, 05:20:43 AM
Let me know if it works for you guys? I've been having problems logging in with Firefox. And IE won't even load my page it errors and then aborts.

Try this link and you should see it in Firefox. I'm not sure about IE.

http://www.tmrules.com/beta/index.php

You can also see a direct link to the page here:
http://www.tmrules.com/beta/gadget.html
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: RoarinRow on August 24, 2006, 05:25:59 AM
Quote from: IchBinâââ,¬Å¾Ã,¢ on August 24, 2006, 05:20:43 AM
Let me know if it works for you guys? I've been having problems logging in with Firefox. And IE won't even load my page it errors and then aborts.

Try this link and you should see it in Firefox. I'm not sure about IE.

http://www.tmrules.com/beta/index.php

I get a Windows popup error, something about Operation aborted, then when I click OK, then page does not show, like page not found.
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 24, 2006, 05:33:49 AM
Exactly what I get, but it works in Firefox for me now....
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: G6Cad on August 24, 2006, 08:01:29 AM
On the first link it loads up, ask to reset some certificate, when i click reset, it loads up and ask for a login.

Second link works great, loads up and asks for the login directly :)  (Firefox & Netscape)
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 24, 2006, 08:11:50 AM
And therefore Microsoft and Bill Gates are evil...
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 27, 2006, 02:10:20 AM
Can anyone get this working though? I would love this in an article page.
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 27, 2006, 04:26:51 AM
I could probably get this working if I added the code to the theme instead of trying to include it in a php file. It requires javascript to be put in the <head> tag of the page so what I did was create a html file with all the code in it and then including it with some php code into a block or article. It works in FF, but no in IE for some reason. The problem with me doing this in a theme is that not everyone is using using the same theme.....
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 27, 2006, 07:41:32 AM
Quote from: Jpg on August 27, 2006, 02:10:20 AM
Can anyone get this working though? I would love this in an article page.

We would much more love it if it was in a block, for easy access
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: akulion on August 27, 2006, 07:52:24 AM
uumm i dont see what the problem is

just put all this gibbrish in a Scriptbox and it works just fine



     <script type="text/javascript" src="http://dev.live.com/scripts/AddressManager/ContactSelectorPartner.js">
     </script>
      <script type="text/javascript" src="http://dev.live.com/scripts/AddressManager/proxy.js">
      </script>
<div id="ContactsGadgetSite" style="width:250px;height:500px"></div>
<script>
function myCallbackFunction(p_command, p_contacts) {
  switch (p_command)
  {
    case "SIGN_OUT":  break; // user is not signed in to live.com
    case "SIGN_IN":   break; // user is signed in
    case "DATA":      // here comes the data!
      var s = "Done! " + p_contacts.length + " records received. <br>";
      for (var i = 0; i < p_contacts.length; i++)
      {
        s += "<p>";
        s += "Name: " + p_contacts[i].name +"<br>";
        s += "Email: " + p_contacts[i].email;
        s += "</p>";
      }
      document.getElementById("ContactsDisplay").innerHTML = s;
      break;
  }
};
</script>

<script type="text/javascript">
     var CP = new Microsoft.Gadget.ContactSelectorPartner(
     document.getElementById("ContactsGadgetSite"),
     "http://www.tmrules.com/beta/privacyStatement.html", //privacy statement URL
     "name,email", //comma delimited list of requested columns to return
     myCallbackFunction, //callback function
     "http://www.tmrules.com/beta/channel.htm");  // communication endpoint in your domain
</script>



Enjoy

Demo here << (http://path-to-peace.org/trainingboard/index.php)
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 27, 2006, 07:55:51 AM
FF: Never loads contacts gadget
IE: Aborts operation

:uglystupid2: :uglystupid2: :uglystupid2:
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 27, 2006, 02:52:35 PM
It probably does load in Firefox but it takes an hour or so. :\

Maybe it's the channel htm. Change the url to the one you are supposed to copy....lol...

http://dev.live.com/scripts/AddressManager/channel.htm
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: akulion on August 27, 2006, 08:23:21 PM
well in IE its not working

but in FF seems to work fine and I dont get long waiting time...just about  under a min usully

Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 27, 2006, 10:01:45 PM
If MS is nice enough to let FF users use Live Mail then Live Contacts should work as well. ???
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: akulion on August 27, 2006, 10:32:45 PM
well whats weird is that its not workin on IE and IE is an MS product lol
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: IchBin on August 27, 2006, 11:15:41 PM
I don't think its IE's fault really. I think it has something to do with the way TP is parsing the code. Because if you put it in a page like this www.tmrules.com/beta/gadget.html it works absolutely fine. This is why I said that I could probably get it to work if its hard coded it into the theme.
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 28, 2006, 01:25:07 AM
Go for it dude. :)
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: akulion on August 28, 2006, 02:02:50 AM
what does this thing relly do?

I didnt look into it in much detail - at first i thought COOl its MSN messenger lol

but then its something to do with contacts...so what is it exactly?
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on August 28, 2006, 02:13:49 AM
You can add people to your Msn list and I think you can do some other things. not sure but sounds cool. ;)
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: akulion on August 28, 2006, 02:36:51 AM
hat would be really cooooool is if it was a full fledge msn messenger module! that would surely be the coolest

i know yahoo has that module available but not for the public
it used to be on their homepage...just wish they would make it public
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on August 28, 2006, 07:59:24 AM
And also insert your friend's emails.. saves going aohfdoisfklsjlkdjsklcvnsonklsmclksamldmnklfslknlknfklsniscool@hotmail.com
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: rctxtreme on September 11, 2006, 09:00:34 AM
It's been a long time... so anyone found a soloution yet?
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Jpg on September 19, 2006, 01:15:48 AM
Alan S just came out with a SMF mod. It's pretty cool and it doesn't need TP.
Title: Re: Hotmail/Live Mail List >>> SMF???
Post by: Xarcell on September 19, 2006, 05:52:50 AM
I may have to take a look at this.