TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 739
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 292
  • Total: 293
  • @rjen

Hotmail/Live Mail List >>> SMF???

Started by rctxtreme, August 23, 2006, 09:18:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rctxtreme

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?

IchBin

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.

Jpg

Sweet... I'm gonna add this.
Nice find dude. ;)

Can this also be added to an article page?

IchBin

Block code snippets when your done Jpg! :)

Jpg

#4
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..

Jpg

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!

alan s

i think i can get this working in maybe 15 min?

alan s

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

Jpg

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>

rctxtreme

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!

This website is proudly hosted on Crocweb Cloud Website Hosting.