10: 2009-02-22 (日) 14:52:23 fuga(fuga)[iE4afECtuME] | 11: 2010-03-16 (火) 17:36:46 nao-pon ログインブロックのテンプレート例を修正 |
||
---|---|---|---|
Line 46: | Line 46: | ||
※3 ユーザーが最初に入力するURL | ※3 ユーザーが最初に入力するURL | ||
** Tips [#y1521d0e] | ** Tips [#y1521d0e] | ||
- | - XOOPS Cube Legacy 2.1.4 - 2.1.5 で mixi 認証が動かない。 | + | *** XOOPS Cube Legacy 2.1.4 - 2.1.5 で mixi 認証が動かない。 [#ce4c8501] |
- | -- XCLの該当バージョンにバグがあり現状では動きません。いづれバグは修正されると思いますが、それまでの間に動かしたい人は、[[XUGJ-フォーラム: urlencode されていないクエリが含まれる時の問題:http://www.xugj.org/modules/d3forum/index.php?topic_id=754]] を参考に XCL のコアファイルを修正してみてください。 | + | - XCLの該当バージョンにバグがあり現状では動きません。いづれバグは修正されると思いますが、それまでの間に動かしたい人は、[[XUGJ-フォーラム: urlencode されていないクエリが含まれる時の問題:http://www.xugj.org/modules/d3forum/index.php?topic_id=754]] を参考に XCL のコアファイルを修正してみてください。 |
- | - ログインブロックにフォームを追加したい。 | + | *** ログインブロックにフォームを追加したい。 [#u1ebafa0] |
+ | - ログインブロックのテンプレートに以下(一例)を記述する | ||
#code(html,nonumber){{ | #code(html,nonumber){{ | ||
+ | <script type="text/javascript"> | ||
+ | <!-- | ||
+ | function openid_b_submit(identifier, msg) { | ||
+ | var f = document.getElementById('openid_b_id_form'); | ||
+ | if (msg) { | ||
+ | document.getElementById('openid_b_id_msg').innerHTML = msg; | ||
+ | document.getElementById('openid_b_identifier').value = identifier; | ||
+ | identifier = ''; | ||
+ | f.style.display = ''; | ||
+ | document.getElementById('openid_b_id').focus(); | ||
+ | } else { | ||
+ | if (!identifier) { | ||
+ | f.style.display = 'none'; | ||
+ | var id = document.getElementById('openid_b_id').value; | ||
+ | if (id) { | ||
+ | identifier = document.getElementById('openid_b_identifier').value; | ||
+ | identifier = identifier.replace('__ID__', id); | ||
+ | } else { | ||
+ | document.getElementById('openid_b_identifier').value = ''; | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | if (identifier) { | ||
+ | document.getElementById('openid_b_identifier').value = identifier; | ||
+ | document.getElementById('openid_b_submit').submit(); | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | //--> | ||
+ | </script> | ||
<style> | <style> | ||
input.openid_login { | input.openid_login { | ||
- | background: url(http://openid.net/login-bg.gif) no-repeat; | + | background: url(<{$xoops_url}>/modules/openid/images/login-bg.gif) no-repeat; |
- | background-color: #fff; | + | background-color: #fff; |
- | background-position: 0 50%; | + | background-position: 0 50%; |
- | color: #000; | + | color: #000; |
- | padding-left: 18px; | + | padding-left: 18px; |
- | width: 100px; | + | width: 100px; |
+ | } | ||
+ | div.openid_icons { | ||
+ | margin: 2px; | ||
+ | } | ||
+ | div.openid_icons img { | ||
+ | margin: 0; | ||
+ | cursor: pointer; | ||
} | } | ||
</style> | </style> | ||
- | <form method="GET" action="<{$xoops_url}>/modules/openid/try_auth.php"> | + | <form id="openid_b_submit" method="POST" action="<{$xoops_url}>/modules/openid/try_auth.php"> |
<input type="hidden" name="action" value="verify" /> | <input type="hidden" name="action" value="verify" /> | ||
- | <input class="openid_login" type="text" name="openid_identifier" class="openid_login" value="" /> | + | <input id="openid_b_identifier" class="openid_login" type="text" name="openid_identifier" class="openid_login" value="" /> |
<input type="hidden" name="frompage" value="<{$xoops_requesturi}>" /> | <input type="hidden" name="frompage" value="<{$xoops_requesturi}>" /> | ||
<br /> | <br /> | ||
- | <input type="submit" name="Submit" value="OpenIDログイン"> | + | <input type="submit" name="Submit" value="OpenIDログイン" /> |
- | <a href="<{$xoops_url}>/modules/openid/try_auth.php?openid_identifier=mixi.jp&frompage=<{ | + | </form> |
- | $xoops_requesturi|escape:"url"}>" title="mixiでログイン"><img src="<{$xoops_url}>/images/mixi_icon.gif" alt="mixiでログイン" /></a> | + | <div class="openid_icons"> |
- | <a href="<{$xoops_url}>/modules/openid/try_auth.php?openid_identifier=yahoo.co.jp&frompage=<{ | + | <img src="<{$xoops_url}>/modules/openid/images/icons/mixi.gif" title="mixiでログイン" onclick="openid_b_submit('mixi.jp/');" /> |
- | $xoops_requesturi|escape:"url"}>" title="Yahoo!でログイン"><img src="<{$xoops_url}>/images/yahoo_icon.gif" alt="Yahoo!でログイン" /></a> | + | <img src="<{$xoops_url}>/images/yahoo_icon.gif" title="Yahoo!でログイン" onclick="openid_b_submit('yahoo.co.jp');" /> |
+ | <img src="<{$xoops_url}>/modules/openid/images/icons/hatena.gif" title="はてなでログイン" onclick="openid_b_submit('http://www.hatena.ne.jp/__ID__/','はてなの ID を入力してください。');" /> | ||
+ | <img src="<{$xoops_url}>/modules/openid/images/icons/docomo.gif" title="docomo IDでログイン (iモードIDは取得していません)" onclick="openid_b_submit('i.mydocomo.com');" /> | ||
+ | <img src="<{$xoops_url}>/modules/openid/images/icons/google.gif" title="Googleでログイン" onclick="openid_b_submit('https://www.google.com/accounts/o8/id');" /> | ||
+ | <img src="<{$xoops_url}>/modules/openid/images/icons/livedoor.gif" title="Live Doorでログイン" onclick="openid_b_submit('livedoor.com');" /> | ||
+ | <img src="<{$xoops_url}>/modules/openid/images/icons/biglobe.gif" title="Biglobeでログイン" onclick="openid_b_submit('biglobe.ne.jp');" /> | ||
+ | </div> | ||
+ | <div id="openid_b_id_form" style="display:none;"> | ||
+ | <form action="<{$xoops_url}>/modules/openid/" method="POST" onsubmit="return openid_b_submit();"> | ||
+ | <div id="openid_b_id_msg"> </div> | ||
+ | <input type="text" size="10" id="openid_b_id" name="openid_b_id" value="" /> | ||
+ | <input type="submit" name="Submit" value="OK" /> | ||
</form> | </form> | ||
+ | </div> | ||
}} | }} | ||
-- 表示例 (ゲストアクセスで表示されます) | -- 表示例 (ゲストアクセスで表示されます) |
ぺージ情報 | |
---|---|
ぺージ名 : | keyword/OpenID モジュール |
ページ別名 : | 未設定 |
ページオーナー : | nao-pon |
閲覧可 | |
グループ : | すべての訪問者 |
ユーザー : | すべての訪問者 |
編集可 | |
グループ : | すべての訪問者 |
ユーザー : | すべての訪問者 |