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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[原创]完全仿Discuz 4主题分类For D25 ForumDisplay显示

[复制链接]
kamachen 发表于 2005-9-11 20:22:58 | 显示全部楼层 |阅读模式
美化插件名称:完全仿Discuz 4主题分类For D25 ForumDisplay显示
适用版本: 2.5F & 2.5F SP1
作者: Kamachen
所属网站:Ingress Of Dreams
修改文件: forumdisplay.php
修改模板: css.htm,forumdisplay.htm
最后发表日期:2005.9.11
技术支持与演示:http://www.iood.net/forum/forumdisplay.php?fid=26


实际上这因该不属于原创的范畴,因为我也仅仅是在adaysky的基础上仿D4进行美化而已。看到有朋友需要就发出来,希望对大家有帮助!

首先在https://discuz.dismall.com/viewthread.php?tid=100786安装《主题分类插件FOR Discuz系列正式版-索引专题分类板内分类话题分类19/1》,已安装过的朋友直接进入美化步骤,改动的文件不多,如果我没记错的话因该是这样。

forumdisplay.php

查找:

  1. $thecates .= "<td width=9><img src=images/attachicons/ttl.gif width=9 height=27></td><td
  2. background=images/attachicons/ttc.gif>$thecates1[1]</td><td
  3. width=9><img src=images/attachicons/ttr.gif width=9 height=27></td>"; }else{$thecates.="<td width=9><img
  4. 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
  5. height=27></td>"; }

  6.                 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>"; }
  7.                 endfor;

  8. $thecates="<TABLE CELLSPACING=0 CELLPADDING=0 border=0 align="left"><TR>".$thecates."</TR></TABLE>";
复制代码


替换为

  1. $thecates .= "<td class=header>&nbsp;$thecates1[1]&nbsp;</td>"; }else{$thecates.="<td class="altbg1">&nbsp;<a href="?fid=$forum[fid]$caturladd&cateid=$thecates1[0]">$thecates1[1]</a>&nbsp;</td>"; }

  2.                 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>"; }
  3.                 endfor;

  4. $thecates="<table cellspacing=0 cellpadding=0 border=0><tr><td><table cellspacing=1 cellpadding=2 class="tableborder"><tr class=smalltxt>".$thecates."</tr></table></td></tr><tr><td height="3"></td></tr></table>";
复制代码




打开模板目录

css.htm
在</style>前增加以下两行

  1. .altbg1                        { background: {ALTBG1} }
  2. .altbg2                        { background: {ALTBG2} }
复制代码



forumdisplay.htm
查找

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


替换为


  1. <table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
  2. <tr><td align="left" valign="bottom">
  3. <!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid&cateid=$cateid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
  4. <!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&cateid=$cateid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
  5. <!--{if !empty($subjectcate)}-->
  6. <br>
  7. $thecates
  8. <!--{/if}-->
  9. </td>
  10. <td align="right" class="multi" valign="bottom">$multipage</td></tr></table>
复制代码


如果要放在右侧


  1. <table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
  2. <tr><td align="left" class="multi" valign="bottom">$multipage</td>
  3. <td align="right" valign="bottom">
  4. <!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid&cateid=$cateid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
  5. <!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&cateid=$cateid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
  6. <!--{if !empty($subjectcate)}-->
  7. <br>
  8. $thecates
  9. <!--{/if}-->
  10. </td></tr></table>
复制代码


完成。


顺便提供一下《主题分类插件FOR Discuz系列正式版-索引专题分类板内分类话题分类19/1》的数据库反安装代码:


  1. ALTER TABLE `cdb_threads` DROP `cate`  ;
  2. ALTER TABLE `cdb_forums` DROP `cates`  ;
复制代码




有朋友说要论坛的风格,风格主要是论坛团队的作品不是我一个人的呵呵,所以无法答应各位的这个要求。
论坛现有的风格有两种,连接为
http://www.iood.net/forum/index.php?styleid=2
http://www.iood.net/forum/index.php?styleid=3

最近在筹备新模板的制作……或许到时候可以共享一下……

本人没写过什么插件,对PHP也是知之甚少,原来那个偷MSN的天气预报是我写的,顺便调查一下大家现在是否需要把模板整合进去?

[ 本帖最后由 kamachen 于 2005-9-11 20:26 编辑 ]
easonlee 发表于 2005-9-11 20:24:29 | 显示全部楼层
hhohoho~~~
回复

使用道具 举报

oytktk 发表于 2005-9-11 20:25:03 | 显示全部楼层
顶你一个!
回复

使用道具 举报

beecheung 发表于 2005-9-11 20:26:40 | 显示全部楼层
找了很久了....
回复

使用道具 举报

 楼主| kamachen 发表于 2005-9-11 20:28:39 | 显示全部楼层
哈哈,顶的真快,谢谢!

beecheung去哪了?说要第一个顶来着。沙发没强着。
回复

使用道具 举报

 楼主| kamachen 发表于 2005-9-11 20:29:14 | 显示全部楼层
大家装一下,匆匆整理了一下不知道是否有发错了…………
回复

使用道具 举报

beecheung 发表于 2005-9-11 20:30:33 | 显示全部楼层
惭愧惭愧, 只坐到地上.
回复

使用道具 举报

beecheung 发表于 2005-9-11 20:31:33 | 显示全部楼层
我马上就试.
回复

使用道具 举报

beecheung 发表于 2005-9-12 09:23:53 | 显示全部楼层
安装成功.

多谢共享
回复

使用道具 举报

 楼主| kamachen 发表于 2005-9-12 10:06:57 | 显示全部楼层
还被加了精,呵呵谢谢斑竹!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-21 21:36 , Processed in 0.128752 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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