该模板定义广告位置为任意区,如果该区号不存在,则该广告位于按区号大小所排位置,如果该区号存在,则该广告位于该区号之上。
if(boardassort == 2
boardassort == 3
查找以上代码,自行修改区号
模板名称:广告模板
首页版面列表信息完全显示
首页版面列表信息完全显示:
使用js语法
演示:http://2201.x3.yunliao.com/bbs
//模板开始
function displayboard(boardid,boardassort,boardname,boardintro,lastwriter,lastwritetime,topicnum,announcenum,forumpass,lastannounceid,lasttopicname,masterlist,boardlimit,assortname,todayannounce,goodnum,boardimgurl,boardimgwidth,boardimgheight,onlineuser,lowerboard)
{
var temp = 0;
if(currentassosrt!=boardassort)
{
currentassosrt = boardassort
if(flag == 1)
{ 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>");
if(boardassort == 2){
//广告a
document.write("<table width=" + (def_bbs_screenwidth - 2) + " border=0 cellspacing=0 cellpadding=0 align=center background=images/001.jpg><tr><td align=center height=150>&nbsp;</td></tr></table>");
//广告a结束
}else if(boardassort == 3){
//广告b
document.write("<table width=" + (def_bbs_screenwidth - 2) + " border=0 cellspacing=0 cellpadding=0 align=center background=images/002.jpg><tr><td align=center height=180>&nbsp;</td></tr></table>");
//广告b结束
}else{
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=5 align=center bgcolor=#cccccc class=tbone><tr bgcolor=#666699><td colspan=4 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;
}
document.write("<tr bgcolor=#f7f7f7 align=center class=tbbg9><td width=25 bgcolor=eeeeee 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 align=left><table width=100% border=0 cellspacing=0 cellpadding=0>");
if(boardimgurl != "" && boardimgurl != null)document.write("<tr><td rowspan=4 width=" + boardimgwidth + " valign=top><img src=images/null.gif width=2 height=3><br><a href=board/board.asp?boardid=" + boardid + "><img src=\"" + boardimgurl + "\" width=" + boardimgwidth + " height=" + boardimgheight + " border=0></a></td><td width=4 rowspan=4><img src=images/null.gif width=2 height=2></td></tr>");
document.write("<tr height=20><td><a href=board/board.asp?boardid=" + boardid + ">" + boardname + "</a>");
document.write("</td><td align=right rowspan=2 valign=top><img src=images/null.gif width=2 height=2><br><a href=announce/announce2.asp?boardid=" + boardid + "><img src=images/" + gbl_defineimage + "boardtopic/post.gif height=13 width=12 border=0 title=在此论坛发表新帖子></a><br><img src=images/null.gif width=2 height=5><br><a href=board/eboard.asp?boardid=" + boardid + "><img src=images/" + gbl_defineimage + "boardtopic/elist.gif height=13 width=12 border=0 title=查看精华区内容(共" + goodnum + "精华帖子)></a></td></tr>");
document.write("<tr height=15><td>");
document.write(boardintro);
document.write("</td>");
document.write("<tr height=15><td colspan=2>");
document.write("<img src=images/null.gif height=2 width=192><br>版主:");
displayboardmastlist(masterlist,5);
document.write("</tr></table></td>");
document.write("<td align=left width=80 valign=top><img src=images/null.gif height=2 width=2><br>主题 <b>" + topicnum + "</b><br><img src=images/null.gif height=4 width=2><br>新帖 <b><font color=#666699 class=tbtwofont>" + todayannounce + "</font></b><br><img src=images/null.gif height=4 width=2><br>总量 <b>" + announcenum + "</b></td>");
document.write("<td align=left width=222 valign=top><img src=images/null.gif height=2 width=2><br>");
if(lasttopicname == "" || lasttopicname==null)
{
document.write("主题:无");
}
else
{
if(strlength(lasttopicname)>31)lasttopicname = lefttrue(lasttopicname,31-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><img src=images/null.gif height=4 width=2><br>");
if(lastwriter == "")
{
document.write("作者:");
lastwriter="无";
document.write(lastwriter);
document.write("<br><img src=images/null.gif height=4 width=2><br>时间:无");
}
else
{
document.write("回复:");
if(lastwriter!="游客")
{
if(temp == 1)
{
document.write("隐藏");
}
else
{
document.write("<a href=\"user/lookuserinfo.asp?name=" + htmlencode(lastwriter) + "\">" + htmlencode(lastwriter) + "</a>");
}
}
else
{
document.write(htmlencode(lastwriter))
}
if(lastwritetime.length==14)
{
lastwritetime = lastwritetime.substr(0,4) + "-" + lastwritetime.substr(4,2) + "-" + lastwritetime.substr(6,2) + " " + lastwritetime.substr(8,2) + ":" + lastwritetime.substr(10,2) + ":" + lastwritetime.substr(12,2)
}
else
{
lastwritetime = "无"
}
document.write("<br><img src=images/null.gif height=4 width=2><br>时间:" + lastwritetime);
document.write("</td></tr>");
}
}
//模板结束............... |