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

 找回密码
 立即注册
搜索

[发布] 6.1.0首页四格及SEO插件下载 无错,缓存版 直接上传无需修改 更新到080606版

[复制链接]
benba 发表于 2008-5-9 04:06:10 | 显示全部楼层 |阅读模式
发布首页四格的时候顺便把本站修改好的SEO插件也发上来,为广大站长增加流量.

这么好的插件,如果你只下不顶的话.也太不地道了.

      使用过一些时间后会发现自己的流量比原来增加了很多。最明显的就是大型技术、行业论坛。百度收录等都有所提高。你想得到更好的优化,请访问网络人站长论坛的SEO版块。在这里和大家讨论怎么样把DISCUZ最优化。现在你可以观望,不过流量提高后没有很好的利用,就白白浪费了哦。

二楼提供手动修改的方法,请大家注意.

首页四格:
版本支持:6.1.0 0606版
数据调用方法:全缓存 不影响网站速度.
编码支持:GBK
安装方法:直接上传替换文件.或者查看二楼手动安装方法.

SEO插件:
删除了多余的内容,让百度,谷歌更好的收录网站.
版本支持:6.1.0 0429版
编码支持:GBK
安装方法:直接上传替换文件

如果你的论坛,对index.php 和templates\default\discuz 没有做过任何的修改.请直接替换原来的文件就好了.LINUX主机请选择二进式上传.

演示地址:站长论坛

[ 本帖最后由 benba 于 2008-7-31 06:26 编辑 ]
回复

使用道具 举报

 楼主| benba 发表于 2008-5-9 04:07:16 | 显示全部楼层

首页四格手动安装方法

index.php templates\default\discuz.html 这两个文件以外,上传其它所有的文件.

然后打打你的Index.php文件:找到:

  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
复制代码
下载加:

  1. //----首页四格代码开始
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //新贴
  4. $hack_cut_str = 26; //标题字数
  5. $hack_cut_strauthor = 9;
  6. $new_post_threadlist = array();
  7. $nthread = array();
  8. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
  9. while($nthread = $db->fetch_array($query)) {
  10.         $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
  11.         $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
  12.         $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
  13.         $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
  14.         $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
  15.         if($nthread['highlight']) {
  16.                 $string = sprintf('%02d', $nthread['highlight']);
  17.                 $stylestr = sprintf('%03b', $string[0]);
  18.                 $nthread['highlight'] = 'style="';
  19.                 $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  20.                 $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  21.                 $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  22.                 $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  23.                 $nthread['highlight'] .= '"';
  24.         } else {
  25.                 $nthread['highlight'] = '';
  26.         }
  27.         $new_post_threadlist[] = $nthread;
  28. }
  29. //新回复
  30. $hack_cut_str = 26; //标题字数
  31. $hack_cut_strauthor = 9;
  32. $new_reply_threadlist = array();
  33. $rthread = array();
  34. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.displayorder not in (-1,-2) AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 10");
  35. while($rthread = $db->fetch_array($query)) {
  36.         $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
  37.         $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
  38.         $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
  39. $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
  40.         $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
  41.         if($rthread['highlight']) {
  42.                 $string = sprintf('%02d', $rthread['highlight']);
  43.                 $stylestr = sprintf('%03b', $string[0]);
  44.                 $rthread['highlight'] = 'style="';
  45.                 $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  46.                 $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  47.                 $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  48.                 $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  49.                 $rthread['highlight'] .= '"';
  50.         } else {
  51.                 $rthread['highlight'] = '';
  52.         }
  53.         $new_reply_threadlist[] = $rthread;
  54. }
  55. //热帖
  56. $hack_cut_str = 26; //标题字数
  57. $hack_cut_strauthor = 9;
  58. $new_hot_threadlist = array();
  59. $mthread = array();
  60. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
  61. while($mthread = $db->fetch_array($query)) {
  62.         $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
  63.         $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
  64.         $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
  65.   $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
  66.         $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
  67.         if($mthread['highlight']) {
  68.                 $string = sprintf('%02d', $mthread['highlight']);
  69.                 $stylestr = sprintf('%03b', $string[0]);
  70.                 $mthread['highlight'] = 'style="';
  71.                 $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  72.                 $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  73.                 $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  74.                 $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  75.                 $mthread['highlight'] .= '"';
  76.         } else {
  77.                 $mthread['highlight'] = '';
  78.         }
  79.         $new_hot_threadlist[] = $mthread;
  80. }
  81. //----首页四格代码结束
复制代码
然后再打开:templates\default\discuz.html

找到:

  1. <div id="ad_text"></div><!--{/if}-->
