radamczyk


Hi is it possible to set backgroud picture, button layout or do something more with the iframe your provide (the one to sign in and out), to fit it into current web site layout. Because current css settings are not enought. Maybe there is a way not to use iframe and perhaps just link on the website like .NET passport login - links (like on this forum) they are realy nice,
and recognizable. Is it possible to utilise that kind of link with live id

I would appreciate any response.

Regards to all,
Radek




Re: More webdesign fitable iframe

Sir Darquan


Dude, i've discovered that the iframe isn't totally necessary, depending on how your site is designed. On any Live authenticated site, there are 2 types of pages: 1) pages that can be viewed regardless of authentication status, and 2) pages that can only be viewed once a user has been authenticated. On the pages where it doesn't matter if the user is logged in or not, You'll need to use the iframe so they can login properly and it'll show the approprate text automatically. The other pages only need the Sign-out option because the user shouldn't be able to view the page unless they're logged in. So just get the url used to sign out of your page and make a regular html link. And a regular <a> tag can be formatted anyway you need.

Hope that helps.






Re: More webdesign fitable iframe

Josh Brown - MSFT

You can also explore the source code for the sample applications which shows how to obtain the proper URL for sign-in/sign-out. Happy coding!!





Re: More webdesign fitable iframe

Alex Media

The released SDK has a function built-in for getting the sign-in/sign-out link. I don't know what language you're programming in, but just look through the class and you'll see. I think it's called RawURL (not sure though).





Re: More webdesign fitable iframe

?JD?

This is a file I just made from the PHP sample "index.php", that does not use an iframe but a direct link...

Code Snippet

< php
error_reporting(E_ALL);
ini_set('display_errors', '1');

include 'settings.php';

include '../lib/windowslivelogin.php';

$wll = WindowsLiveLogin::initFromXml($KEYFILE);
$wll->setDebug($DEBUG);
$APPID = $wll->getAppId();
$userid = null;

$token = @$_COOKIE[$COOKIE];
if ($token) {
$user = $wll->processToken($token);
if ($user) {
$userid = $user->getId();
}
}

$WLLSignInImg = 'http://www.passportimages.com/1033/signin.gif';

$WLLSignInURL = $wll->getLoginUrl("contextItem");
$message_html = <<<END
<a href="$WLLSignInURL" oncontextmenu='return false;'>
<img src="$WLLSignInImg" border="0" alt="Sign in to Windows Live ID"/>
</A>

<p>You are not signed in</p>
END;

if ($userid) {

$WLLSignOutImg = 'http://www.passportimages.com/1033/signout.gif';
$WLLSignOutURL = $wll->getLogoutUrl();
$message_html = <<<END
<a href="$WLLSignOutURL" oncontextmenu='return false;'>
<img src="$WLLSignOutImg" border="0" alt="Sign out of Windows Live ID"/>
</A>

<p>You are signed in - Your unique identifier is: $userid</p>
END;
}

>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<title>Windows Live ID&trade; - Testing in progress</title>
< = $BODYSTYLE >
</head>
<body><table width="320"><tr><td>
<br>
< = $message_html >
</td></tr></table></body>
</html>

It does exactly as you asked but its not really complete yet... Give it a try anyhow Smile