插件功能:
给社区增加一个测试用户,使之不能修改密码!
插件演示:
bbs.dpwin.net 用户名:test 密码:test
插件安装:
1.修改./templates/default/memcp_profile.htm
1-1 找到
- <td class="altbg2"><input type="password" name="newpassword" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span></td>
复制代码
替换成
- <td class="altbg2"><!--{if $discuz_user != 'test'}--><input type="password" name="newpassword" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span><!--{else}-->{lang memcp_profile_test}<!--{/if}--></td>
复制代码
1-2 找到
- <td class="altbg2"><input type="password" name="newpassword2" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span></td>
复制代码
替换成
- <td class="altbg2"><!--{if $discuz_user != 'test'}--><input type="password" name="newpassword2" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span><!--{else}-->{lang memcp_profile_test}<!--{/if}--></td>
复制代码
2.修改./templates/default/templates.lang.php
找到
- 'memcp_profile_passwd_comment' => '如不需要更改密码,此处请留空',
复制代码
上面加
- 'memcp_profile_test' => '测试用户无法使用该功能',
复制代码
3.修改 ./memcp.php
找到
- if($newpassword || $secquesnew != $discuz_secques) {
复制代码
下面加
- if($discuz_user == 'test')showmessage('profile_test_wrong', NULL, 'HALTED');
复制代码
4.修改 ./templates/default/messages.lang.php
找到
- 'profile_passwd_wrong' => '原密码不正确,您不能修改密码或安全提问,请返回。',
复制代码
上面加
- 'profile_test_wrong' => '测试用户无法使用该功能,请返回。',
复制代码
5.后台增加新会员 会员名:test 密码:test 赋予相应的测试权限!
6.更新缓存ok!
补丁更新:请安装3~4步插件代码
[ 本帖最后由 泡哥 于 2006-4-6 19:16 编辑 ] |