通过最重的参数传递和调用,将调用./template/default/forum/topicadmin.htm文件,根据动作参数 <!--{elseif$_G['gp_optgroup'] == 2}--> 进入下面的执行代码,显示版块选择框:[mw_shl_code=php,true]<!--{elseif $_G['gp_optgroup'] == 2}--> <div class="tplw"> <!--{if $operation != 'type'}--> <input type="hidden" name="operations[]" value="move" /> <p class="mbn tahfx"> {lang admin_target}: <select name="moveto" id="moveto" class="ps vm" -no-onchange="ajaxget('forum.php?mod=ajax&action=getthreadtypes&fid=' + this.value, 'threadtypes');if(this.value) {$('moveext').style.display='';} else {$('moveext').style.display='none';}"> $forumselect </select> </p> <p class="mbn tahfx"> {lang admin_targettype}: <span id="threadtypes"><select name="threadtypeid" class="ps vm"><option value="0" /></option></select></span> </p> <ul class="llst" id="moveext" style="display:none;margin:5px 0;"> <li class="wide"><label><input type="radio" name="type" class="pr" value="normal" checked="checked" />{lang admin_move}</label></li> <li class="wide"><label><input type="radio" name="type" class="pr" value="redirect" />{lang admin_move_hold}</label></li> </ul> <!--{else}--> <!--{if $typeselect}--> <input type="hidden" name="operations[]" value="type" /> <p>{lang types}: $typeselect</p> <!--{else}--> {lang admin_type_msg}<!--{eval $hiddensubmit = true;}--> <!--{/if}--> <!--{/if}--> </div>[/mw_shl_code] 这里的$forumselect就是封装的论坛版块的选项,我们只要让这个变量包含隐藏的版块即可,找到topicadmin_moderate.php[mw_shl_code=php,true]} elseif($_G['gp_optgroup'] == 2 || $_G['gp_optgroup'] == 5) { require_once libfile('function/forumlist'); $forumselect = forumselect(FALSE, 0, $threadlist[$_G['tid']]['fid']); $typeselect = typeselect($single ? $threadlist[$_G['tid']]['typeid'] : 0);[/mw_shl_code] 这里对$forumselect做了封装,在function_forumlist.php找到forumselect函数:[mw_shl_code=php,true]foreach($forumcache as $forum) { if(!$forum['status'] && !$showhide) { continue; } if($selectedfid) { if(!is_array($selectedfid)) { $selected = $selectedfid == $forum['fid'] ? ' selected' : ''; } else { $selected = in_array($forum['fid'], $selectedfid) ? ' selected' : ''; } } if($forum['type'] == 'group') { if($arrayformat) { $forumlist[$forum['fid']]['name'] = $forum['name']; } else { $forumlist .= $groupselectable ? '<option value="'.($evalue ? 'gid_' : '').$forum['fid'].'" class="bold">--'.$forum['name'].'</option>' : '</optgroup><optgroup label="--'.$forum['name'].'">'; } $visible[$forum['fid']] = true; } elseif($forum['type'] == 'forum' && isset($visible[$forum['fup']]) && (!$forum['viewperm'] || ($forum['viewperm'] && forumperm($forum['viewperm'])) || strstr($forum['users'], "\t$_G[uid]\t")) && (!$special || (substr($forum['allowpostspecial'], -$special, 1)))) { if($arrayformat) { $forumlist[$forum['fup']]['sub'][$forum['fid']] = $forum['name']; } else { $forumlist .= '<option value="'.($evalue ? 'fid_' : '').$forum['fid'].'"'.$selected.'>'.$forum['name'].'</option>'; } $visible[$forum['fid']] = true; } elseif(!$arrayformat && $forum['type'] == 'sub' && isset($visible[$forum['fup']]) && (!$forum['viewperm'] || ($forum['viewperm'] && forumperm($forum['viewperm'])) || strstr($forum['users'], "\t$_G[uid]\t")) && (!$special || substr($forum['allowpostspecial'], -$special, 1))) { $forumlist .= '<option value="'.($evalue ? 'fid_' : '').$forum['fid'].'"'.$selected.'> '.$forum['name'].'</option>'; } }[/mw_shl_code] 这一部分详细的判断了根据如何条件对版块列表的变量进行的封装。 [mw_shl_code=php,true]if(!$forum['status'] && !$showhide){ continue; }[/mw_shl_code] 这里对隐藏的版块进行了进行了忽略操作,所以我们直接注释掉跳过的continue; 改为 [mw_shl_code=php,true]if(!$forum['status'] && !$showhide){ // continue; }[/mw_shl_code] 然后此段程序 [mw_shl_code=php,true]elseif(!$arrayformat && $forum['type'] == 'sub' && isset($visible[$forum['fup']]) && (!$forum['viewperm'] || ($forum['viewperm'] && forumperm($forum['viewperm'])) || strstr($forum['users'], "\t$_G[uid]\t")) && (!$special || substr($forum['allowpostspecial'], -$special, 1))) { $forumlist .= '<option value="'.($evalue ? 'fid_' : '').$forum['fid'].'"'.$selected.'> '.$forum['name'].'</option>'; }[/mw_shl_code] 将子版块类型的版块进行了显隐判断,如果是显隐状态为现实,则加入$forumlist列表封装,我们这里直接将此判断条件去除,即可:- [mw_shl_code=php,true]elseif(!$arrayformat && $forum['type'] == 'sub' && (!$forum['viewperm'] || ($forum['viewperm'] && forumperm($forum['viewperm'])) || strstr($forum['users'], "\t$_G[uid]\t")) && (!$special || substr($forum['allowpostspecial'], -$special, 1))) {[/mw_shl_code]
修改此两处,就可以显示出隐藏的版块 |
|