Discuz! 修正分类信息发布后不可以编辑的BUG
Discuz! 升级了那么多版本为何一直没修正这个BUG ???这几天在调整不合理的分类信息,但发现以前发的帖子再重新编辑时,分类信息没展示在编辑页面:
上图为无法展示分类信息(这里只显示分类信息编辑区,没显示分类信息分页)
这样我们就无法编辑或修正错误的分类信息,那么我们就应该修改下面的代码:
打开路径为“\template\default\forum\post.htm”的文件到173行或搜索代码:
<!--{elseif $_GET == 'edit' && $isfirstpost && !$thread['sortid']}-->
源码为:
<!--{elseif $_GET == 'edit' && $isfirstpost && !$thread['sortid']}-->
<ul class="tb cl mbw">
<li{if !$sortid} class="a"{/if}><a href="javascript:;">$actiontitle</a></li>
<!--{if $_GET == 'edit' && $isfirstpost && !$thread['sortid']}-->
<!--{loop $_G['forum']['threadsorts'] $tsortid $name}-->
<li{if $sortid == $tsortid} class="a"{/if}><a href="javascript:;"><!--{echo strip_tags($name);}--></a></li>
<!--{/loop}-->
<!--{/if}-->
</ul>
<!--{/if}-->
我们把上图所示的红框里代码删除(这里说明下不知道源码里为何有两个同样的条件判断,感觉没多大意义)
修改为:
<!--{elseif $_GET == 'edit' && $isfirstpost }-->
<ul class="tb cl mbw">
<li{if !$sortid} class="a"{/if}><a href="javascript:;">$actiontitle</a></li>
<!--{if $_GET == 'edit' && $isfirstpost }-->
<!--{loop $_G['forum']['threadsorts'] $tsortid $name}-->
<li{if $sortid == $tsortid} class="a"{/if}><a href="javascript:;"><!--{echo strip_tags($name);}--></a></li>
<!--{/loop}-->
<!--{/if}-->
</ul>
<!--{/if}-->
修改好后保存并上传,接着更新缓存刷新页面就可以显示了:
页:
[1]