免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
帖子
发帖
查看: 4万|回复: 7
上一主题 下一主题 打印

[教学] 仿火狼首页N格无图版,不用担心外链失效!   精华 2 [复制链接]

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

x
此版本没有使用1张图片!不用担心失效,新手安装更简单!
精简一些无用的css。


微信截图_20201209204729.png
2020-12-9 20:55


1、后台导入数据调用文件
discuz_request_20201209.rar (2.91 KB)

2、新建模板命名为 huolangX 放入下边代码。
  1. <style>
  2. .dx-icon-1{position: relative;height: 25px;line-height: 25px;border-bottom: 1px dashed #CDCDCD;}
  3. .dx-icon-1 cite {float: right;padding-left: 8px;clear: both;color: #666;}
  4. .dx-pl {table-layout: fixed;height: 25px;overflow: hidden;display: block;margin-left: 22px}
  5. #tab_c li span a{color: #369;}
  6. #huolang {margin-top: 42px;}
  7. .tlb_show .com-1 {width: 35.93%;height: 245px;float: left;border-right: solid 1px #b1c9dc;}
  8. .tlb_show .com-2 {width: 45.93%;height: 245px;float: left;border-right: solid 1px #b1c9dc;}
  9. .tlb_show .com-3 {width: 17.923%;height: 245px;float: left;}
  10. .tlb-topm ul {height: 30px;}
  11. .tlb-topm li {float: left;line-height: 31px;text-align: center;width: 50px;border-right: 1px solid #ccc;cursor: pointer;}
  12. .tlb-disma {display: block;}
  13. .tlb-disma li{list-style: none;}
  14. .tlb-undisa {display: none;}
  15. .tlb-dis {display: block;}
  16. .tlb-dism {display: block;list-style: none;}
  17. .tlb-undis {display: none;}
  18. .tlb-dis span a {color: #2E9AFE;}
  19. .tlb-undism {display: none;}
  20. .tlb_show .txt td {padding: 0; vertical-align: top;}
  21. .tlb_show .txt span {float: right; color: #07519a;}
  22. .icont{height:200px;}
  23. .icont li span{right:5px;top:0px;position:absolute;}
  24. .tongji_a {margin:42px 0 0 0;clear: both;overflow: hidden;line-height:23px;}
  25. #tongji {line-height: 30px;}
  26. .tlb_show {height: 245px; margin: 0 0 10px 0; border: solid 1px #b1c9dc;}
  27. .tlb-topm {background: #f0f0f0;border-bottom: 1px solid #ccc;}
  28. .tlb-normal1 {color: #999;}
  29. .tlb-hover1 {color: #369;font-weight: bold;background: #fff;}
  30. .bm_h {background: #E5EDF2;padding: 0 10px;height: 31px;border: 1px solid #C2D5E3;border-bottom: none;line-height: 31px;white-space: nowrap;overflow: hidden;}
  31. .hide{display:none;}
  32. #tab_t{height: 30px;background: #f0f0f0;border-bottom: 1px solid #ccc;}
  33. #tab_t li {float: left;width: 80px;line-height: 31px;height: 30px;text-align: center;border-right: 1px solid #ccc;border-bottom: none;background: #f0f0f0;cursor: pointer;color:#999;}
  34. #tab_t .act {position: relative;height: 31px;margin-bottom: -1px;background: #fff;color: #369;font-weight: bold;}
  35. #tab_c{padding:4px;height: 209px;}
  36. #tab_c li {position: relative;height: 25px;line-height: 26px;padding: 0px 5px 0px 25px;text-align: left;margin-right: 0px;clear: both;border-bottom: 1px dashed #CDCDCD;}
  37. #tab_c li span {right: 5px;top: 0px;position: absolute;}
  38. #tab_c li:after{content: "";display: inline-block;width: 18px;height: 18px;line-height: 18px;text-align: center;color: #FFF;background: #999999;position: absolute;left: 0;top: 4px;}
  39. #tab_c li:first-child:after {content: "1";background: #FD8C84;}
  40. #tab_c li:nth-child(2):after {content: "2";background: #FFCC99;}
  41. #tab_c li:nth-child(3):after {content: "3";background: #7FD75A;}
  42. #tab_c li:nth-child(4):after {content: "4";background: #CCCCFF;}
  43. #tab_c li:nth-child(5):after {content: "5";background: #60C4FD;}
  44. #tab_c li:nth-child(6):after {content: "6";}
  45. #tab_c li:nth-child(7):after {content: "7";}
  46. #tab_c li:nth-child(8):after {content: "8";}
  47. #tongji p:first-child:after {content: "®";color: #4284ce;font-size: 18px;}
  48. #tongji p:after {display: inline-block;line-height: 28px;text-align: center;float: left;width: 26px;}
  49. .tlb-dism li:after{content: "";display: inline-block;line-height: 20px;text-align: center;position: absolute;top: 2px;}
  50. .tlb-dism li:first-child:after {content: "♛";color: #FD8C84;font-size:20px;}
  51. .tlb-dism li:nth-child(2):after {content: "♚";color: #FFCC99;font-size:20px;}
  52. .tlb-dism li:nth-child(3):after {content: "♕";color: #7FD75A;font-size:20px;}
  53. .tlb-dism li:nth-child(4):after {content: "♔";color: #CCCCFF;font-size:20px;}
  54. .tlb-dism li:nth-child(5):after {content: "♖";color: #60C4FD;font-size:20px;}
  55. .tlb-dism li:nth-child(6):after {content: "❤";color: #F26521;font-size:18px;}
  56. .tlb-dism li:nth-child(7):after {content: "❤";color: #F26521;font-size:18px;}
  57. .tlb-dism li:nth-child(8):after {content: "❤";color: #F26521;font-size:18px;}
  58. </style>

  59. <div id="huolang">
  60. <div id="tongji">
  61. <p class="chart"><em class="tj">{lang index_today}:</em> <em>$todayposts</em><span class="pipe">|</span><em class="tj">{lang index_yesterday}:</em> <em>$postdata[0]</em><span class="pipe">|</span><em class="tj">{lang index_posts}:</em> <em>$posts</em><span class="pipe">|</span><em class="tj">会员:</em> <em>{eval $xunirenshu=$totalmembers *10;}$xunirenshu</em><span class="pipe">|</span><em class="tj">欢迎新会员:</em> <em><a href="space.php?username=$memberenc" target="_blank" class="xi2">{eval request('仿火狼X_新注册会员');}</a></em></p>
  62. </div>
  63. <div style="margin-top: -25px;float: right;">
  64. <!--{if $discuz_uid}--><a href="my.php?item=threads" title="我的帖子" class="xi2">我的帖子</a><span class="pipe">|</span><!--{/if}--><a href="search.php?srchfrom=604800&amp;searchsubmit=yes" title="最新回复" class="xi2">最新回复</a>
  65. </div>

  66. <div class="bm_h cl">
  67. <script type="text/javascript" src='http://icode.258club.com/templates/colors/mrmy.htm'></script>                       
  68. </div>

  69. <script type="text/javascript" src="http://icode.258club.com/templates/colors/js1.htm" ></script>
  70. <script type="text/javascript" src="http://icode.258club.com/templates/colors/js2.htm" ></script>

  71. <div id="duceapp_xhome" class="tlb_show dx-bm dx-forum" config="{'timeout':500,'blockswitch':5000,'event':'click','tabavgranks':1,'preview':1}">
  72. <div class="com-1">
  73. <div class="tlb-disma" id="tbca_01">
  74. {eval request('仿火狼X_精彩图片');}
  75. <script type="text/javascript">new dk_slideplayer("#tbca_01",{width:"100%",height:"245px",fontsize:"12px",time:"5000"});</script>
  76. </div>
  77. </div>  

  78. <div class="com-2">
  79.   <ul id="tab_t">
  80.     <li class="act">最新主题</li>
  81.     <li>最新回复</li>
  82.     <li>精华主题</li>
  83.     <li>热门主题</li>
  84.   </ul>
  85.   <div id="tab_c">
  86.     <div>{eval request('仿火狼X_最新主题');}</div>
  87.     <div class="hide">{eval request('仿火狼X_最新回复');}</div>
  88.     <div class="hide">{eval request('仿火狼X_精华帖子');}</div>
  89.     <div class="hide">{eval request('仿火狼X_本周热门');}</div>
  90.   </div>
  91. </div>

  92. <div class="com-3">
  93. <div id="tb_" class="tlb-topm">
  94. <ul>
  95. <li id="tbm_1" onmouseover="x:HoverLim(1);" class="tlb-hover1">活跃</li>
  96. <li id="tbm_2" onmouseover="x:HoverLim(2);" class="tlb-normal1">财神</li>
  97. <li id="tbm_3" onmouseover="x:HoverLim(3);" class="tlb-normal1">明星</li>
  98. </ul>
  99. </div>
  100. <div class="tlb-dism" id="tbcm_01" style="width:98%; margin: 4px auto;">
  101. {eval request('仿火狼X_积分飙升榜');}
  102. </div>
  103. <div class="tlb-undism" id="tbcm_02" style="width:98%; margin: 4px auto;">
  104. {eval request('仿火狼X_金币飙升榜');}
  105. </div>
  106. <div class="tlb-undism" id="tbcm_03">
  107. {eval request('仿火狼X_本周之星');}
  108. </div>
  109. </div>
  110. </div>
  111. {eval request('仿火狼X_新会员');}
  112. </div>

  113. <script>
  114. function g(o) {
  115.     return document.getElementById(o);
  116. }

  117. function HoverLi(n) {
  118.     for(var i=1;i<=5;i++) {
  119.         g('tb_'+i).className='tlb-normal';
  120.         g('tbc_0'+i).className='tlb-undis';
  121.    }
  122.     g('tbc_0'+n).className='tlb-dis';
  123.     g('tb_'+n).className='tlb-hover';
  124. }
  125. function HoverLim(n) {
  126.     for(var i=1;i<=3;i++) {
  127.         g('tbm_'+i).className='tlb-normal1';
  128.         g('tbcm_0'+i).className='tlb-undism';
  129.    }
  130.     g('tbcm_0'+n).className='tlb-dism';
  131.     g('tbm_'+n).className='tlb-hover1';
  132. }
  133. function HoverLia(n) {
  134.     for(var i=1;i<=2;i++) {
  135.         g('tba_'+i).className='tlb-normal2';
  136.         g('tbca_0'+i).className='tlb-undisa';
  137.    }
  138.     g('tbca_0'+n).className='tlb-disma';
  139.     g('tba_'+n).className='tlb-hover2';
  140. }   
  141. </script>
  142. <script>
  143. window.onload = function(){

  144.     tab("tab_t","li","tab_c","div","onmouseover")
  145.     function tab(tab_t,tab_t_tag,tab_c,tag_c_tag,evt){
  146.         var tab_t = document.getElementById(tab_t);
  147.         var tab_t_li = tab_t.getElementsByTagName(tab_t_tag);
  148.         var tab_c = document.getElementById(tab_c);
  149.         var tab_c_li = tab_c.getElementsByTagName(tag_c_tag);
  150.         var len = tab_t_li.length;
  151.         var i=0;
  152.         var timer = null;
  153.         var num=0;
  154.             for(i=0; i<len; i++){
  155.                 tab_t_li[i].index = i;
  156.                 tab_t_li[i][evt] = function(){
  157.                   clearInterval(timer);
  158.                     num = this.index;
  159.                     tab_change()
  160.                }
  161.                 tab_t_li[i].onmouseout = function(){
  162.                     autoplay();
  163.                }
  164.            }
  165.         
  166.         function tab_change(){
  167.             for(i=0; i<len; i++){
  168.                 tab_t_li[i].className = '';
  169.                 tab_c_li[i].className = 'hide';
  170.            }
  171.             tab_t_li[num].className = 'act';
  172.             tab_c_li[num].className = '';
  173.        }
  174.         
  175.         function autoplay(){
  176.           timer = setInterval(function(){
  177.               num++;
  178.                 if(num>=len) num=0;
  179.               tab_change();
  180.            },10000);
  181.        }
  182.         autoplay();
  183.    }
  184.    
  185. }
  186. </script>
复制
3、在discuz模板找到
  1. $pluginhooks[index_header]
复制
在下边加
  1. {subtemplate huolangX}
复制
提交即可。

最近看过此主题的会员

李奥
访问时间:2023-10-01 18:39
Yenifer
访问时间:2023-08-11 22:11
你好世界
访问时间:2023-08-01 21:25
米酷
访问时间:2023-05-15 20:34
秦腔小王子
访问时间:2023-05-05 09:24
琼斯博士
访问时间:2022-12-05 15:52
icode
访问时间:2022-10-16 13:01
我爱建站
访问时间:2022-04-25 13:47
五月向南
访问时间:2022-03-21 10:00

打赏

取消

感谢您的支持,我会继续努力的!

扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

Powered by 爱秀代码,分享从这里开始,精彩与您同在

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

看帖回帖那是一定要的:哈哈!好资源,拿走了!
发帖际遇:琪乐 发帖时在路边被老奶奶碰瓷,花掉10金钱
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

名言句子能自己设定吗?
还有会员数量我这里变成了120
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

看帖回帖那是一定要的:打酱油路过,不关我的事!
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

发帖际遇:icode 弯腰捡起了一块肥皂,被人进行了不可描述,获得了 27 威望作为补偿
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

看帖回帖那是一定要的:精彩至极,文章写的真棒,对我非常有帮助

点评

icode   

   发表于 2021-4-11 21:05 

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

好久不见 回来看看呀~

点评

icode   

最近忙啥呢?    发表于 2021-5-27 17:54 

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

楼主太厉害了!I*老*虎*U!
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

TOP

发帖
B Color Image Link Quote Code Smilies
高级模式 | 发新话题

 
您需要登录后才可以回帖 登录|立即注册 
快速
返回顶部
返回首页