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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[原创]童虎老师的whatsnew中的任意项目在首页下拉

[复制链接]
lu5266 发表于 2005-8-23 16:47:05 | 显示全部楼层 |阅读模式
童虎老师的whatsnew中的任意项目在首页下拉

说明下:
其实这个有人认为不直观,个人认为是比较方便,不占篇幅

童虎老师的whatsnew,实在是太好了,你要什么有什么:
总积分排行
发贴总数排行
精华帖排行
新会员列表.......................

我是昨天发了首页热门贴下拉
有人说:要新回复排行  但是首页热门贴没有这个

我搜索,就搜索到了童虎老师的whatsnew(我以前没用过),根据我原来的稍做修改.就得了这个咯
================================================================


演示:
www.5466.ik8.com (空间比较烂,经常无故白板,看不见的话,二楼截图)



安装条件:
安装: 童虎老师的whatsnew
https://discuz.dismall.com/viewth ... &extra=page%3D1



第一步:修改模板index.htm

查找:

  1. <!--{if !empty($newpmexists)}-->
  2.         {template pmprompt}
  3. <!--{/if}-->
复制代码


在下面加上:

  1. <!-- whatsnew  hack -->
  2. {template show_whatsnew}
  3. <!--whatsnew hack end -->
复制代码


第二步:

新建立一个模板文件: show_whatsnew.htm


示例的(我的,因为这个根据需要修改)
show_whatsnew.htm



  1. <table  id=hot_topic_board border="0" cellspacing="0" cellpadding="0" width="{TABLEWIDTH}" bgcolor="{BORDERCOLOR}" align="center"><tr><td>
  2. </td></tr></table>

  3. <br>
  4. <table onmouseover=show_hot_topic(hot_topic,1) border="0" cellspacing="1" cellpadding="1"  height="26" width="{TABLEWIDTH}" bgcolor="{BORDERCOLOR}" align="center">

  5. <tr class="header">

  6. <td width="25%" align="center"><span class="rainbow">▼论坛最新主题▼</span> </td>
  7. <td width="25%" align="center"><span class="rainbow">▼最新回复主题▼</span> </td>
  8. <td width="25%" align="center"><span class="rainbow">▼论坛精华主题▼</span> </td>
  9. <td width="25%" align="center"><span class="rainbow">▼论坛最热主题▼</span> </td>
  10. </tr>

  11. </table>
  12. <div id=hot_topic  style='position:absolute;visibility:hidden' >
  13. <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}"><tr><td>
  14. <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" style="table-layout: fixed; word-wrap: break-word"  >
  15. <tr>

  16. <td width="25%"  bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  17. <script src="whatsnew.php?feature=1&length=28&orderby=3&items=10&digest=0"></script>

  18. </td>
  19. <td width="25%"  bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  20. <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=0"></script>

  21. </td>

  22. <td width="25%"  bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  23. <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=1"></script>

  24. </td>

  25. <td width="25%"  bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  26. <script src="whatsnew.php?feature=1&length=28&orderby=1&items=10"></script>
  27. </td>





  28. </tr>
  29. </table></td></tr></table></div>

  30. <script language=javascript>
  31. var objname = "";
  32. var H1Visible = 0;
  33. hot_topic.style.left=hot_topic_board.offsetLeft
  34. function show_hot_topic(objname,showmethod){
  35. if (objname != ""){
  36. if (showmethod==1){
  37. objname.style.visibility="visible";
  38. H1Visible = 1;}
  39. else{
  40. objname.style.visibility="hidden";
  41. H1Visible = 0; }
  42. }
  43. }
  44. </script>
  45. <script language="javascript">

  46. var where = "";
  47. function checkwhere(e) {
  48. if (document.layers){
  49. xCoord = e.x;
  50. yCoord = e.y;
  51. }
  52. else if (document.all){
  53. xCoord = event.clientX;
  54. yCoord = event.clientY;
  55. }
  56. else if (document.getElementById){
  57. xCoord = e.clientX;
  58. yCoord = e.clientY;
  59. }
  60. yCoord=yCoord+document.body.scrollTop;
  61. if ((xCoord<hot_topic_board.offsetLeft || xCoord> hot_topic_board.offsetWidth+hot_topic_board.offsetLeft || yCoord<hot_topic_board.offsetTop || yCoord> hot_topic.offsetTop+hot_topic.offsetHeight) & H1Visible)
  62. show_hot_topic(hot_topic,0);
  63. }
  64. document.onmousemove = checkwhere;
  65. if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
  66. </script>
复制代码



第三步:上传文件,更新缓存.
OK


===========================================================
说明:


<tr class="header">

<td width="25%" align="center"><span class="rainbow">▼论坛最新主题▼</span> </td>
<td width="25%" align="center"><span class="rainbow">▼最新回复主题▼</span> </td>
<td width="25%" align="center"><span class="rainbow">▼论坛精华主题▼</span> </td>
<td width="25%" align="center"><span class="rainbow">▼论坛最热主题▼</span> </td>
</tr>



这个是你要显示的项目;你自己修改

  1. <td width="25%"  bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  2. <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=0"></script>

  3. </td>
复制代码



这个是你的项目对应的调用童虎老师的whatsnew的代码(src=......)


还有
我这个在窄风格排版就完全没移位,宽风格有一点点

你可以单个风格来修改(不要直接是默认的)
这个是排版的问题
我不懂解决

哈哈

斑竹Tommy很会改的
嘿嘿

还是自己动手好些哦

[ 本帖最后由 lu5266 于 2005-8-23 23:18 编辑 ]

评分

1

查看全部评分

 楼主| lu5266 发表于 2005-8-23 16:48:28 | 显示全部楼层
占位
截图

[ 本帖最后由 lu5266 于 2005-8-23 17:04 编辑 ]
回复

使用道具 举报

freddy 发表于 2005-8-23 16:55:54 | 显示全部楼层
我的沙发...
回复

使用道具 举报

 楼主| lu5266 发表于 2005-8-23 17:05:35 | 显示全部楼层
原帖由 freddy 于 2005-8-23 16:55 发表
我的沙发...

哈哈
回复

使用道具 举报

freddy 发表于 2005-8-23 17:08:49 | 显示全部楼层
LULU你好棒!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
回复

使用道具 举报

 楼主| lu5266 发表于 2005-8-23 17:18:31 | 显示全部楼层
原帖由 freddy 于 2005-8-23 17:08 发表
LULU你好棒!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


呵呵
回复

使用道具 举报

爱雨冷雪 发表于 2005-8-23 18:20:17 | 显示全部楼层
嘻嘻,感谢啊....晚上回来装~~!
回复

使用道具 举报

屁股超人 发表于 2005-8-23 19:05:44 | 显示全部楼层
感谢感谢,不过请问一下,资料多久会刷新一次?
回复

使用道具 举报

 楼主| lu5266 发表于 2005-8-23 19:31:41 | 显示全部楼层
原帖由 屁股超人 于 2005-8-23 19:05 发表
感谢感谢,不过请问一下,资料多久会刷新一次?

童虎老师的whatsnew那里可以随便你修改啊
回复

使用道具 举报

xjbl 发表于 2005-8-23 19:40:44 | 显示全部楼层
呵呵,还行...支持.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-3 18:40 , Processed in 0.103643 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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