【插件资讯】 插件名称:主题描述 
适用版本:7.0 
语言编码:UTF-8 
插件作者:tcshek (参考 NSC 的「主题描述 For D4.1」作出改良) 
版权所属:tcshek | 小修改:香吉士 
原帖连结:
http://www.alan888.com/Discuz/...-1-4.html### 支持网站:
http://allen.ncc.to/viewthread.php?tid=93&extra=page%3D1 【插件说明】 数据升级: 一个 
修改档: ./post.php , ./include/newthread.inc.php , ./include/editpost.inc.php 
修改范本: forumdisplay.htm , search_threads.htm, post.htm , viewthread.node.htm 
修改语言包:message.lang.php 
插件功能简介: 在标题下加上主题描述。 
备注1:转贴请注明来源与作者。 
备注2:由于过程蛮复杂,可能会有地方贴错,请有问题者提出来讨论。 
备注3:因为我觉得他原来的不好看,所以小小修改 差不多跟数位男女一样了 
 
 范例: 
 修改开始
 修改开始 
MYSQL:后台资料库升级 
复制程式
ALTER TABLE `cdb_threads` ADD `description` CHAR( 80 ) DEFAULT NULL AFTER `subject` ;
  
第一步:打开./post.php 
搜索:
复制程式
$subject = isset($subject) ? dhtmlspecialchars(censor(trim($subject))) : '';
  下面加:
复制程式
$description = isset($description) ? dhtmlspecialchars(censor(trim($description))) :'';
  搜索:
复制程式
 $subject = !empty($subject) ? str_replace("\t", ' ', $subject) : $subject;  下面加:$description = stripslashes($description); 
第二步:打开./include/newthread.inc.php 
搜索:
复制程式
        if(!$sortid && !$special && $message == '') { 
                showmessage('post_sm_isnull'); 
        }  下面加:
复制程式
               if(strlen(htmlspecialchars($description)) > 60) { 
                                showmessage('post_description_toolong'); 
                 }   搜索: (搜寻第一个.第二个不要) 
下面这个部份 
db->query("INSERT INTO {$tablepre}threads (fid, readperm, price, iconid, typeid, sortid, author, authorid, subject, 复制程式
 替代:
复制程式
 authorid, subject, description,
  搜索: (搜寻第一个.第二个不要) 
下面这个部份 
VALUES ('$fid', '$readperm', '$price', '$iconid', '$typeid', '$sortid', '$author', '$discuz_uid', '$subject', 复制程式
 '$discuz_uid', '$subject',
  替代:
复制程式
 '$discuz_uid', '$subject', '$description',
  
文件-第三步:打开./include/editpost.inc.php 
搜索:
复制程式
if(!submitcheck('editsubmit')) {   下面加:
复制程式
     if($isfirstpost) { 
        $query = $db->query("SELECT description FROM {$tablepre}threads WHERE tid='$tid' AND fid='$fid'"); 
        $threadinfo = $db->fetch_array($query); 
    }  搜索:
复制程式
$postinfo['subject'] = str_replace('"', '"', $postinfo['subject']);   下面加:
复制程式
$threadinfo['description'] = str_replace('"', '"', $threadinfo['description']);   搜索:
复制程式
                         if(!$sortid && !$thread['special'] && $message == '') { 
                                showmessage('post_sm_isnull'); 
                        }  下面加:
复制程式
                                                 if(strlen(htmlspecialchars($description)) > 60) { 
                                                                 showmessage('post_description_toolong'); 
                                                }  搜索:
复制程式
 在这句之后加上:
复制程式
description='$description', 
  
模版-第一步:打开./templates/default/forumdisplay.htm 
搜索:
复制程式
                                                         <!--{if $thread['new']}--> 
                                                                <a href="redirect.php?tid=$thread[tid]&goto=newpost$highlight#newpost" class="new">New</a> 
                                                        <!--{/if}-->  在之后加上:
复制程式
$thread[multipage]<br><span style="color:#006600 "><FONT size=1><P align=right>$thread[description]</P></FONT></span> 
  **   size= 可以调 我是条1  图说: 上面的 color:#006600 这里设成绿色,你可以改成你想要的颜色、<P align=right>看你要靠哪一边? 我试设右边(因为跟数位男女一样)图说:
 上面的 color:#006600 这里设成绿色,你可以改成你想要的颜色、<P align=right>看你要靠哪一边? 我试设右边(因为跟数位男女一样)图说: 
 
模版-第二步:打开./templates/default/search_threads.htm 
搜索:
复制程式
 <!--{if $thread[multipage]}--><span class="threadpages">$thread[multipage]</span><!--{/if}-->  整段替换成:
复制程式
<!--{if $thread[multipage]}--><SPAN class=threadpages>$thread[multipage]<BR><SPAN style="COLOR: #C0C0C0">$thread[description]</SPAN></SPAN><!--{/if}-->   
模版-第三步:打开./templates/default/viewthread.node.htm 
搜索: 
复制程式
 在这句之后加上:
复制程式
 <br><FONT color=#009900>$thread[description]</FONT>
  图说: 
 
模版-第四步:打开./templates/default/post.htm 
搜索:
复制程式
<!--{if !empty($modelid) && $threadsorts[modelid][$tsortid] == $modelid || empty($modelid)}--> 
                                                                <option value="$tsortid"{if $sortid == $tsortid} selected="selected"{/if}>{echo strip_tags($name);}</option> 
                                                        <!--{/if}--> 
                                                <!--{/loop}--> 
                                                </select> 
                                        </div> 
                                        <!--{/if}-->   在下面加上:
复制程式
<div class="altbg1" width="20%" align=left>副标题(可免填):<input type="text" name="description" size="50" value=" $threadinfo[description] " tabindex="4"></div> 
  size="50" 依个人喜好调整  图说: 
 
语言包-第一步:打开./templates/default/messages.lang.php 
搜索:
复制程式
 'post_subject_toolong' => '对不起,您的标题超过 80 个字符,请返回修改标题长度。',
  在下面加上:
复制程式
 'post_description_toolong' => '对不起,您的主题描述超过 80 个字元,请返回修改描述长度。', 
  
更新缓存OK! 
反安装数据 
复制程式
 ALTER TABLE `cdb_threads` DROP `description` ;
  范例: 