复制代码
下面加:


  1. <!-- 首页四格代码开始 -->
  2. <div class="mainbox forumlist" style="padding:0;">
  3. <table cellspacing="0" cellpadding="0">
  4.   <thead class="category">
  5.   <tr>
  6.    <td align="center" style="padding:0 1px 0 0"><h3>≡ 论坛图片 ≡</h3></td>
  7.    <td align="center" style="padding:0"><h3>≡ 最新帖子 ≡</h3></td>
  8.    <td align="center" style="padding:0 1px 0 1px"><h3>≡ 最新回复 ≡</h3></td>
  9.    <td align="center" style="padding:0"><h3>≡ 论坛热门 ≡</h3></td>
  10.   </tr>
  11.   </thead>
  12.   <tr>
  13.    <td width="25%">
  14.     <script type="text/javascript" src="pic.php"></script>
  15.    </td>
  16.    <td width="25%">
  17.     <table border="0" cellpadding="0" cellspacing="0" width="100%">
  18.      <tr valign="top">
  19.       <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  20.       <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  21.       <!--{loop $new_post_threadlist $nthread}-->
  22.        <!--{if $nthread[replies]}-->
  23.         <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新帖子 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></div>
  24.                    <!--{else}-->
  25.         <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新帖子 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: 暂时没有回复'>$nthread[view_subject]</a></div>
  26.        <!--{/if}-->
  27.       <!--{/loop}-->
  28.       </td>
  29.      </tr>
  30.     </table>
  31.    </td>
  32.    <td width="25%">
  33.     <table border="0" cellpadding="0" cellspacing="0" width="100%">
  34.      <tr valign="top">
  35.       <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  36.       <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  37.       <!--{loop $new_reply_threadlist $rthread}-->
  38.        <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$rthread[tid]" $rthread['highlight'] title='最新回复 {LF}所在论坛: $rthread[forumname]{LF}主题标题: $rthread[subject]{LF}主题作者: $rthread[author]{LF}发表时间: $rthread[date]{LF}浏览次数: $rthread[views] 次{LF}回复次数: $rthread[replies] 次{LF}最后回复: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
  39.       <!--{/loop}-->
  40.       </td>
  41.      </tr>
  42.     </table>
  43.    </td>
  44.    <td width="25%">
  45.     <table border="0" cellpadding="0" cellspacing="0" width="100%">
  46.      <tr valign="top">
  47.       <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  48.       <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  49.       <!--{loop $new_hot_threadlist $mthread}-->
  50.        <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='本周热门 {LF}所在论坛: $mthread[forumname]{LF}主题标题: $mthread[subject]{LF}主题作者: $mthread[author]{LF}发表时间: $mthread[date]{LF}浏览次数: $mthread[views] 次{LF}回复次数: $mthread[replies] 次{LF}最后回复: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
  51.       <!--{/loop}-->
  52.       </td>
  53.      </tr>
  54.     </table>
  55.    </td>
  56.   </tr>
  57. </table>
  58. </div>
  59. <!-- 首页四格代码结束 -->

复制代码
好了,首页四格就安装完成了!

评分

1

查看全部评分

回复

使用道具 举报

心灵刺客 发表于 2008-5-9 04:17:43 | 显示全部楼层
很不错 正需要呢
回复

使用道具 举报

心灵刺客 发表于 2008-5-9 04:34:24 | 显示全部楼层
修改好了 感谢:
http://www.mohuanshouji2.cn/
回复

使用道具 举报

 楼主| benba 发表于 2008-5-9 05:36:48 | 显示全部楼层
不客气,有问题在这里提出来就好了!
回复

使用道具 举报

 楼主| benba 发表于 2008-5-9 06:35:11 | 显示全部楼层
收录了一晚上的插件.不搞了.睡觉去了!
回复

使用道具 举报

rackylin 发表于 2008-5-9 08:46:55 | 显示全部楼层
图片支持远程附件吗
回复

使用道具 举报

拒买日本货 发表于 2008-5-9 09:05:55 | 显示全部楼层
论坛图片是随机的吗?

我认为随机的好.

这样...论坛的帖子不会沉沦了....


还有..,能否增加多一个随机精华?

谢谢
回复

使用道具 举报

拒买日本货 发表于 2008-5-9 09:07:12 | 显示全部楼层
论坛热门是否是一周热门??  我需要一周热门

谢谢...
回复

使用道具 举报

 楼主| benba 发表于 2008-5-9 10:59:11 | 显示全部楼层
原帖由 拒买日本货 于 2008-5-9 09:05 发表
论坛图片是随机的吗?

我认为随机的好.

这样...论坛的帖子不会沉沦了....


还有..,能否增加多一个随机精华?

谢谢

是随机的!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-15 00:16 , Processed in 0.104140 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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