http://phpbb-tw.net/phpbb/viewtopic.php?t=9797
--------------------------------------------------------------------------------
功能...可以從會員資料跳到各會員權限那邊
參考範例..Link to User Admin in View Profile (會員管理連結)
代碼: 選擇全部
打開usercp_viewprofile.php
搜尋
代碼:
// User Administration Link on Profile
if($userdata['user_level'] == ADMIN)
{
$template->assign_block_vars("switch_user_admin", array());
$template->assign_vars(array(
"L_USER_ADMIN" => $lang['User_admin'],
"U_ADMIN_PROFILE" => append_sid("admin/admin_users.$phpEx?mode=edit&u=" . $profiledata['user_id'])
));
}
下面加入
代碼:
// The member jurisdiction management links
if( $userdata['user_level'] == ADMIN )
{
$template->assign_block_vars("switch_user_auth", array());
$template->assign_vars(array(
'L_USER_AUTH' => $lang['User_auth'],
'U_AUTH' => append_sid("admin/admin_ug_auth.$phpEx?mode=user&u=" . $profiledata['user_id']))
);
}
存檔ok
====
打開profile_view_body.tpl
搜尋
代碼:
<!-- BEGIN switch_user_admin -->
<tr>
<td colspan="2" align="center"><span class="gen"> <a href="{U_ADMIN_PROFILE}" target="_admin">{L_USER_ADMIN}</a></span></td>
</tr>
<!-- END switch_user_admin -->
下方加入
代碼:
<!-- BEGIN switch_user_auth -->
<tr>
<td colspan="2" align="center"><span class="gen"> <a href="{U_AUTH}" target="_autn">{L_USER_AUTH}</a></span></td>
</tr>
<!-- END switch_user_auth -->
存檔
在來打開lang_main.php
這段
代碼:
$lang['User_auth'] = "會員權限控制"; // The member jurisdiction management links
放在你順眼的地方
majimmy
我是 加在同一行
代碼:
<span class="gen">
(<a target="_admin" href="{U_ADMIN_PROFILE}" class="gen">{L_USER_ADMIN}</a>)
(<a href="{U_AUTH}" target="_autn" class="gen">{L_USER_AUTH}</a>)
</span>