童虎老师的whatsnew中的任意项目在首页下拉
说明下:
其实这个有人认为不直观,个人认为是比较方便,不占篇幅
童虎老师的whatsnew,实在是太好了,你要什么有什么:
总积分排行
发贴总数排行
精华帖排行
新会员列表.......................
我是昨天发了首页热门贴下拉
有人说:要新回复排行 但是首页热门贴没有这个
我搜索,就搜索到了童虎老师的whatsnew(我以前没用过),根据我原来的稍做修改.就得了这个咯
================================================================
演示:
www.5466.ik8.com (空间比较烂,经常无故白板,看不见的话,二楼截图)
安装条件:
安装: 童虎老师的whatsnew
https://discuz.dismall.com/viewth ... &extra=page%3D1
第一步:修改模板index.htm
查找:
- <!--{if !empty($newpmexists)}-->
- {template pmprompt}
- <!--{/if}-->
复制代码
在下面加上:
- <!-- whatsnew hack -->
- {template show_whatsnew}
- <!--whatsnew hack end -->
复制代码
第二步:
新建立一个模板文件: show_whatsnew.htm
示例的(我的,因为这个根据需要修改)
show_whatsnew.htm
- <table id=hot_topic_board border="0" cellspacing="0" cellpadding="0" width="{TABLEWIDTH}" bgcolor="{BORDERCOLOR}" align="center"><tr><td>
- </td></tr></table>
- <br>
- <table onmouseover=show_hot_topic(hot_topic,1) border="0" cellspacing="1" cellpadding="1" height="26" width="{TABLEWIDTH}" bgcolor="{BORDERCOLOR}" align="center">
- <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>
- </table>
- <div id=hot_topic style='position:absolute;visibility:hidden' >
- <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}"><tr><td>
- <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" style="table-layout: fixed; word-wrap: break-word" >
- <tr>
- <td width="25%" bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <script src="whatsnew.php?feature=1&length=28&orderby=3&items=10&digest=0"></script>
- </td>
- <td width="25%" bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=0"></script>
- </td>
- <td width="25%" bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=1"></script>
- </td>
- <td width="25%" bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <script src="whatsnew.php?feature=1&length=28&orderby=1&items=10"></script>
- </td>
- </tr>
- </table></td></tr></table></div>
- <script language=javascript>
- var objname = "";
- var H1Visible = 0;
- hot_topic.style.left=hot_topic_board.offsetLeft
- function show_hot_topic(objname,showmethod){
- if (objname != ""){
- if (showmethod==1){
- objname.style.visibility="visible";
- H1Visible = 1;}
- else{
- objname.style.visibility="hidden";
- H1Visible = 0; }
- }
- }
- </script>
- <script language="javascript">
- var where = "";
- function checkwhere(e) {
- if (document.layers){
- xCoord = e.x;
- yCoord = e.y;
- }
- else if (document.all){
- xCoord = event.clientX;
- yCoord = event.clientY;
- }
- else if (document.getElementById){
- xCoord = e.clientX;
- yCoord = e.clientY;
- }
- yCoord=yCoord+document.body.scrollTop;
- 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)
- show_hot_topic(hot_topic,0);
- }
- document.onmousemove = checkwhere;
- if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
- </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>
这个是你要显示的项目;你自己修改
- <td width="25%" bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <script src="whatsnew.php?feature=1&orderby=0&length=28&items=10&digest=0"></script>
- </td>
复制代码
这个是你的项目对应的调用童虎老师的whatsnew的代码(src=......)
还有
我这个在窄风格排版就完全没移位,宽风格有一点点
你可以单个风格来修改(不要直接是默认的)
这个是排版的问题
我不懂解决
哈哈
斑竹Tommy很会改的
嘿嘿
还是自己动手好些哦
[ 本帖最后由 lu5266 于 2005-8-23 23:18 编辑 ] |