[蚂蚁][模板]双栏模板
问题来源:http://w.leadbbs.com/a/a.asp?b=10&id=2235014&ar=2236959&aupflag=1&ap=1&aq=1风格定义此模板前,建议每区的版为偶数数目,否则会极丑!!
模板名称:异类双栏
代码来源:官方源码改编
勾选:首页版面列表信息完全显示
首页版面列表信息完全显示:
使用js语法
演示:http://qjpz.com/bbs/user/boardstyle.asp?b=0&s= 选择“新春快乐”
补充说明:
1:如果你觉得主题内容显示太长,搜索语句:
if(strlength(lasttopicname)>20)lasttopicname = lefttrue(lasttopicname,20-3) + "..."
修改其中两个20为自己喜欢的数字,20表示20字节,一个汉字两个字节。
2:如果你每区的版块超过20个版块,搜索语句:
if(num>20)num=0;
修改20为更大的偶数即可!
//----------代码------------
function displayboard(boardid,boardassort,boardname,boardintro,lastwriter,lastwritetime,topicnum,announcenum,forumpass,lastannounceid,lasttopicname,masterlist,boardlimit,assortname,todayannounce,goodnum,boardimgurl,boardimgwidth,boardimgheight,onlineuser,lowerboard)
{
var n;
if(currentassosrt!=boardassort)
{
currentassosrt = boardassort
if(flag == 1)
{
if(num>0){for(n=num;n<2;n++)document.write("<td width=50%> </td>");}
document.write("</table>");
if(gbl_tablebottomstring != "")document.write("<table width=" + def_bbs_screenwidth + " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>" + gbl_tablebottomstring + "</td></tr></table>");
document.write("<br>");
}
if(gbl_tableheadstring != "")document.write("<table width=" + def_bbs_screenwidth + " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>" + gbl_tableheadstring + "</td></tr></table>");
document.write("<table width=" + def_bbs_screenwidth + " border=0 cellspacing=1 cellpadding=4 align=center class=tbone><tr><td colspan=6 class=tbhead><img src=images/blank.gif width=2 height=3><br><a href=boards.asp?assort=" + boardassort + "><b><font color=white class=headfont>" + assortname + "</font></b></a></td></tr>");
flag = 1;
num=0;
}
if((num%2)==0)document.write("<tr class=tbbg9>");
document.write("<td width=50%><table><tr class=tbbg9><td width=2% class=tbbg1><img src=images/" + gbl_defineimage + "boardtopic/");
if(todayannounce > 0)document.write("_");
if(forumpass!="")
{
document.write("lock.gif title=保密论坛");
}
else
{
if(boardlimit&(1<<(7-1)))
{
document.write("lock3.gif title=版主专区");
}
else
{
if((boardlimit&(1<<(4-1))) && (boardlimit&(1<<(3-1))) && (boardlimit&(1<<(6-1))))
{
document.write("readonly.gif title=只读论坛");
}
else
{
if(boardlimit&(1<<(2-1)))
{
document.write("lock2.gif title=正式会员论坛");
}
else
{
if(boardlimit&(1<<(1-1)))
{
document.write("lock1.gif title=注册认证论坛");
}
else
{
if(boardlimit&(1<<(9-1)))
{
document.write("open.gif title=开放论坛");
}
else
{
document.write("1.gif title=常规论坛");
}
}
}
}
}
}
document.write(" width=24 height=24></td>");
document.write("<td><a href=board/board.asp?boardid=" + boardid + ">" + boardname + "</a>");
document.write("<br><a href=board/board.asp?boardid=" + boardid + " title=查看更多信息>");
document.write(boardintro);
document.write("</a></td>");
document.write("<td width=160>");
if(lasttopicname == "" || lasttopicname==null)
{
document.write("主题:无");
}
else
{
if(strlength(lasttopicname)>20)lasttopicname = lefttrue(lasttopicname,20-3) + "..."
lasttopicname = htmlencode(lasttopicname);
if(forumpass != "" || (boardlimit&(1<<(2-1))) || (boardlimit&(1<<(7-1))))
{
document.write("主题:已设置为隐藏");
temp = 1;
}
else
{
if(parseint(lastannounceid)==0){document.write("主题:" + htmlencode(lasttopicname));}
else{document.write("主题:<a href=announce/announce.asp?boardid=" + boardid + "&id=" + lastannounceid + "&aupflag=1&anum=1>" + htmlencode(lasttopicname) + "</a>");}
}
}
document.write("</br>时间:");
document.write(lastwritetime);
document.write("</br>今日:<font color=red>" + todayannounce + "</font> 主题:" + topicnum + " 总量:" + announcenum + " ");
document.write("</td>");
document.write("</tr></table></td>");
num+=1;
if(num>20)num=0;
}
//------------代码and---------------------- [color=red][/color] [EM21][EM21][EM21]
页:
[1]