Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

主题分类插件FOR Discuz系列正式版-索引专题分类板内分类话题分类19/1

[复制链接]
aday 发表于 2005-1-18 20:59:59 | 显示全部楼层 |阅读模式
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::插件名称: 专题分类插件 Subject classification FOR Discuz系列
::版本 : For Discuz2.5FREE [For Discuz3.0/4.0开发目前还与大C商量中 现只提供付费帮安装]
::原创作者 :爱爱医技术部(aday) 转载和重写使用代码必须保留
::KEYWORDS:主题分类-板内分类-话题分类-专题分类-Subject classification
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


功能描述:
0: 先看演示:
http://iiyi.bbs.asiaec.com/bbs/f ... fid=86&cateid=2
http://www.tianyaclub.com/new/Pu ... mp;Key=0&Part=0
‘  看附件的演示图片

1:版本为此前Aiaiyi WorkRoom发布的主题分类或板内分类FOR2.x版本的2.5升级版本。
2:每个版块可以设置不同的专题分类,可以为所有的主题或部分主题赋一个专题分类属性。
3:特别适合论坛各版块搞各种活动需要组织和推出一批专题文章的。
4:特别适合大型论坛,帖子较多需要进一步的细分而不想使用子论坛功能的。
8:后台可为每个论坛设置不同的一个或多个专题类别。
8:后台可控制该版块是否强制会员发贴专题分类。
5:前台显示兼容精华贴显示。
6:前台无专题设置无显示。
8:前台快速发贴显示专题选择列表
6:专题列表内发新贴自动指定该专题。
7:发贴时可选择把主题归类到专题中,编辑帖子可重新指定专题类别。
9:支持把主题批量转移归属到各个专题中。[可选,免费技术支持]
10:支持把专题归类功能限制给斑竹和管理员用。[可选,付费技术支持]

协议声明:
1:Discuz是Comsenz Technology Ltd开发的高新产品DISCUZ论坛程序。
2:Subject classification是Aiaiyi WorkRoom[找不着北aday]为Discuz开发的专题插件,拥有对原创代码的版权
3:Aiaiyi WorkRoom没有对该插件提供任何技术支持的义务,所有的支持都是免费的或者是收费的。
4:Aiaiyi WorkRoom不对该插件可能造成用户程序文件破坏、数据丢失、直接或间接的其他损失负任何责任和连带责任。
5:当你准备使用该插件时你必须认同和接受以上声明协议,否则请不要使用本插件。
6:转贴请务必保留本协议声明


使用安装说明:

安装前说明:
1:Aiaiyi WorkRoom对无法完成该插件安装的以及D3D4用户 提供付费远程安装,限于业余空闲时间
2:免费技术支持:freediscuz论坛,discuz官方论坛。由于信箱容量限制请不要PM,请直接在论坛发回贴或新贴寻求支持,我会经常来逛逛的。
3:付费技术支持:QQ 15871200(验证通过信息为:专题插件付费技术支持),EMAIL:iiyi@21cn.com


安装前准备:
1:详细阅读功能描述看是否确实需要该插件并且版本相符,认真阅读协议声明接受并认同它,阅读安装前说明方便在自己遇到问题后得到技术支持。
2:请做数据库以及文件备份,下面是用到的文件10个请一一备份。以便随时覆盖还原。
该插件修改的档案:
修改:数据库表
主题表threads添加一个字段cate
论坛表forums添加一个字段cates

修改:PHP文档
./admin/forums.php
./forumdisplay.php
./post.php
./include/editpost.php  
./include/newthread.php
如需安装批量专题分类:
./topicadmin.php

修改:摸板
forumdisplay.htm
post_editpost.htm  
post_newthread.htm
如需安装批量专题分类:
topicadmin_moderate.htm
3:图片6张 附件中请解压到/images/attachicons目录
4:再次确认自己按照说明已经备份


