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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 09:34:47 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 88
  • Total: 88

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.

zooner

I spent over 12 hours working on this, finally getting a bunch of different sources to get something work!

this is:
Quotejust a basic login form for gmail, make it a script block!

<div id=login style="font-family: arial,sans-serif">
             <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> <div style= id="gaia_loginbox" class="body"> <form action="https://www.google.com/accounts/ServiceLoginAuth" id="gaia_loginform" method="post">       <input type="hidden" name="continue" value="http://gmail.google.com/gmail?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>

<script>
<!--
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>


ontap

#1
12 hours?.. wow thats a long time   :P

kinda fixed it up a bit for you....


<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/ServiceLoginAuth" id="gaia_loginform" method="post" target="new">       
<input type="hidden" name="continue" value="http://gmail.google.com/gmail?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>

crip



Gargoyle

So what does this do ? I understand it's a gmail login but does it list your recent g-mails as well or something like that ??

Also do you ad this to a html block or a php block or something else ?

This looks like it could be a really neat script.. ;D

crip

I'm not sure what it does, or where and how to add it..kind of looks like an alterrate login/register script, you know the cursor ready dea, like on Googel/Yahool..but it do look interesting.

ontap

#6
just a basic login form for gmail, make it a script block!




RoarinRow

Very cool, thanks for all your hard work.  Works like a charm!

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

zooner

Quote from: OnTap! on March 04, 2006, 03:41:29 PM

just a basic login form for gmail, make it a script block!


sorry for the lack of clarification!

I wanted to head off to bed, but wanted to share it with the tinyportal community asap.

Now I need to change it so that it's using the enhanced interface instead of standard html.

Porky

What would be cool if it can be done is to make it an all access to all email accounts by order of a dropdown box... Ie put in your name and pass then select from a drop down and select your email(yahoo, gmail, hotmail, etc)