p.s.今天有客户说要dvbbs直接显示公告内容不要标题,哎!!只好先找到公告表,逐个的看,发现公告的表是Dv_BbsNews,那就好办了,实在不行还能釜底抽薪,自己调用下!
一、使用的模板目录(默认在/Resource/Template_1/)下面找到 index_html0.htm 和 index_html1.htm,找到
修改为
二、修改根目录下 index.asp 找到Announcements()函数,修改2处地方:
修改为
让公告支持空格和换行,需要编辑Sub ParseAnnouncements(sToken)
修改为
对了,好像 announcements.asp 文件也需要修改下带 dv_bbsnews 表而未读取 content 内容的地方。
重启www服务,或清空缓存,修改生效。
评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=1617
一、使用的模板目录(默认在/Resource/Template_1/)下面找到 index_html0.htm 和 index_html1.htm,找到
<div class="rollboder"><!--显示论坛公告和小字报开始-->
<ul>
<li class="rollleft">
<div class="rollTextMenus" id="rollTextMenus">
{$announcementsitem.begin}
<div id="rollTextMenu{$announcementsitem.i}" name="announcementsitem" style="display: none"><strong> 公告:</strong> <a href="javascript:;" onclick="DvWnd.open('公告:{$announcementsitem.title}','announcements.asp?action=showone&boardid={$announcementsitem.boardid}&id={$announcementsitem.id}',600,400,1,{bgc:'black',opa:0.5});" >{$announcementsitem.title}</a> ({$announcementsitem.addtime})</div>
{$announcementsitem.end}
{$smallpaper.begin}
<div id="rollTextMenu{$smallpaper.i}" name="announcementsitem" style="display: none"> <strong>小字报:</strong> <a href="javascript:;" onclick="DvWnd.open('小字报:{$smallpaper.s_title}','viewinfo.asp?id={$smallpaper.s_id}&boardid={$pub.boardid}',500,350);">{$smallpaper.s_title}</a> (<a href="dispuser.asp?name={$smallpaper.s_username}" target="_blank" title="查看发表人的个人资料">{$smallpaper.s_username}</a> <font color="#cccccc">By: {$smallpaper.s_addtime}</font>)</div>
{$smallpaper.end}
</div>
</li>
<li class="rollright" width="40"><a title="上一条" href="javascript:rollText(-1);"><img src="images/last.gif" alt="上一条" width="11" height="11" border="0" /></a> <a title="下一条" href="javascript:rollText(1);"><img src="images/next.gif" alt="下一条" width="11" height="11" border="0" /></a></li>
<li class="rollcenter" id="pageShow" width="30"></li>
</ul>
</div>
<script type="text/javascript" language="JavaScript">announcements();</script>
<!--显示论坛公告和小字报结束-->
<ul>
<li class="rollleft">
<div class="rollTextMenus" id="rollTextMenus">
{$announcementsitem.begin}
<div id="rollTextMenu{$announcementsitem.i}" name="announcementsitem" style="display: none"><strong> 公告:</strong> <a href="javascript:;" onclick="DvWnd.open('公告:{$announcementsitem.title}','announcements.asp?action=showone&boardid={$announcementsitem.boardid}&id={$announcementsitem.id}',600,400,1,{bgc:'black',opa:0.5});" >{$announcementsitem.title}</a> ({$announcementsitem.addtime})</div>
{$announcementsitem.end}
{$smallpaper.begin}
<div id="rollTextMenu{$smallpaper.i}" name="announcementsitem" style="display: none"> <strong>小字报:</strong> <a href="javascript:;" onclick="DvWnd.open('小字报:{$smallpaper.s_title}','viewinfo.asp?id={$smallpaper.s_id}&boardid={$pub.boardid}',500,350);">{$smallpaper.s_title}</a> (<a href="dispuser.asp?name={$smallpaper.s_username}" target="_blank" title="查看发表人的个人资料">{$smallpaper.s_username}</a> <font color="#cccccc">By: {$smallpaper.s_addtime}</font>)</div>
{$smallpaper.end}
</div>
</li>
<li class="rollright" width="40"><a title="上一条" href="javascript:rollText(-1);"><img src="images/last.gif" alt="上一条" width="11" height="11" border="0" /></a> <a title="下一条" href="javascript:rollText(1);"><img src="images/next.gif" alt="下一条" width="11" height="11" border="0" /></a></li>
<li class="rollcenter" id="pageShow" width="30"></li>
</ul>
</div>
<script type="text/javascript" language="JavaScript">announcements();</script>
<!--显示论坛公告和小字报结束-->
修改为
<!--显示论坛公告和小字报开始-->
<table style="margin-bottom:3px;" cellspacing="0" cellpadding="0">
<tr><td valign="bottom">
{$announcementsitem.begin}
<div id="rollTextMenu{$announcementsitem.i}" name="announcementsitem" ><strong> 公告:</strong>{$announcementsitem.content}</div>
{$announcementsitem.end}
{$smallpaper.begin}
<div id="rollTextMenu{$smallpaper.i}" name="announcementsitem" > <strong>小字报:</strong> <a href="javascript:;" onclick="DvWnd.open('小字报:{$smallpaper.s_title}','viewinfo.asp?id={$smallpaper.s_id}&boardid={$pub.boardid}',500,350);">{$smallpaper.s_title}</a> (<a href="dispuser.asp?name={$smallpaper.s_username}" target="_blank" title="查看发表人的个人资料">{$smallpaper.s_username}</a> <font color="#cccccc">By: {$smallpaper.s_addtime}</font>)</div>
{$smallpaper.end}
</td></tr></table>
<!--显示论坛公告和小字报结束-->
<table style="margin-bottom:3px;" cellspacing="0" cellpadding="0">
<tr><td valign="bottom">
{$announcementsitem.begin}
<div id="rollTextMenu{$announcementsitem.i}" name="announcementsitem" ><strong> 公告:</strong>{$announcementsitem.content}</div>
{$announcementsitem.end}
{$smallpaper.begin}
<div id="rollTextMenu{$smallpaper.i}" name="announcementsitem" > <strong>小字报:</strong> <a href="javascript:;" onclick="DvWnd.open('小字报:{$smallpaper.s_title}','viewinfo.asp?id={$smallpaper.s_id}&boardid={$pub.boardid}',500,350);">{$smallpaper.s_title}</a> (<a href="dispuser.asp?name={$smallpaper.s_username}" target="_blank" title="查看发表人的个人资料">{$smallpaper.s_username}</a> <font color="#cccccc">By: {$smallpaper.s_addtime}</font>)</div>
{$smallpaper.end}
</td></tr></table>
<!--显示论坛公告和小字报结束-->
二、修改根目录下 index.asp 找到Announcements()函数,修改2处地方:
Select id,boardid,title,addtime,bgs From Dv_bbsnews
修改为
Select id,boardid,title,addtime,bgs,content From Dv_bbsnews
让公告支持空格和换行,需要编辑Sub ParseAnnouncements(sToken)
Replace(Replace(Node.text,"""",""),"'","")
修改为
Replace(Replace(Replace(Replace(Node.text,"""",""),"'","")," "," "),chr(10),"<br>")
对了,好像 announcements.asp 文件也需要修改下带 dv_bbsnews 表而未读取 content 内容的地方。
重启www服务,或清空缓存,修改生效。
[最后修改由 admin, 于 2010-12-24 10:00:59]

这篇日志没有评论。
此日志不可发表评论。