|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
默认discuzX门户支持三级栏目的,但是如果添加四级需要修改程序才可以,具体是
修改source/admincp/admincp_portalcategory.php的751-767行代码,把以下代码:
- if($level == 2) {
- $class = $last ? 'lastchildboard' : 'childboard';
- $return = '<tr class="hover" id="cat'.$value['catid'].'"><td> </td><td class="td25"><input type="text" class="txt" name="neworder['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="'.$class.'">'.
- '<input type="text" class="txt" name="name['.$value['catid'].']" value="'.$value['catname'].'" />'.
- '</div>'.
- '</td><td>'.$value['articles'].'</td>'.
- '<td>'.(empty($value['disallowpublish']) ? cplang('yes') : cplang('no')).'</td>'.
- '<td>'.(!empty($value['allowcomment']) ? cplang('yes') : cplang('no')).'</td>'.
- '<td>'.(empty($value['closed']) ? cplang('yes') : cplang('no')).'</td>'.
- '<td><input class="radio" type="radio" name="newsetindex" value="'.$value['catid'].'" '.($value['caturl'] == $_G['setting']['defaultindex'] ? 'checked="checked"':'').' /></td>'.
- '<td><a href="'.$value['caturl'].'" target="_blank">'.cplang('view').'</a>
- <a href="'.ADMINSCRIPT.'?action=portalcategory&operation=edit&catid='.$value['catid'].'">'.cplang('edit').'</a>
- <a href="'.ADMINSCRIPT.'?action=portalcategory&operation=move&catid='.$value['catid'].'">'.cplang('portalcategory_move').'</a>
- <a href="'.ADMINSCRIPT.'?action=portalcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a>
- <a href="'.ADMINSCRIPT.'?action=diytemplate&operation=perm&targettplname=portal/list_'.$value['catid'].'&tpldirectory='.getdiydirectory($value['primaltplname']).'">'.cplang('portalcategory_blockperm').'</a></td>
- <td><a href="'.ADMINSCRIPT.'?action=article&operation=list&&catid='.$value['catid'].'">'.cplang('portalcategory_articlemanagement').'</a>
- <a href="'.ADMINSCRIPT.'?action=portalcategory&operation=perm&catid='.$value['catid'].'">'.cplang('portalcategory_articleperm').'</a>'.$publish.'</td></tr>';
改为:
if ($level == 3) {
$class = $last ? 'lastthirdboard' : 'thirdboard';
$return = '<tr class="hover" id="cat'.$value['catid'].'"><td> </td><td class="td25"><input type="text" class="txt" name="neworder['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="'.$class.'">'.
'<input type="text" class="txt" name="name['.$value['catid'].']" value="'.$value['catname'].'" />'.
'</div>'.
'</td><td>'.$value['articles'].'</td>'.
'<td>'.(empty($value['disallowpublish']) ? cplang('yes') : cplang('no')).'</td>'.
'<td>'.(!empty($value['allowcomment']) ? cplang('yes') : cplang('no')).'</td>'.
'<td>'.(empty($value['closed']) ? cplang('yes') : cplang('no')).'</td>'.
'<td><input class="radio" type="radio" name="newsetindex" value="'.$value['catid'].'" '.($value['caturl'] == $_G['setting']['defaultindex'] ? 'checked="checked"':'').' /></td>'.
'<td><a href="'.$value['caturl'].'" target="_blank">'.cplang('view').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=edit&catid='.$value['catid'].'">'.cplang('edit').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=move&catid='.$value['catid'].'">'.cplang('portalcategory_move').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a>
<a href="'.ADMINSCRIPT.'?action=diytemplate&operation=perm&targettplname=portal/list_'.$value['catid'].'&tpldirectory='.getdiydirectory($value['primaltplname']).'">'.cplang('portalcategory_blockperm').'</a></td>
<td><a href="'.ADMINSCRIPT.'?action=article&operation=list&&catid='.$value['catid'].'">'.cplang('portalcategory_articlemanagement').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=perm&catid='.$value['catid'].'">'.cplang('portalcategory_articleperm').'</a>'.$publish.'</td></tr>';
}elseif($level == 2) {
$class = $last ? 'lastchildboard' : 'childboard';
$return = '<tr class="hover" id="cat'.$value['catid'].'"><td> </td><td class="td25"><input type="text" class="txt" name="neworder['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="'.$class.'">'.
'<input type="text" class="txt" name="name['.$value['catid'].']" value="'.$value['catname'].'" />'.
'<a class="addchildboard" href="'.ADMINSCRIPT.'?action=portalcategory&operation=add&upid='.$value['catid'].'">'.cplang('portalcategory_addfourthcategory').'</a></div>'.
'</td><td>'.$value['articles'].'</td>'.
'<td>'.(empty($value['disallowpublish']) ? cplang('yes') : cplang('no')).'</td>'.
'<td>'.(!empty($value['allowcomment']) ? cplang('yes') : cplang('no')).'</td>'.
'<td>'.(empty($value['closed']) ? cplang('yes') : cplang('no')).'</td>'.
'<td><input class="radio" type="radio" name="newsetindex" value="'.$value['catid'].'" '.($value['caturl'] == $_G['setting']['defaultindex'] ? 'checked="checked"':'').' /></td>'.
'<td><a href="'.$value['caturl'].'" target="_blank">'.cplang('view').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=edit&catid='.$value['catid'].'">'.cplang('edit').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=move&catid='.$value['catid'].'">'.cplang('portalcategory_move').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a>
<a href="'.ADMINSCRIPT.'?action=diytemplate&operation=perm&targettplname=portal/list_'.$value['catid'].'&tpldirectory='.getdiydirectory($value['primaltplname']).'">'.cplang('portalcategory_blockperm').'</a></td>
<td><a href="'.ADMINSCRIPT.'?action=article&operation=list&&catid='.$value['catid'].'">'.cplang('portalcategory_articlemanagement').'</a>
<a href="'.ADMINSCRIPT.'?action=portalcategory&operation=perm&catid='.$value['catid'].'">'.cplang('portalcategory_articleperm').'</a>'.$publish.'</td></tr>';
for($i=0,$L=count($value['children']); $i<$L; $i++) {
$return .= showcategoryrow($value['children'][$i], 3, $i==$L-1);
}然后再在\static\image\admincp\admincp.css的317行后添加
- .thirdboard{ padding-left:165px; background:url(bg_repno.gif) no-repeat -130px -550px; }
- .lastthirdboard{ padding-left:165px; background:url(bg_repno.gif) no-repeat -130px -600px; }
在\source\language\lang_admincp.php的6590下添加
- 'portalcategory_addfourthcategory' => '添加四级频道栏目',
|
|