首页版主名单列表修改.....修改为当没有版主时,就会自动显示诚聘版主...
1.打开./include/forum.func.php
查找从这个以下:
- function moddisplay($moderators, $type, $inherit = 0) {
- if($type == 'selectbox') {
复制代码
到
替换成以下语句:
- function moddisplay($mod, $moddisplay) {
- if($moddisplay == 'selectbox') {
- $modlist .= '<img src="images/common/online_moderator.gif" align="absmiddle"><select name="modlist" style="width: 85" onchange="if(this.options[this.selectedIndex].value != \'\') {';
- $modlist .= 'window.location=(\'viewpro.php?username=\'+this.options[this.selectedIndex].value) }">';
- if($mod != '') {
- $modlist .= '<option value="">版主列表</option>';
- } else {
- $modlist .= '<option value="">诚聘版主</option>';
- }
- if($mod) {
- foreach(explode("\t", $mod) as $moderator) {
- $moderator = trim($moderator);
- $modlist .= '<option value="'.rawurlencode($moderator).'">'.$moderator.'</option>';
- }
- }
- $modlist .= '</select>';
- return $modlist;
- } else {
- if($moddisplay == 'forumdisplay') {
- $modicon = '<img src="images/common/online_moderator.gif" align="absmiddle"> ';
- } else {
- $modicon = '';
- }
- if($mod) {
- $modlist = $comma = '';
- foreach(explode("\t", $mod) as $moderator) {
- $moderator = trim($moderator);
- $modlist .= $comma.$modicon.'<a href="viewpro.php?username='.rawurlencode($moderator).'">'.$moderator.'</a>';
- $comma = ', ';
- }
- } else {
- $modlist = '诚聘版主';
- }
- return $modlist;
- }
- }
- ?>
复制代码 |