找回密码
 注册
查看: 13196|回复: 21
收起左侧

首页四格调用插件+主题加亮显示PHPWind7.5/7.3.2/7.0

  [复制链接]

5312

主题

8317

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

积分
14660
帖子
8317
精华
67
体力
14660 点
蓝豆
2391 点
注册时间
2007-6-8

终身成就奖LY官方团队会员身份ID卡

发表于 2009-12-12 23:29:34 | 显示全部楼层 |阅读模式
55.jpg
1.上传images文件夹覆盖
2.修改代码wind/index.htm
查找
  1. <!--<?php print <<<EOT
  2. -->
复制代码

修改为
  1. <!--<?php
  2. //首页调用开始
  3. //默认只显示开放、正规板块,不显示隐藏、投票、认证板块
  4. //幻灯图开始
  5. $cachepics=R_P."data/bbscache/index_toppics111.php";//幻灯图片缓存文件
  6. $cachepicstime=60;//幻灯图片缓存自动更新时间,单位秒
  7. //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
  8. $showforum="(pf.f_type = forum or pf.f_type = former)";
  9. if (($timestamp-@filemtime($cachepics)>=$cachepicstime)){
  10. $query=$db->query("SELECT pt.tid,pt.fid,pt.subject,pa.attachurl FROM pw_threads pt
  11. ,pw_attachs pa,pw_forums pf where pt.tid = pa.tid and pt.fid = pf.fid and pa.type=img and pt.ifcheck=1 and ".$showforum." and pf.password =  
  12. ORDER BY pt.postdate DESC
  13. LIMIT 60
  14. "); //可以根据需要调整,我这里是估算每个主题有10张图片的情况下。
  15. $imgcontent="<?php\\n";
  16. $pics=$links=$texts="";
  17. $rs_i=0;
  18. while ($imginfo = $db->fetch_array($query) and $rs_i<5) {//只调用6个主题的图片
  19. if(($rs_tid!=$imginfo[tid])&&(eregi("\\.(jpg)$",$imginfo[attachurl]))){
  20. $pics.=$db_bbsurl."/".$attachpath."/".$imginfo[attachurl]."|";
  21. $links.=$db_bbsurl."/read.php?tid=".$imginfo[tid]."|";
  22. $texts.=$imginfo[subject]."|";
  23. $rs_i++;//同一主题的只要最后上传的那张图片
  24. }
  25. $rs_tid=$imginfo[tid];
  26. }
  27. $pics=substr($pics,0,-1);
  28. $links=substr($links,0,-1);
  29. $texts=substr($texts,0,-1);
  30. $pics=$pics=".$pics.";;
  31. $links=$links=".$links.";;
  32. $texts=$texts=".$texts.";;
  33. $imgcontent = $imgcontent.$pics."\\n".$links."\\n".$texts."\\n?>";
  34. writeover($cachepics,$imgcontent);
  35. }
  36. @require_once($cachepics);
  37. //幻灯图结束
  38. //会员排行+主题排行开始
  39. $cachelist=R_P."data/bbscache/index_toplist.php";//主题排行缓存文件
  40. $cachelisttime=5;//主题排行自动更新时间,单位秒
  41. //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
  42. $showforum="(pf.f_type = forum or pf.f_type = former)";
  43. if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
  44. $listnum=10;//主题显示个数
  45. $listlength=30;//主题标题长度
  46. $listnum1=10;//会员在线时间排行显示个数
  47. $memberonline=$memberposttoday=$newthreads=$hitsthreads=$replythreads="";
  48. //最新发表主题开始
  49. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.hits,pt.titlefont FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck=1 and ".$showforum." and pf.password =  order by pt.postdate desc limit 0,$listnum");
  50. while($threads=$db->fetch_array($query)){
  51. $threads[postdate]=get_date($threads[postdate]);
  52. $threads[subject]=substrs($threads[subject],$listlength);
  53. //以下调用原主题的颜色样式
  54. if ($threads[titlefont]){
  55. $titledetail=explode("~",$threads[titlefont]);
  56. if($titledetail[0])$threads[subject]="<font color=$titledetail[0]>$threads[subject]</font>";
  57. if($titledetail[1])$threads[subject]="<b>$threads[subject]</b>";
  58. if($titledetail[2])$threads[subject]="<i>$threads[subject]</i>";
  59. if($titledetail[3])$threads[subject]="<u>$threads[subject]</u>";
  60. }
  61. //以上调用原主题的颜色样式
  62. $newthreads.="<a href=read.php?tid=$threads[tid] title=主题:$threads[subject]\\n作者:$threads[author]\\n时间:$threads[postdate]\\n浏览:$threads[hits] 次\\n>$threads[subject]</a><br />";
  63. $c_i++;
  64. }
  65. unset($threads);
  66. unset($c_i);
  67. //最新发表主题结束
  68. //社区精华主题开始
  69. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pt.titlefont FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck=1 and pt.digest > 0 and ".$showforum." and pf.password =  order by pt.postdate desc limit 0,$listnum");
  70. while($threads=$db->fetch_array($query)){
  71. $threads[postdate]=get_date($threads[postdate]);
  72. $threads[lastpost]=get_date($threads[lastpost]);
  73. $threads[subject]=substrs($threads[subject],$listlength);
  74. //以下调用原主题的颜色样式
  75. if ($threads[titlefont]){
  76. $titledetail=explode("~",$threads[titlefont]);
  77. if($titledetail[0])$threads[subject]="<font color=$titledetail[0]>$threads[subject]</font>";
  78. if($titledetail[1])$threads[subject]="<b>$threads[subject]</b>";
  79. if($titledetail[2])$threads[subject]="<i>$threads[subject]</i>";
  80. if($titledetail[3])$threads[subject]="<u>$threads[subject]</u>";
  81. }
  82. //以上调用原主题的颜色样式
  83. $digestthreads.="<a href=read.php?tid=$threads[tid] title=主题标题:$threads[subject]\\n主题作者:$threads[author]\\n发表时间:$threads[postdate]\\n浏览次数:$threads[hits] 次\\n最新回复:$threads[lastposter]\\n回复时间:$threads[lastpost]\\n回复次数:$threads[replies] 次\\n>$threads[subject]</a><br />";
  84. $c_i++;
  85. }
  86. unset($threads);
  87. unset($c_i);
  88. //社区精华主题结束
  89. //最新回复主题开始
  90. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pt.titlefont FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = 1 and pt.replies > 0 and ".$showforum." and pf.password =  order by lastpost desc limit 0,$listnum");
  91. while($threads=$db->fetch_array($query)){
  92. $threads[postdate]=get_date($threads[postdate]);
  93. $threads[lastpost]=get_date($threads[lastpost]);
  94. $threads[subject]=substrs($threads[subject],$listlength);
  95. //以下调用原主题的颜色样式
  96. if ($threads[titlefont]){
  97. $titledetail=explode("~",$threads[titlefont]);
  98. if($titledetail[0])$threads[subject]="<font color=$titledetail[0]>$threads[subject]</font>";
  99. if($titledetail[1])$threads[subject]="<b>$threads[subject]</b>";
  100. if($titledetail[2])$threads[subject]="<i>$threads[subject]</i>";
  101. if($titledetail[3])$threads[subject]="<u>$threads[subject]</u>";
  102. }
  103. //以上调用原主题的颜色样式
  104. $replythreads.="<a href=read.php?tid=$threads[tid]&page=e#a title=主题标题:$threads[subject]\\n主题作者:$threads[author]\\n发表时间:$threads[postdate]\\n浏览次数:$threads[hits] 次\\n最新回复:$threads[lastposter]\\n回复时间:$threads[lastpost]\\n回复次数:$threads[replies] 次\\n>$threads[subject]</a><br />";
  105. $c_i++;
  106. }
  107. unset($threads);
  108. unset($c_i);
  109. //最新回复主题结束
  110. @writeover($cachelist,"<?php\\n\\$memberonline=\\"$memberonline\\";\\n\\$memberposttoday=\\"$memberposttoday\\";\\n\\$newthreads=\\"$newthreads\\";\\n\\$digestthreads=\\"$digestthreads\\";\\n\\$activitythreads=\\"$activitythreads\\";\\n\\$replythreads=\\"$replythreads\\";\\n\\$randtreads=\\"$randtreads\\";\\n?>");
  111. }
  112. @require_once($cachelist);
  113. //会员排行+主题排行结束
  114. //首页调用结束
  115. print <<<EOT
  116. -->
复制代码

再查找:
  1. <span class="gray2" style="padding:3px"><a href="job.php?action=tag&tagname=$rawkey">$key</a>($val)</span>
  2. <!--
  3. EOT;
  4. }print <<<EOT
  5. -->
  6. </td>
  7. </tr>
  8. </table>
  9. </div>
  10. <!--
  11. EOT;
  12. }print <<<EOT
  13. -->
复制代码

修改为:

游客,如果您要查看本帖隐藏内容请回复

首页四格+加亮显示FOR_PW7[1].5_7.3.2_7.0.rar

175 KB, 下载次数: 72, 下载积分: 体力 -1 点

出售国内或美国高性能虚拟空间,高速VPS以及服务器! 同时承接各种类型的网站制作,网站维护,支付宝交易安全放心!    联系QQ:6102031
懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

网站公告上一条 /2 下一条

GMT+8, 2024-4-19 17:43 , Processed in 0.125000 second(s), 28 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

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