刚刚更新了一下安装sql,应该好了。
下载见主题贴。
应 GoSuRF 的要求下面的diff是修改的 login.htm 页面的模板(就增加了一个切换输入框的radio box和一个用来输入 OpenID URL 的 text box)。- --- /home/sutra/Desktop/t/upload/templates/default/login.htm 2007-09-07 17:06:40.000000000 +0800
- +++ /home/sutra/workspace/openid4discuz/templates/default/login.htm 2007-11-18 05:22:56.000000000 +0800
- @@ -1,5 +1,23 @@
- {template header}
- <div id="nav"><a href="$indexname">$bbname</a> » {lang member_login}</div>
- +
- +<script type="text/javascript">
- +function setOpenIdLogin(isOpenIdLogin) {
- + document.getElementById("username").style.display = (isOpenIdLogin ? "none" : "inline");
- + document.getElementById("openid_url").style.display = (isOpenIdLogin ? "inline" : "none");
- + document.getElementById("password").disabled = isOpenIdLogin;
- + document.getElementById("password").style.backgroundColor = isOpenIdLogin ? '#eee' : '';
- + document.getElementById("questionid").disabled = isOpenIdLogin;
- + document.getElementById("answer").disabled = isOpenIdLogin;
- + document.getElementById("answer").style.backgroundColor = isOpenIdLogin ? '#eee' : '';
- +
- + if (isOpenIdLogin) {
- + document.getElementById("openid_url").focus();
- + } else {
- + document.getElementById("username").focus();
- + }
- +}
- +</script>
-
- <form method="post" name="login" action="logging.php?action=login&">
- <input type="hidden" name="formhash" value="{FORMHASH}" />
- @@ -22,11 +40,14 @@
- <!--{/if}-->
- <tr>
- <th onclick="document.login.username.focus();">
- - <label><input class="radio" type="radio" name="loginfield" value="username" tabindex="2" checked="checked" />{lang username}</label>
- - <label><input class="radio" type="radio" name="loginfield" value="uid" tabindex="3" />{lang uid}</label>
- + <label><input class="radio" type="radio" name="loginfield" value="username" tabindex="2" checked="checked" onchange="setOpenIdLogin(false)" />{lang username}</label>
- + <label><input class="radio" type="radio" name="loginfield" value="uid" tabindex="3" onchange="setOpenIdLogin(false)" />{lang uid}</label>
- + <label><input class="radio" type="radio" name="loginfield" value="openid" tabindex="3" onchange="setOpenIdLogin(true)" id="loginfield_openid" />OpenID</label>
- </th>
- <td>
- - <input type="text" id="username" name="username" size="25" maxlength="40" tabindex="4" />
- + <input type="text" id="username" name="username" size="25" maxlength="40" tabindex="4" />
- + <input type="text" id="openid_url" name="openid_url" size="25" tabindex="4"
- + style="display:none; background: url(http://www.openid.net/login-bg.gif) no-repeat; background-position: 0 50%; padding-left: 18px;" />
- <a href="$regname">{lang register_now}</a>
- </td>
- </tr>
- @@ -93,8 +114,13 @@
- </div>
- </form>
-
- -<script type="text/javascript">
- -document.login.username.focus();
- +<script type="text/javascript">
- +setOpenIdLogin(document.getElementById("loginfield_openid").checked);
- +if (document.getElementById("loginfield_openid").checked) {
- + document.login.openid_url.focus();
- +} else {
- + document.login.username.focus();
- +}
-
- var mydate = new Date();
- var mytimestamp = parseInt(mydate.valueOf() / 1000);
复制代码
[ 本帖最后由 sutrazhou 于 2007-11-25 16:03 编辑 ] |