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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,018
  • Total Topics: 21,332
  • Online today: 3,024
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 2853
  • Total: 2853

A working gmail login block code!!!

Started by zooner, March 04, 2006, 02:15:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knat

Quote from: Shadow Queen on April 05, 2007, 02:03:09 AM
I dont know how to sing up my domain for this...

Invite sent to gabrielle_sin_1984. ;D

You can now create your own 2+ GB Gmail account - Enjoy

Shadow


vdubbia

Quote from: Tank on April 05, 2007, 10:08:38 AM
Quote from: Shadow Queen on April 05, 2007, 02:03:09 AM
I dont know how to sing up my domain for this...

Invite sent to gabrielle_sin_1984. ;D

You can now create your own 2+ GB Gmail account - Enjoy

fyi, you don't need to have an invite for Gmail anymore.

And if want to sign your domain up you can go to this link: http://www.google.com/a/help/intl/en/admins/editions.html

So back to my question... anyone have a block where I can login to my gmail hosted domain/email?

Zanyth

This is what I've got so far for the google domains hosted gmail, I realized after that it was using the post methods they had listed for actual applications, but I'm sure it can be worked out to actually log them into their account, couldn't it?

It returns SID, LSID, and Auth values, and from what I understand of the page, should somehow be able to use that Auth key to login to their account properly, (maybe it would need a redirect-page to handle that?)

Any ideas/help from more experienced developers? I'm pretty much at my limit without more documentation

Google API page is here: http://code.google.com/apis/accounts/AuthForInstalledApps.html

<center>
<script type="text/javascript">
<!--

function gaia_setFocus() {
  var f = null;
  if (document.getElementById) {
    f = document.getElementById("gaia_loginform");
  } else if (window.gaia_loginform) {
    f = window.gaia_loginform;
  }
  if (f) {
    if (f.Email.value == null || f.Email.value == "") {
      f.Email.focus();
    } else {
      f.Passwd.focus();
    }
  }
}

// -->
</script>
<script type="text/javascript">
<!--

if (is_browser_supported) {
  var form = el("gaia_loginform");
  var url = form["continue"].value;
  url = StripParam(url, "ui=html");
  url = StripParam(url, "zy=l");
  form["continue"].value = url;
}
// -->
</script>

<div style= id="gaia_loginbox" class="body">
<form action="https://www.google.com/accounts/ClientLogin" id="gaia_loginform" method="post" target="new">
<input type="hidden" name="accountType" value="HOSTED"">
<input type="hidden" name="service" value="mail">
<input type="hidden" name="source" value="yoursite-maillogin-1">

<table cellpadding="1" cellspacing="0" border="0" id="gaia_table"><tr>
<td class="alt1" style="font-family: arial,sans-serif">
<font color="#aa1002" style="font-family: arial,sans-serif"> <div class="errorbox-good">  </div> </font> </td> </tr> <tr>
<td class="alt1" nowrap style="font-family: arial,sans-serif" align="center">
<font size="-1" face="Arial, sans-serif" style="font-family: arial,sans-serif">Username</font></td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div align="left" style="font-family: arial,sans-serif"> <input type="text" name="Email" value="@yoursite.com" size="18"></div> </td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<font size="-1">Password</font></td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div class="alt1" align="left" style="font-family: arial,sans-serif"> <input type="password" name="Passwd" autocomplete="off" size="18"></div> </td>
</tr><tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div class="alt1" style="font-family: arial,sans-serif"> <input type="submit" name="null" value="Sign in"> </div> </td> </tr> </table>  </form> </div>
</div>
</center>

vdubbia

thanks for keeping on this, it looks like you've made decent progress.

pinnatus

I'm really eager to have a Gmail for your Domain version of this, too bad I can't code. :(

Lord Anubis

I have tried, it only goes directly to the service login and says that you need to fill in a username and password

Here's what I have got so far
(I also changed the image to this , I think it looks cleaner)

<center>
<a href="https://www.google.com/a/nextsite.org/ServiceLogin?service=mail&passive=true&nui=1&continue=http%3A%2F%2Fmail.google.com%2Fa%2Fnextsite.org&hl=en">
<img src="http://nextsite.org/gmail.gif"></a>

<script type="text/javascript">
<!--

function gaia_setFocus() {
  var f = null;
  if (document.getElementById) {
    f = document.getElementById("gaia_loginform");
  } else if (window.gaia_loginform) {
    f = window.gaia_loginform;
  }
  if (f) {
    if (f.Email.value == null || f.Email.value == "") {
      f.Email.focus();
    } else {
      f.Passwd.focus();
    }
  }
}

// -->
</script>
<script type="text/javascript">
<!--

if (is_browser_supported) {
  var form = el("gaia_loginform");
  var url = form["continue"].value;
  url = StripParam(url, "ui=html");
  url = StripParam(url, "zy=l");
  form["continue"].value = url;
}
// -->
</script>

<div style= id="gaia_loginbox" class="body">
<form action="https://www.google.com/a/nextsite.org/ServiceLogin" id="gaia_loginform" method="post" target="new">       
<input type="hidden" name="continue" value="http://mail.google.com/a/nextsite.org/?ui=html&zy=l
">
<input type="hidden" name="service" value="mail">

<table cellpadding="1" cellspacing="0" border="0" id="gaia_table"><tr>
<td class="alt1" style="font-family: arial,sans-serif">
<font color="#aa1002" style="font-family: arial,sans-serif"> <div class="errorbox-good">  </div> </font> </td> </tr> <tr>
<td class="alt1" nowrap style="font-family: arial,sans-serif" align="center">
<font size="-1" face="Arial, sans-serif" style="font-family: arial,sans-serif">Username</font></td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div align="left" style="font-family: arial,sans-serif"> <input type="text" name="Email" value="" size="18"></div> </td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<font size="-1">Password</font></td>
</tr> <tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div class="alt1" align="left" style="font-family: arial,sans-serif"> <input type="password" name="Passwd" autocomplete="off" size="18"></div> </td>
</tr><tr>
<td class="alt1" style="font-family: arial,sans-serif" align="center">
<div class="alt1" style="font-family: arial,sans-serif"> <input type="submit" name="null" value="Sign in"> </div> </td> </tr> </table>  </form> </div>
</div>
</center>


Now just need to get it to input the correct values  :tickedoff:

pinnatus

HEY!  I changed the URLs for your domain to mine and it works perfectly!  I also removed the icon since you're hosting it, but that's all I did.  8)

Perhaps others should try, it seems we have a working 'Gmail For Your Domain' block code snippit!

Zanyth

I think perhaps you were already logged in when you tried?
For me I get the username/password screen and it says "Required field must not be blank" below each field

pinnatus

Yeah, you're right, it's funny, even if I click Logout (in Firefox) it just reloads the page and logs me in.  But yeah, it's definitely a good start. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.