插件开发:园园
插件整理:vaiovr
技术支持:http://php.mmcatv.cn
=====================================================
打开templates/default/header.htm模板
查找:
- <!--{if $memliststatus}-->
- | <a href="member.php?action=list">{lang memberlist}</a>
- <!--{/if}-->
复制代码
在前面添加:
- <!--{if $allowinvisible}-->
- | <a href="memcp.php?action=invisible">
- <!--{if $invisible}--><font color=red><B>上线</b></font><!--{else}-->隐身<!--{/if}--></a>
- <!--{/if}-->
复制代码
然后打开memcp.php
(注意看是最下面的)查找:
- } elseif($action == 'buddylist') {
- if(empty($delete)) {
- $query = $db->query("SELECT uid FROM $table_members WHERE ".(isset($buddyid) ? "uid='$buddyid'" : "username='$buddy'"));
- $buddyid = $db->result($query, 0);
- if(!$buddyid) {
- showmessage('buddy_add_nonexistence');
- }
- $query = $db->query("SELECT buddyid FROM $table_buddys WHERE uid='$discuz_uid' AND buddyid='$buddyid' LIMIT 1");
- if($db->result($query, 0)) {
- showmessage('buddy_add_invalid');
- }
- $db->query("INSERT INTO $table_buddys VALUES ('$discuz_uid', '$buddyid')");
- showmessage('buddy_update_succeed', 'memcp.php');
- } else {
- $db->query("DELETE FROM $table_buddys WHERE uid='$discuz_uid' AND buddyid='$delete'");
- showmessage('buddy_update_succeed', 'memcp.php');
- }
- }
复制代码
在下面加入:
- elseif($action == 'invisible') {
- if(!$allowinvisible) {
- showmessage('group_nopermission', NULL, 'NOPERM');
- }
- $invisibletype = $invisible == 1 ? 0 : 1;
- $db->query("UPDATE $table_members SET invisible='$invisibletype' WHERE uid='$discuz_uid'");
- showmessage('invisible_succeed', dreferer());
- }
复制代码
打开语言包messages.lang
查找:
- 'profile_succeed' => '您已经成功保存个人资料,现在将转入控制面板首页。',
复制代码
在下面加入:
- 'invisible_succeed' => '切换更改成功,自动跳转到默认页。',
复制代码
-------完成------ |