Created
December 6, 2012 15:29
-
-
Save nouphet/4225341 to your computer and use it in GitHub Desktop.
テーマでアバターとログインIDを表示する ref: http://qiita.com/items/4a8280ebdc26b64ed6f6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.management_bar { | |
position: relative; | |
margin: 1px auto; | |
max-width: 1024px; | |
width: 100%; | |
background: #000; | |
padding: 1px 0 4px; | |
color: #ff0000; | |
text-align: right; | |
} | |
.management_bar a { | |
color: #ff0000; | |
text-decoration: none; | |
} | |
.management_bar a:hover { | |
color: #ffb900; | |
} | |
.management_bar img { | |
width: 1.2em; | |
height: 1.2em; | |
margin-top: 2px; | |
vertical-align: text-bottom; | |
} | |
#headerLogOut { | |
margin-left: 0.5em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="management_bar"> # classを割当て | |
<{if $xoops_isuser === true}> # ログインユーザか判定 | |
<span id="headerName"> | |
<a href="<{$xoops_url}>/user.php"> # プロフィールへのリンク | |
<img src="<{$xoops_userid|xoops_user_avatarize}>" /> # アバターを表示 | |
<{user_uname2name uname=$xoops_uname}> # 本名があれば本名を表示、なければアカウント名を表示 | |
</a> | |
</span> | |
<span id="headerLogOut"> | |
<a href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._LOGOUT}></a> | |
# ログアウトリンク | |
</span> | |
<{else}> # ログインユーザでない場合 | |
<a href="<{$xoops_url}>/user.php"><{$smarty.const._LOGIN}></a> # ログインリンク | |
<{/if}> | |
<{if $xoops_isadmin}> # 管理者か判定 | |
<a href="<{$xoops_url}>/admin.php">ADMIN</a> # 管理画面へのリンク | |
<{/if}> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment