Manyou诚邀开发者加盟 | 常见问题
《站长》俱乐部官方群公布 城市联络员机会多多
立即免费下载 Discuz!7.0.0 正式版
安装升级指南 | 用户手册 | 新手建站学堂
基于.net架构的Discuz!NT2.6正式版发布
Comsenz公司2009年招贤纳士,期待您的加盟
Discuz!收费服务内容及价格
7月重庆、成都、西安三地社区运营实战特训速报名
Discuz!/UCHome 专用官方虚拟主机
牧场新服一起联运:豆浆机免费带回家
基于Discuz!的免费论坛空间5D6D
康盛创想《站长》俱乐部18城市互动之旅报名ing
返回列表 回复 发帖

首页四格(帖子类型定时轮流变换+发帖之星+财富,悍匪,宠物排行榜)

先说明一下, 四格显示的作者不是我, 我这个也是下载7瑞的, 然后全部是自己改的, 因为我的论坛里面有几位会员想要, 所以放出来, 大家喜欢的可以参考一下.

注意: 因为该插件是很多局限性的, 建议对程序有所了解的会员加以修改来符合自己论坛的要求..

之所以改成这样, 我的想法是这样的, 因为既然做成折叠版的, 用户很少去把鼠标移到那块, 所以就做成了每隔一定的时间轮流显示不同类型的帖子出来, 然后, 如果你装了无心宠物,又装了最新版的社区银行还有黑道生涯,你就可以给出几个排行榜出来,之所以要给出排行榜,是因为考虑到会员对排行这些东西很敏感, 大家都喜欢自己的名字出现在排行榜上面, 也就出现了会员之间的互相竞争, 这样有利于社区的人气的发展....

另: 我去掉了天气显示, 换了自己喜欢的名人名言或者经验句子下去, 大家不喜欢的可以随时更改include/geyan-7ree.txt,

还有, 本人显示的是最新帖子,最新回复,以及随机抽取不同的精华帖子作为3格轮换显示. 大家也可以随时修改自己的, 打开

演示图:

4ge.gif
2007-11-23 21:59


演示网站:

http://www.nzyule.com


安装方法:

需要改动的文件:
# /index.php
# /discuz.htm

1. 将upload目录下的所有文件上传到论坛的根目录下

2. 打开 index.php,  查找:
  1. $rsshead = $rssstatus
复制代码
在之上加:
  1. //------ plm 缓存修改首页四格开始 ------
  2. @include DISCUZ_ROOT.'./index_four.php';
  3. //------ plm 缓存修改首页四格结束 ------
复制代码
3, 打开 templates/default/discuz.htm

查找:
  1. <!--{loop $catlist $key $cat}-->
复制代码
在其上加:
  1. <!-- 首页四格 -->
  2. <style>
  3. .bfg_ntopa{
  4. float:left;
  5. clear:right;
  6.         font-weight: bold;      
  7.         
  8.         margin: 2px 2px 0px 2px;
  9.         text-align: center;
  10.         line-height: 18px;
  11.         BORDER-RIGHT: #cccccc 1px solid;
  12.                 BORDER-LEFT: #cccccc 1px solid;
  13.         vertical-align:bottom;
  14. }
  15. .bfg_ntopb {
  16.         float:left;
  17.         clear:right;
  18.         BORDER-RIGHT: #cccccc 1px solid;
  19.                 BORDER-BOTTOM:#cccccc 1px solid;
  20.         BORDER-LEFT: #cccccc 1px solid;
  21.         
  22.         margin: 2px 2px 0px 2px;
  23.         text-align: center;
  24.         vertical-align : middle;
  25.         line-height: 18px;

  26. }
  27. </style>
  28. <script language="javascript">
  29. function view(id) {
  30.         for (i=0;i<3;i++) {
  31.                 document.getElementById('d'+i).style.display = 'none';
  32.                 document.getElementById('c'+ i).className='bfg_ntopb';
  33.         }
  34.         document.getElementById('d'+ id).style.display = 'block';
  35.         document.getElementById('c'+id).className='bfg_ntopa';

  36.         clearTimeout(show_view);
  37. }
  38. function interval_view() {
  39.         if (document.getElementById('d0').style.display == 'none' && document.getElementById('d1').style.display == 'none' && document.getElementById('d2').style.display == 'none') {
  40.                 document.getElementById('d0').style.display = 'block';
  41.         } else {
  42.                 for (i=0;i<3;i++) {
  43.                         if (document.getElementById('d'+i).style.display == 'block') {
  44.                                 next_i = i+1;
  45.                                 if (next_i > 2) {
  46.                                         next_i = 0;
  47.                                  }
  48.                                 break;
  49.                         }
  50.                 }
  51.                 for (i=0;i<3;i++) {
  52.                         document.getElementById('d'+i).style.display = 'none';
  53.                         document.getElementById('c'+i).className='bfg_ntopb';
  54.                 }
  55.                 document.getElementById('d'+ next_i).style.display = 'block';
  56.                 document.getElementById('c'+next_i).className='bfg_ntopa';
  57.         }       
  58.         show_view = setTimeout("interval_view()", 7000);
  59.         show_view2 = setTimeout("interval_view2()", 2000);

  60. }

  61. function recall_show_view() {
  62.         show_view = setTimeout("interval_view()", 7000);       
  63. }



  64. function view2(id) {
  65.         for (i=0;i<3;i++) {
  66.                 document.getElementById('e'+i).style.display = 'none';
  67.                 document.getElementById('b'+ i).className='bfg_ntopb';
  68.         }
  69.         document.getElementById('e'+ id).style.display = 'block';
  70.         document.getElementById('b'+id).className='bfg_ntopa';

  71.         clearTimeout(show_view);
  72. }
  73. function interval_view2() {
  74.         if (document.getElementById('e0').style.display == 'none' && document.getElementById('e1').style.display == 'none' && document.getElementById('e2').style.display == 'none') {
  75.                 document.getElementById('e0').style.display = 'block';
  76.         } else {
  77.                 for (i=0;i<3;i++) {
  78.                         if (document.getElementById('e'+i).style.display == 'block') {
  79.                                 next_i = i+1;
  80.                                 if (next_i > 2) {
  81.                                         next_i = 0;
  82.                                  }
  83.                                 break;
  84.                         }
  85.                 }
  86.                 for (i=0;i<3;i++) {
  87.                         document.getElementById('e'+i).style.display = 'none';
  88.                         document.getElementById('b'+i).className='bfg_ntopb';
  89.                 }
  90.                 document.getElementById('e'+ next_i).style.display = 'block';
  91.                 document.getElementById('b'+next_i).className='bfg_ntopa';
  92.         }

  93. }

  94. window.onload = interval_view;

  95. </script>
  96. <div class="mainbox forumlist">
  97.                                 <span class="headactions">
  98.                                 <!--{if $cat['moderators']}-->{lang forum_category_modedby}: $cat[moderators]<!--{/if}-->
  99.                                 <img id="category_$cat[fid]_img" src="{IMGDIR}/collapsed_no.gif" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
  100.                         </span>
  101.                        
  102.                                 <h3>◇ $geyanline_7ree ◆</h3>

  103.                 <table cellspacing="0" cellpadding="0"  id="category_$cat[fid]" summary="category$cat[fid]" cellspacing="0" cellpadding="0" style="$collapse['category_'.$cat[fid]]">
  104.                                 <thead class="category">
  105.                                         <tr>
  106.                                                 <td width="25%" align="center" style="border-right:#CCCCCC solid; border-width:1px;"><b>精彩贴图</b></td>
  107.                         <td width="30%" align="center" style="border-right:#CCCCCC solid; border-width:1px;"><table align="center" cellpadding="0" cellspacing="0" border="0"><tr>
  108.                                 <td align="center" class="bfg_ntopa" id="c0" onMouseOver="javascript:view(0);" onMouseOut="javascript:recall_show_view();"><img src="images/common/newspost.gif" align="absmiddle" />最新话题</td>
  109.                                 <td align="center" class="bfg_ntopb" id="c1" onMouseOver="javascript:view(1);" onMouseOut="javascript:recall_show_view();"><img src="images/common/newsreply.gif" align="absmiddle" />最新回复</td>

  110.                                 <td align="center" class="bfg_ntopb" id="c2" onMouseOver="javascript:view(2);" onMouseOut="javascript:recall_show_view();"><img src="images/common/hotpost.gif" align="absmiddle" />推荐精华</td>
  111.                         </tr></table></td>
  112.                         <td width="23%" align="center" style="border-right:#CCCCCC solid; border-width:1px;"><b>≡ 社区超男(超女) ≡</b></td>
  113.                         <td width="22%" align="center" style="border-right:#CCCCCC solid; border-width:1px;"><table align="center" cellpadding="0" cellspacing="0" border="0"><tr>
  114.                                 <td align="center" class="bfg_ntopa" id="b0" onMouseOver="javascript:view2(0);" onMouseOut="javascript:recall_show_view();">财富排行</td>
  115.                                 <td align="center" class="bfg_ntopb" id="b1" onMouseOver="javascript:view2(1);" onMouseOut="javascript:recall_show_view();">悍匪排行</td>
  116.                                 <td align="center" class="bfg_ntopb" id="b2" onMouseOver="javascript:view2(2);" onMouseOut="javascript:recall_show_view();">宠物排名</td>
  117.                         </tr></table></td>

  118.                 </tr>
  119.                 </thead>
  120.                 <tr>

  121.                         <td align="center"><script src="pic.php" type="text/javascript"></script></td>
  122.                         <td style="border-left:#CCCCCC solid; border-right:#CCCCCC solid;border-width:1px" valign=top>                               
  123.                
  124.                               <ul id="d0" style="display:block" class=table>                       
  125.       <!--{loop $new_post_threadlist $nthread}-->


  126.                                                                                                               <li><cite style="float:right"><a href="space.php?uid={$nthread[authorid]}" title="查看{$nthread[author]}的个人空间" target="_blank">{$nthread[author]}</a></cite><img src="images/common/list.gif" border="0" /> [<a href="redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost" title="转入查看最后回复的内容">新帖</a>] <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></li>
  127.         <!--{/loop}-->                                                                               </ul>                       
  128.                         <ul id="d1" style="display:none" class=table>
  129.       <!--{loop $new_reply_threadlist $nthread}-->
  130.                                                                                                               <li><cite style="float:right">{$nthread[lastposter]}</cite><img src="images/common/list.gif" border="0" /> [<a href="redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost" title="转入查看最后回复的内容">回复</a>] <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></li>
  131.         <!--{/loop}-->

  132.                         </ul>
  133.                         <ul id="d2" style="display:none" class=table>
  134.       <!--{loop $new_hot_threadlist $nthread}-->

  135.                                                                                                       <li><cite style="float:right"><a href="space.php?uid={$nthread[authorid]}" title="查看{$nthread[author]}的个人空间" target="_blank">{$nthread[author]}</a></cite><img src="images/common/list.gif" border="0" /> [<a href="redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost" title="转入查看最后回复的内容">精华</a>] <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></li>
  136.         <!--{/loop}-->

  137.                           
  138. </ul>                </td>                       
  139.                 <td valign="top">  <b><font color={$mem_star[color]}>{$mem_star[grouptitle]}</font></b><table width='100%'><tr><td style='border-width:0px;'>姓名:<a href='space.php?uid=1752'><b>{$mem_star[bestmem]}</b></a>
  140. UID  :<b>{$mem_star[uid]}</b>
  141. 积分:{$mem_star[credits]}
  142. 精华:{$mem_star[digestposts]} 篇
  143. 今日发帖:<font color=red><b>{$mem_star[bestmemposts]}</b></font>
  144. 总发帖量:{$mem_star[posts]}
  145. 在线时间:{$mem_star[oltime]} h
  146.   来自:{$mem_star[location]}</td><td style='border-width:0px;'> <img src="{$mem_star[avatar]}" width=62 height=81 align=center>
  147. {eval showstars($mem_star['stars']);}</td></tr></table></td>

  148.                 <td valign="top" style="border-left:#CCCCCC solid; border-right:#CCCCCC solid;border-width:1px">
  149.                 <ul id="e0" style="display:block" class=table>       
  150. <!--{loop $richer_list $richer}-->
  151.                                                                                                       <li><cite style="float:right">{$richer[total_money]}刀</cite><img src="images/common/list.gif" border="0" /> <a href="space.php?uid={$richer[uid]}" title="查看{$richer[username]}的个人空间" target="_blank">{$richer[username]}</a></li>
  152.                                                                                                                                 <!--{/loop}-->
  153.                 </ul>
  154.                 <ul id="e1" style="display:none" class=table>       
  155. <!--{loop $robber_list $robber}-->


  156.                                                                                                       <li><cite style="float:right">抢{$robber[rob_times]}次/{$robber[rob_amount]}刀</cite><img src="images/common/list.gif" border="0" /> <a href="space.php?uid={$robber[uid]}" title="查看{$robber[username]}的个人空间" target="_blank">{$robber[username]}</a></li>
  157.                                                                                                                                 <!--{/loop}-->

  158.                 </ul>
  159.                 <ul id="e2" style="display:none" class=table>       
  160. <!--{loop $pettoplist $pettopinfo}-->
  161.                                                                                                       <li><cite style="float:right">$pettopinfo[mypetjob]转/$pettopinfo[mypetlevel]级</cite><img src="images/common/list.gif" border="0" /> <a href="pet.php?index=viewpet&username=$pettopinfo[usernameenc]">$pettopinfo[petname]</a></li>
  162.                                                 <!--{/loop}-->
  163.                 </ul>
  164.                   </td>
  165.   </tr>
  166. </table>
  167. </div>
  168. <!-- 首页四格代码结束 -->
复制代码
最后, 更新缓存即可~~

要修改图片显示的, 请打开根目录下的pic.php修改, 里面有说明, 记得要修改啊..因为pic.php里面是显示我的论坛的版块的图片

再最后, 有问题请跟帖回复...

[ 本帖最后由 Ricky_Yahoo 于 2007-12-9 20:07 编辑 ]

首页四格(帖子类型轮流变换+发帖之星+财富,悍匪,宠物排行榜)).rar (24.35 KB)

最后更新日期: 11月23日7:30

····················

[ 本帖最后由 PcBeta.Com 于 2007-11-23 21:57 编辑 ]
呵呵。。不知道为什么我发的帖子被说成含有什么文字不能发布..后来搞了一下。。原来是我的代码里面有个"会员自 x 拍" 所以给禁止发布...所以LSD你看到是半段的。。后来我去掉了,可以发布了。。。
支持。。。收藏先
一个要求,怎么屏蔽某些板块的帖子不要被五格调用啊。
我轻轻的走了,正如我轻轻的来。扣一下扳机,不留下一个活口!
宠物没有装.
怎么把宠物改成虚拟形象和去掉社区超女超男这一栏
支持,强烈支持,可否给出那些排行榜的单独调用代码,我想插到我的论坛里去,谢谢了。
所有的n格图片显示都把图片切成了一半,不知这个怎么改变!
个人开站,实惠、稳定才是硬道理!至强四核服务器先使用后付费
联系方式:13598871563      QQ:330599776
我只想要最新贴、回复贴、精华贴的变换!后边我不想要,应该怎么修改!
个人开站,实惠、稳定才是硬道理!至强四核服务器先使用后付费
联系方式:13598871563      QQ:330599776
不错--顶了,等装完插件就换
返回列表