[1001]XOOPS網站門面專業設計
一、 引入樣板
- 為了避免theme.html過於複雜,建議把一些區域的樣板作成獨立的html檔,然後引入到theme.html中使用即可。
- 引入的語法:<{includeq file="$theme_name/login.html"}>
- 用來判斷是否為以註冊會員,若是秀出使用者選單,若不是秀出登入畫面:
<{if $xoops_isuser}>使用者選單語法<{else}>登入語法<{/if}>
亦即
<{if $xoops_isuser}>
<{includeq file="$theme_name/user_menu.html"}>
<{else}>
<{includeq file="$theme_name/login.html"}>
<{/if}>
- form的action要改為<{xoAppUrl user.php}>
- xoops_redirect登入後轉向則改成<{$xoops_requesturi}>即可。
- 立即註冊路徑:<{xoAppUrl register.php}>
- 密碼遺失路徑:<{xoAppUrl user.php#lost}>
- <a href="<{$xoops_url}>/user.php" >查看帳號</a>
- <a href="<{$xoops_url}>/edituser.php">編輯帳號</a>
- <a href="<{$xoops_url}>/notifications.php">通知</a>
- <a href="<{$xoops_url}>/user.php?op=logout">登出</a>
<{if $xoops_isadmin}>
<a href="<{xoAppUrl admin.php}>">管理介面</a>
<{/if}>
<{xoInboxCount assign=pmcount}>
<{if $pmcount}>
<a href="<{xoAppUrl viewpmsg.php}>">您有 <{$pmcount}> 封信</a>
<{else}>
<a href="<{xoAppUrl viewpmsg.php}>">收件箱</a>
<{/if}>
<div align="right" style="width:90px;height:90px;background-image:url(<{$xoops_url}>/uploads/<{$xoops_avatar}>)"></div>