修改 ./include/tasks/gift.inc.php 搜索:
function task_condition() {
}
- function task_condition() {
- }
替换为:
function task_condition() {
global $discuz_uid, $db, $tablepre;
if(2 != $db->result_first("SELECT gender FROM {$tablepre}members WHERE uid='$discuz_uid'")) {
showmessage('对不起,此任务仅限女生申请!');
}
}
- function task_condition() {
- global $discuz_uid, $db, $tablepre;
- if(2 != $db->result_first("SELECT gender FROM {$tablepre}members WHERE uid='$discuz_uid'")) {
- showmessage('对不起,此任务仅限女生申请!');
- }
- }
如果将 2 改成 1 就是仅限男生申请了
来源:http://www.discuz.net/viewthread.php?tid=1237592