后台代码控制详解:
1:后台代码非常人性话和易于控制。
2:登陆到后台点 论坛编辑 专题分类栏
3: 前置on表示开启所在版块的强制会员发表新主题时候实行专题归类,默认为关闭即去掉on
4:有效的代码格式:以_所有文章开头,用|分割专题名称和它的代号 代号不能更改,名称可以更改,前后顺序可以调换
下面是有效的代码样式
_所有文章|1_考试政策|2_考研英语|3_基础课|4_专业课|5_经验交流|6_招生公告
_所有文章|4_专业课|1_考试政策|2_考研英语|3_基础课|6_招生公告|5_经验交流
on_所有文章|1_考试政策|2_考研英语|3_基础课|4_专业课|5_经验交流|6_招生公告
on_所有文章|4_专业课|1_考试政策|2_考研英语|3_基础课|6_招生公告|5_经验交流

[ Last edited by adaysky on 2005-1-19 at 12:09 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
 楼主| aday 发表于 2005-1-18 21:00:19 | 显示全部楼层
========================标准安装开始============================

第一步:升级安装请跳过第一步,全新安装(以前没有安装过主题分类或板内分类FOR 2.0/2.2)请先升级数据库
  1. ALTER TABLE `cdb_threads` ADD `cate` VARCHAR( 2 ) DEFAULT '0' NOT NULL AFTER `fid` ;
  2. ALTER TABLE `cdb_forums` ADD `cates` VARCHAR( 150 ) DEFAULT '_所有文章' NOT NULL AFTER `name` ;
复制代码


第二步:/admin/forums.php
查找:

  1. showsetting('forums_edit_name', 'namenew', $forum['name'], 'text');

复制代码


其后插入:


  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//
  2.             showsetting('主题分类', 'catesnew', $forum['cates'], 'text');
  3. //=D25 Subject classification=Ver.2.5.0 by Aday=End//

复制代码





查找:

  1.                         $db->query("UPDATE $table_forums SET type='$typenew', status='$statusnew', fup='$fupnew', name='$namenew', icon='$iconnew',
  2.                                 description='$descriptionnew', styleid='$styleidnew', allowhtml='$allowhtmlnew', allowbbcode='$allowbbcodenew',
  3.                                 allowimgcode='$allowimgcodenew', allowsmilies='$allowsmiliesnew', postcredits='".intval($postcreditsnew)."',
  4.                                 replycredits='".intval($replycreditsnew)."', password='$passwordnew', viewperm='$viewpermnew',
  5.                                 postperm='$postpermnew', replyperm='$replypermnew', getattachperm='$getattachpermnew' WHERE fid='$fid'");

复制代码


替换为:

  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2.                         $db->query("UPDATE $table_forums SET type='$typenew', status='$statusnew', fup='$fupnew', name='$namenew', icon='$iconnew',
  3.                                 description='$descriptionnew', styleid='$styleidnew', allowhtml='$allowhtmlnew', allowbbcode='$allowbbcodenew',
  4.                                 allowimgcode='$allowimgcodenew', allowsmilies='$allowsmiliesnew', postcredits='".intval($postcreditsnew)."',
  5.                                 replycredits='".intval($replycreditsnew)."', password='$passwordnew', viewperm='$viewpermnew',
  6.                                 postperm='$postpermnew', replyperm='$replypermnew', getattachperm='$getattachpermnew' WHERE fid='$fid'");
  7. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/
  8. //=D25 Subject classification=Ver.2.5.0 by Aday=Change Start//       
  9.                         $db->query("UPDATE $table_forums SET type='$typenew', status='$statusnew', fup='$fupnew', name='$namenew', icon='$iconnew',
  10.                                 description='$descriptionnew', cates='$catesnew', styleid='$styleidnew', allowhtml='$allowhtmlnew', allowbbcode='$allowbbcodenew',
  11.                                 allowimgcode='$allowimgcodenew', allowsmilies='$allowsmiliesnew', postcredits='".intval($postcreditsnew)."',
  12.                                 replycredits='".intval($replycreditsnew)."', password='$passwordnew', viewperm='$viewpermnew',
  13.                                 postperm='$postpermnew', replyperm='$replypermnew', getattachperm='$getattachpermnew' WHERE fid='$fid'");
  14. //=D25 Subject classification=Ver.2.5.0 by Aday=Change End//
复制代码



第三步:forumdisplay.php  

查找:
  1. $discuz_action = 2;
  2. $navigation = '';
复制代码


其后插入:
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//
  2.         if (preg_match("/[^0-9]/",$cateid)) {$cateid="";}
  3. //=D25 Subject classification=Ver.2.5.0 by Aday=End//
复制代码



查找:

  1. $forumdisplayadd = $filteradd = '';
  2. if(!empty($filter)) {
  3.         if(is_numeric($filter)) {
  4.                 $forumdisplayadd .= "&filter=$filter";
  5.                 $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
  6.         } elseif($filter == 'digest') {
  7.                 $forumdisplayadd .= "&filter=digest";
  8.                 $filteradd = "AND digest>'0'";
  9.         }
  10. } else {
  11.         $filter = '';
  12. }
复制代码

替换为:

  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2. $forumdisplayadd = $filteradd = '';
  3. if(!empty($filter)) {
  4.         if(is_numeric($filter)) {
  5.                 $forumdisplayadd .= "&filter=$filter";
  6.                 $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
  7.         } elseif($filter == 'digest') {
  8.                 $forumdisplayadd .= "&filter=digest";
  9.                 $filteradd = "AND digest>'0'";
  10.         }
  11. } else {
  12.         $filter = '';
  13. }
  14. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/
  15. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//
  16. $forumdisplayadd = $caturladd = $filteradd = $cateidadd ='';
  17. if(!empty($filter)) {
  18.         if($filter != 'digest') {
  19.                 $forumdisplayadd .= "&filter=$filter";
  20.                 $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
  21.         } elseif($filter == 'digest') {
  22.                 $forumdisplayadd .= "&filter=digest";
  23.                 $caturladd .= "&filter=digest";
  24.                 $filteradd = "AND digest<>'0'";
  25.         }
  26. } else {
  27.         $filter = '';
  28. }
  29. if(!empty($cateid)) {
  30.                 $forumdisplayadd .= "&cateid=$cateid";
  31.                 $cateidadd = "AND cate=$cateid ";
  32. } else {
  33.         $cateid = '';
  34. }

  35. $cates=explode("|",$forum[cates]);$cat_count=$i=count($cates);

  36. if($cat_count==1):
  37.                          $subjectcate = $thecates = $cate_must_script = $cate_must_alert = $thecates = "";
  38. else:
  39.                 for($i = 0; $i < count($cates); $i++):
  40.                 $thecates2 = $thecates1 = explode("_",$cates[$i]);
  41.                 if($i == 0){if($thecates1[0]=="on"){$thecates1[0]="";}}
  42.                 if($thecates1[0]==$cateid ){$subject_class=$thecates1[1];
  43. $thecates .= "<td width=9><img src=images/attachicons/ttl.gif width=9 height=27></td><td
  44. background=images/attachicons/ttc.gif>$thecates1[1]</td><td
  45. width=9><img src=images/attachicons/ttr.gif width=9 height=27></td>"; }else{$thecates.="<td width=9><img
  46. src="images/attachicons/tl.gif" width=9 height=27></td><td background="images/attachicons/tc.gif"><a href="?fid=$forum[fid]$caturladd&cateid=$thecates1[0]">$thecates1[1]</a></td><td width=9><img src="images/attachicons/tr.gif" width=9
  47. height=27></td>"; }

  48.                 if($i == 0){if($thecates2[0]=="on"){$cate_must_script="||theform.cate.value == """;$cate_must_alert="专题分类亦为必选!";}else{$cate_must_script = $cate_must_alert ="";};$thecates2[0]="";$thecates2[1]="选择专题";};if($thecates2[0]==$cateid){$subjectcate .=                 "<option value="$thecates2[0]" selected >$thecates2[1]</option>";}else{$subjectcate .= "<option value="$thecates2[0]">$thecates2[1]</option>"; }
  49.                 endfor;

  50. $thecates="<TABLE CELLSPACING=0 CELLPADDING=0 border=0 align="left"><TR>".$thecates."</TR></TABLE>";
  51. $subjectcate= "<select name=cate>".$subjectcate."</select>";

  52. endif;
  53. //=D25 Subject classification=Ver.2.5.0 by Aday=End//
复制代码





查找:

  1. if(!empty($filter)) {
  2.         $query = $db->query("SELECT COUNT(*) FROM $table_threads WHERE fid='$fid' $filteradd");
  3.         $threadcount = $db->result($query, 0);
  4. } else {
  5.         $threadcount = $forum['threads'];
  6. }
复制代码

替换为:
  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2. if(!empty($filter)) {
  3.         $query = $db->query("SELECT COUNT(*) FROM $table_threads WHERE fid='$fid' $filteradd");
  4.         $threadcount = $db->result($query, 0);
  5. } else {
  6.         $threadcount = $forum['threads'];
  7. }
  8. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/
  9. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  10. if(!empty($filter)||!empty($cateid)) {
  11.         $query = $db->query("SELECT COUNT(*) FROM $table_threads WHERE fid='$fid' $filteradd $cateidadd");
  12.         $threadcount = $db->result($query, 0);
  13. } else {
  14.         $threadcount = $forum['threads'];
  15. }
  16. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
复制代码


查找:

  1. $query = $db->query("SELECT  t.* FROM $table_threads t USE INDEX(displayorder)
  2.                         WHERE t.fid='$fid' $filteradd
  3.                         ORDER BY t.displayorder DESC, t.lastpost $ascdesc
  4.                         LIMIT $start_limit, $tpp ");

复制代码



替换为:

  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2. $query = $db->query("SELECT  t.* FROM $table_threads t USE INDEX(displayorder)
  3.                         WHERE t.fid='$fid' $filteradd
  4.                         ORDER BY t.displayorder DESC, t.lastpost $ascdesc
  5.                         LIMIT $start_limit, $tpp ");
  6. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/
  7. //=D25 Subject classification=Ver.2.5.0 by Aday=Change Start//       
  8. $query = $db->query("SELECT  t.* FROM $table_threads t USE INDEX(displayorder)
  9.                         WHERE t.fid='$fid' $filteradd $cateidadd
  10.                         ORDER BY t.displayorder DESC, t.lastpost $ascdesc
  11.                         LIMIT $start_limit, $tpp ");
  12. //=D25 Subject classification=Ver.2.5.0 by Aday=Change End//
复制代码






查找:
  1. $check[$filter] = 'selected="selected"';       
复制代码

其后插入:

  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2. $check[$cateid] = 'selected="selected"';
  3. //=D25 Subject classification=Ver.2.5.0 by Aday=End//       
复制代码



第四步:post.php  

查找:
  1. define('CURRSCRIPT',  'post');

  2. require './include/common.php';

  3. $ismoderator = modcheck($discuz_user);
复制代码


其后插入:
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2.                 $cateid = dhtmlspecialchars($cateid);
  3.                 $subjectcate = "";
  4.                 $cates=explode("|",$forum[cates]);
  5.                                 if(count($cates)==1):
  6.                                 $subjectcate = $cate_must_script = $cate_must_alert = "";
  7.                                 else:
  8.                 $i=count($cates);for($i = 0; $i < count($cates); $i++) {
  9.                                 $thecates1 = explode("_",$cates[$i]);if($i == 0){if($thecates1[0]=="on"){$cate_must_script="||theform.cate.value == """;$cate_must_alert="专题分类亦为必选!";}else{$cate_must_script = $cate_must_alert ="";};$thecates1[0]="";$thecates1[1]="选择专题";};if($thecates1[0]==$cateid){$subjectcate .=                 "<option value="$thecates1[0]" selected >$thecates1[1]</option>";}else{
  10.                                 $subjectcate .= "<option value="$thecates1[0]">$thecates1[1]</option>"; }
  11.                         }

  12.                                 endif;
  13. //=D25 Subject classification=Ver.2.5.0 by Aday=End//       
复制代码


查找:

  1. if($tid && $fid) {
  2.         $query = $db->query("SELECT * FROM $table_threads WHERE tid='$tid'");
  3.         $thread = $db->fetch_array($query);
  4.         $fid = $thread['fid'];
  5.         $navigation = "&raquo; <a href="viewthread.php?tid=$tid">$thread[subject]</a>";
  6.         $navtitle = " - $thread[subject]";
复制代码


其后插入:
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2.                 $subjectcate = "";
  3.                 $cates=explode("|",$forum[cates]);
  4.                                 if(count($cates)==1):
  5.                                 $subjectcate = $cate_must_script = $cate_must_alert = "";
  6.                                 else:
  7.                 $i=count($cates);for($i = 0; $i < count($cates); $i++) {
  8.                                 $thecates1 = explode("_",$cates[$i]);if($i == 0){if($thecates1[0]=="on"){$cate_must_script="theform.cate.value == ""||";$cate_must_alert="专题分类亦为必选!";}else{$cate_must_script = $cate_must_alert ="";};$thecates1[0]="";$thecates1[1]="选择专题";};if($thecates1[0]==$thread[cate]){$subjectcate .=                 "<option value="$thecates1[0]" selected >$thecates1[1]</option>";}else{
  9.                                 $subjectcate .= "<option value="$thecates1[0]">$thecates1[1]</option>"; }
  10.                         }

  11.                                 endif;
  12. //=D25 Subject classification=Ver.2.5.0 by Aday=End//       
复制代码



第五步:include/editpost.php  

查找:
  1.         $postinfo['subject'] = str_replace('"', "&quot;", $postinfo['subject']);
复制代码


其后插入:
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2.         $postinfo['cate'] = dhtmlspecialchars($postinfo['cate']);
  3. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
复制代码


查找:

  1.                         $db->query("UPDATE $table_threads SET iconid='$iconid', subject='$subject' WHERE tid='$tid'", 'UNBUFFERED');
  2.                         if($pollopts) {
  3.                                 $db->query("UPDATE $table_polls SET pollopts='$pollopts' WHERE tid='$tid'", 'UNBUFFERED');
  4.                         }
复制代码


替换为:
  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2.                         $db->query("UPDATE $table_threads SET iconid='$iconid', subject='$subject' WHERE tid='$tid'", 'UNBUFFERED');
  3.                         if($pollopts) {
  4.                                 $db->query("UPDATE $table_polls SET pollopts='$pollopts' WHERE tid='$tid'", 'UNBUFFERED');
  5.                         }
  6. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/                       
  7. //=D25 Subject classification=Ver.2.5.0 by Aday=Change Start//       
  8.                         $db->query("UPDATE $table_threads SET iconid='$iconid', cate='$cate', subject='$subject' WHERE tid='$tid'", 'UNBUFFERED');
  9.                         if($pollopts) {
  10.                                 $db->query("UPDATE $table_polls SET pollopts='$pollopts' WHERE tid='$tid'", 'UNBUFFERED');
  11.                         }
  12. //=D25 Subject classification=Ver.2.5.0 by Aday=Change End//       
复制代码







第六步:include/newthread.php
查找:

  1.         $db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, poll, attachment)
  2.                 VALUES ('$fid', '$viewperm', '$iconid', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$timestamp', '$discuz_user', '$displayorder', '$digest', '$poll', '".attachtype($last_attach_type, 'id')."')");
  3.         $tid = $db->insert_id();
复制代码


替换为:
  1. /******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE Start******
  2.         $db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, poll, attachment)
  3.                 VALUES ('$fid', '$viewperm', '$iconid', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$timestamp', '$discuz_user', '$displayorder', '$digest', '$poll', '".attachtype($last_attach_type, 'id')."')");
  4.         $tid = $db->insert_id();
  5. ******=D25 Subject classification=Ver.2.5.0 by Aday=REMOVE End******/
  6. //=D25 Subject classification=Ver.2.5.0 by Aday=Chanage Start//       
  7.         $db->query("INSERT INTO $table_threads (fid, cate, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, poll, attachment)
  8.                 VALUES ('$fid', '$cate', '$viewperm', '$iconid', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$timestamp', '$discuz_user', '$displayorder', '$digest', '$poll', '".attachtype($last_attach_type, 'id')."')");
  9.         $tid = $db->insert_id();
  10. //=D25 Subject classification=Ver.2.5.0 by Aday=Chanage End//       
复制代码








第七步:post_newthread.htm

查找
  1. <tr>
  2. <td bgcolor="{ALTBG1}" width="20%">{lang subject}:</td>
  3. <td bgcolor="{ALTBG2}"><input type="text" name="subject" size="45" value="$subject" tabindex="3"></td>
  4. </tr>
复制代码


在下面添加
  1. <!//=D25 Subject classification=Ver.2.5.0 by Aday=Start//>
  2. <!--{if !empty($subjectcate)}-->
  3. <tr>
  4. <td bgcolor="{ALTBG1}" width="20%">专题:</td>
  5. <td bgcolor="{ALTBG2}"><select name=cate>$subjectcate </select> (请选择所属类别)</td>
  6. </tr>
  7. <!--{/if}-->
  8. <!//=D25 Subject classification=Ver.2.5.0 by Aday=End//>
复制代码



查找:
  1. theform.subject.value == "" || theform.message.value == ""
复制代码


其后添加:
  1. $cate_must_script
复制代码



查找:
  1. _message_isnull}
复制代码


其后添加:
  1. $cate_must_alert
复制代码



第八步:post_editpost.htm

查找
  1. <tr>
  2. <td bgcolor="{ALTBG1}" width="20%">{lang subject}:</td>
  3. <td bgcolor="{ALTBG2}">
  4. <input type="text" name="subject" size="45" value="$postinfo[subject]" tabindex="3">
  5. <input type="hidden" name="origsubject" value="$postinfo[subject]">
  6. </td></tr>
复制代码


在下面添加
  1. <!//=D25 Subject classification=Ver.2.5.0 by Aday=Start//>
  2. <!--{if !empty($subjectcate)}-->
  3. <tr>
  4. <td bgcolor="{ALTBG1}" width="20%">专题:</td>
  5. <td bgcolor="{ALTBG2}"><select name=cate>$subjectcate </select> (请选择所属类别)</td>
  6. </tr>
  7. <!--{/if}-->
  8. <!//=D25 Subject classification=Ver.2.5.0 by Aday=End//>
复制代码



查找:
  1. theform.subject.value == "" || theform.message.value == ""
复制代码


添加:
  1. $cate_must_script
复制代码



查找:
  1. _message_isnull}
复制代码


其后添加:

  1. $cate_must_alert
复制代码



第九步:forumdisplay.htm

查找:

  1. <tr><td class="multi">$multipage</td>
  2. <td align="right">
  3. <!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
  4. <!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
  5. </td></tr>
复制代码


其下面添加:
  1. <!//=D25 Subject classification=Ver.2.5.0 by Aday=Start//>
  2. <tr><td class="multi">$thecates</td></tr>
  3. <!//=D25 Subject classification=Ver.2.5.0 by Aday=End//>
复制代码


查找:

  1.         <tr><td colspan="2" class="header">{lang post_fastpost}</td></tr>
  2.         <tr>
  3.         <td width="18%" bgcolor="{ALTBG1}">
复制代码

其后添加:$subjectcate  


查找:注意这个添加共有4个
  1. <a href="post.php?action=newthread&fid=$fid
复制代码

后面添加&cateid=$cateid


查找:
  1. theform.subject.value == "" || theform.message.value == ""
复制代码
其后添加:
  1. $cate_must_script
复制代码



查找:
  1. _message_isnull}
复制代码

其后添加:
  1. $cate_must_alert
复制代码



========================标准安装结束============================

========================批量选项安装开始========================
如果要安装批量专题分类:


第一步:topicadmin.php
查找:

  1. if(!$discuz_user || !$discuz_pw || !modcheck($discuz_user)) {
  2.         showmessage('admin_nopermission', NULL, 'HALTED');
  3. }
复制代码
其后插入:
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2. $subjectcate = "";
  3.                 $cates=explode("|",$forum[cates]);
  4.                 $i=count($cates);for($i = 0; $i < count($cates); $i++) {
  5.                                 $thecates1 = explode("_",$cates[$i]);if($thecates1[0]==$thread[cate]){$subjectcate .=                 

  6. "<option value="$thecates1[0]" selected >$thecates1[1]</option>";}else{
  7.                                 $subjectcate .= "<option value="$thecates1[0]">$thecates1[1]</option>"; }
  8.                         }
  9. //=D25 Subject classification=Ver.2.5.0 by Aday=End//       
复制代码


查找:

  1.                         $db->query("DELETE FROM $table_threads WHERE tid IN ($tids)");
  2.                         $db->query("DELETE FROM $table_posts WHERE tid IN ($tids)");

  3.                         updateforumcount($fid);

  4.                         modlog();
  5.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
复制代码


其后插入
  1. //=D25 Subject classification=Ver.2.5.0 by Aday=Start//       
  2.                 }elseif($operation == 'cate' && $allowmove){
  3.                         accesscheck($query);
  4.                         if(!cate) {
  5.                                 showmessage('admin_cate_invalid');
  6.                         }
  7.                         $db->query("UPDATE $table_threads SET cate='$cate' WHERE  (tid IN ($tids)) AND fid='$fid'");
  8.                         modlog();
  9.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page&cateid=$cate");
  10. //=D25 Subject classification=Ver.2.5.0 by Aday=End//       
复制代码







第二步:topicadmin_moderate.htm
查找


  1. <tr>
  2.         <td bgcolor="{ALTBG1}" width="21%">{lang level}:</td>
  3.         <td bgcolor="{ALTBG2}">
  4.         <input type="radio" name="level" value="0" checked> {lang admin_unstick} &nbsp; &nbsp;
  5.         <input type="radio" name="level" value="1"> <img src="{IMGDIR}/star.gif"> &nbsp; &nbsp;
  6.         <input type="radio" name="level" value="2"> <img src="{IMGDIR}/star.gif"><img src="{IMGDIR}/star.gif"> &nbsp; &nbsp;
  7.         <input type="radio" name="level" value="3"> <img src="{IMGDIR}/star.gif"><img src="{IMGDIR}/star.gif"><img src="{IMGDIR}/star.gif"></td>
  8. </tr>
复制代码


在其下面插入:
  1. <!//=D25 Subject classification=Ver.2.5.0 by Aday=Start// >
  2. <!--{elseif $operation =='cate'}-->
  3. <tr>
  4.         <td bgcolor="{ALTBG1}" width="21%">目标类别</td>
  5.         <td bgcolor="{ALTBG2}">
  6.         <select name="cate">
  7.         $subjectcate
  8.         </select>
  9. </tr>
  10. <!//=D25 Subject classification=Ver.2.5.0 by Aday=End//        >
复制代码






第三步:forumdisplay.htm
查找:
  1.               <!--{if $allowmove}-->
  2.               <input type="radio" name="operation" value="move">
  3.               {lang moderate_move}
  4.               <!--{/if}-->
复制代码


其下添加:
  1. <!//=D25 Subject classification=Ver.2.5.0 by Aday=Start//>
  2.               <!--{if $allowmove}-->
  3.               <input type="radio" name="operation" value="cate">
  4.               专题分类
  5.               <!--{/if}-->
  6. <!//=D25 Subject classification=Ver.2.5.0 by Aday=End//>
复制代码



========================批量选项安装结束========================

[ Last edited by adaysky on 2005-1-19 at 20:05 ]
回复

使用道具 举报

 楼主| aday 发表于 2005-1-18 21:00:42 | 显示全部楼层
收集 BUG
回复

使用道具 举报

水晶心 发表于 2005-1-18 21:08:51 | 显示全部楼层
要rmb?要钱也只能跟有钱人要啊
就向买d4的人要钱了,希望在d2.5的免费。
不过支持你,我喜欢你的这个插件,就是因为这个插件的问题,我一直没有从d2.2f升级到2.5f
回复

使用道具 举报

mmcatv 发表于 2005-1-19 01:29:17 | 显示全部楼层
不错~~~要了.不过有些模板找不到这段{lang post_subject_or_message_isnull}
只有这段{lang post_subject_and_message_isnull}
回复

使用道具 举报

zqwm 发表于 2005-1-19 08:36:42 | 显示全部楼层
好东西,得帮着顶一下,楼主辛苦
回复

使用道具 举报

 楼主| aday 发表于 2005-1-19 20:08:26 | 显示全部楼层
Originally posted by mmcatv at 2005-1-19 01:29
不错~~~要了.不过有些模板找不到这段{lang post_subject_or_message_isnull}
只有这段{lang post_subject_and_message_isnull}

已经修理了
OR 和 AND一样的指的是同一句
回复

使用道具 举报

wu1yi2wen3 发表于 2005-1-20 13:03:56 | 显示全部楼层
谢谢,不错
回复

使用道具 举报

playcat 发表于 2005-1-22 00:51:10 | 显示全部楼层
楼主你好,我想请教 在你的爱爱医-中国医学论坛首页上,版块分两列(或以上)排列的,这个又是什么HACK?
回复

使用道具 举报

shjam 发表于 2005-1-26 16:41:19 | 显示全部楼层
好人啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-3 14:25 , Processed in 0.120949 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表