Discuz!NT官方社区

首页 » Discuz!NT开发与测试 » Discuz!NT插件开发 » 【原创分享】首页三格帖子调用!
andy0371 - 2007-4-17 12:23:00
演示地址:http://hnexy.cn/index.aspx
使用方法:1.解压后上传showtopics.aspx到aspx/1文件夹内(注意,没有用到官方tools里的showtopics.aspx文件)
            2.修改aspx/1文件夹内index.aspx文件
        方法:<1>用记事本打开index.aspx
                    找到

引用:
if (newpmcount>0)
该语句.用记事本的[编辑|查找|粘贴一步到位]
              <2>在其上方加入以下内容:


引用:
templateBuilder.Append("<div class=\"maintable\"><div class=\"spaceborder\">\r\n");
templateBuilder.Append("<table cellspacing=\"0\" cellpadding=\"4\" width=\"100%\"><tbody>\r\n");
templateBuilder.Append("<tr>\r\n");
        templateBuilder.Append("<td class=\"header\">☆最新主题 New 5</td>\r\n");
templateBuilder.Append("<td class=\"header\">☆热门帖子 Hot 5</td>\r\n");
templateBuilder.Append("<td class=\"header\">☆最新回复 Reply 5</td>\r\n");
templateBuilder.Append("</tr><tr>\r\n");
        templateBuilder.Append("<td><script type=\"text/javascript\" src=\"showtopics.aspx?count=5&template=0\"></" + "script></td>\r\n");
templateBuilder.Append("<td><script type=\"text/javascript\" src=\"showtopics.aspx?count=5&order=1&digest=1\"></" + "script></td>\r\n");
templateBuilder.Append("<td><script type=\"text/javascript\" src=\"showtopics.aspx?count=5&order=2&template=0\"></" + "script></td>\r\n");
templateBuilder.Append("</tr>\r\n");
templateBuilder.Append("</tbody></table>\r\n");
templateBuilder.Append("</div></div>\r\n");
        templateBuilder.Append("<br>\r\n");

            3.覆盖原来的index.aspx文件,完成!

附件: {21434304-260A-4A38-99F7-49336F37AC48}.JPG

附件: showtopics.rar
wellknow - 2007-4-17 17:43:00
好东东,立即试用。
独步夕阳 - 2007-4-17 23:37:00
占个位置,测试后再评论,此功能甚好
x2one - 2007-4-18 14:46:00
效果是这样的,但是发完的帖子不调用啊
andy0371 - 2007-4-19 12:09:00
这是后台缓存的问题!不过好像比以前测试版的好太多了!
x2one - 2007-4-19 12:39:00
我用游客去看就看不到首页三格帖子调用。是为什么啊,高手请指点
x2one - 2007-4-19 12:41:00
我明白了,必须开通游客回复功能才能看到这个调用哇~
andy0371 - 2007-4-19 12:56:00
可能是有些板块 你设置了,游客不能浏览,所以调用不出来!
x2one - 2007-4-19 16:12:00
楼上的哥们你QQ多少,加QQ谈吧~嘿嘿想多学点东西
andy0371 - 2007-4-19 20:22:00
QQ:417196984
onlycase - 2007-4-20 21:36:00
用下看看.............
x2one - 2007-4-22 8:02:00
为什么我的热门帖子就两个呢?从哪设热门帖子数量哇?
x2one - 2007-4-22 8:10:00
bbs.x2one.com
coolbo - 2007-5-1 12:39:00
就等他了
coolbo - 2007-5-1 13:14:00
还没没明白怎么用?
我是想在别的一个域名上的静态页面上调用,怎么设置?
1
查看完整版本: 【原创分享】首页三格帖子调用!