Welcome to Geeklog, Anonymous Wednesday, February 01 2023 @ 05:03 pm EST

Geeklog Forums

making a slicker login


Anonymous

Anonymous
For those space-conscious designers, I've found a way to put the phrase "username" into the form itself and then disappear once the user selects the form window. Likewise, you can put a few dots inthe password form and everyone knows what's going on. This way you can make a very slick box that doesn't take up so much space. To see what I mean, go to http://sloy.dns2go.com/ To do it, merely comment out this section of your lib-common.php at around line 1820: $retval .= COM_startBlock($LANG01[47]) . '<form action="' . $_CONF['site_url'] . '/users.php" method="post">' . LB . '<b>' . $LANG01[21] . ':</b><br>' . LB . '<input type="text" size="10" name="loginname" value=""><br>' . LB . '<b>' . $LANG01[57] . ':</b><br>' . LB . '<input type="password" size="10" name="passwd"><br>' . LB . '<input type="submit" value="' . $LANG01[58] . '">' . LB . '</form>' . $LANG01[59] . LB . COM_endBlock(COM_getBlockTemplate('user_block', 'footer')); } and change it to this code: $retval .= COM_startBlock($LANG01[47]) . '<p align="right"><form action="' . $_CONF['site_url'] . '/users.php" method="post">' . LB . '<input type="text" size="10" name="loginname" value="username" infocus="if(this.value==\'username\')this.value=\'\'" inblur="if(this.value==\'\')this.value=\'username\';">' . LB . '<input type="password" size="8" name="passwd" value="asdfasdf" infocus="if(this.value==\'asdfasdf\')this.value=\'\'" inblur="if(this.value==\'\')this.value=\'asdfasdf\';"><br>' . LB . "$LANG01[59] " . '<input type="submit" value="' . $LANG01[58] . '"></form></p>' . COM_endBlock(COM_getBlockTemplate('user_block', 'footer')); } As you might notice, it uses javascript. If you're willing to have that requirement on visitors I think this is very useful and would advocate its adoption into the geeklog codebase. I belive I've been a bit lazy here and not included the LANG call above for username, but that should work for non-english users.
 Quote

All times are EST. The time is now 05:03 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content