不知道阿有人用的着,可能Portal样式的风格比较能用。
开发新风格的时候一并写了这个插件。
演示
======================
见我网站
http://www.young100.net/bbs/
选择YOUNG风格,点右上切换面板。
<服务器莫名其妙慢的很,那个风格就更慢了>
安装
======================
例如你已经+了JS调用的表格,那么可以替换掉其中最新回复的JS调用
1.把程序文件放在bbs根目录下
2.在cache文件夹下新建文件夹postlist
版面选项添加方法
代码:
<option value='forumID'>-- 版面名称</option>
全部代码
代码:
<script type="text/javascript">
var xmlHttp;
var forumid;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function postlist(id) {
forumid=id;
createXMLHttpRequest();
link_str="ajax_postlist.php?do=list&f="+id;
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", link_str, true);
xmlHttp.send(null);
document.getElementById("post_status").innerHTML ="";
document.getElementById("post_list").innerHTML ="Loading...";
}
function startRequest_list() {
createXMLHttpRequest();
hash=Math.floor(Math.random() *1000);
link_str="cache/postlist/postlist_"+forumid+".html?s="+hash;
xmlHttp.onreadystatechange = handleStateChange_list;
xmlHttp.open("GET", link_str, true);
xmlHttp.send(null);
}
function handleStateChange_list() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
document.getElementById("post_status").innerHTML ="数据成功下载!";
document.getElementById("post_list").innerHTML = xmlHttp.responseText;
}
}
}
function handleStateChange() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
document.getElementById("post_status").innerHTML ="服务器处理完毕,载入中...";
setTimeout("startRequest_list();",2000);
}
}
}
</script>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td><select name="f" onchange='postlist(this.value);'>
<optgroup label='选择论坛版面'>
<option value='c'> 所有版面</option>
<option value='a'> 最新主题</option>
<option value='b'> 论坛精华</option>
<!--以下请根据你论坛添加-->
<option value='38'>-- 记者团专版</option>
<option value='31'>-- 菁菁校园</option>
<option value='12'>-- 吸水海绵</option>
</optgroup>
</select>
</td>
</tr>
<tr>
<td><div class='wgborder' id="post_status"></div></td>
</tr>
<tr>
<td><div class='wgborder' id="post_list"></div></td>
</tr>
</table>