移动公告的实现方法,可设置多条显示
2006-02-11 21:41
429 查看
http://bbs.dvbbs.net/dispbbs.asp?BoardID=134&ID=1138809&replyID=&skin=1
http://www.hscripts.com/tutorials/html/marquee1.php(关于使用Marquee很好的帖子)
进入后台----------风格界面模板总管理----------分页面模板(page_index)------template.html(3)
1、移动1条公告方法
a、查找代码:
把上面红色的0改为1
b、查找代码:
把上面红色的5改为1
2、移动多条公告方法
a、查找代码:
把上面红色的0改为1
b、查找代码:
把上面红色的5改为你要的条数就行了
========================================
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
<!--
Copyright (C) 2003-2005 AspSky.Net. All rights reserved.
Written by Sinobankers.com CHEN Yong
Web: http://www.sinobankers.com/
Email: eway@aspsky.net
论坛公告模板
-->
<xsl:variable name="marquee" select="1"/><!--设置为1则移动公告-->
<xsl:variable name="maxposition" select="5"/><!--移动公告最多显示多少条-->
<xsl:variable name="show" select="1"/><!--方便不想显示公告的家伙,这里做了开关,设置为0则不显示公告-->
<xsl:template match="/">
<xsl:if test="$show=1">
<xsl:variable name="boardid" select="xml/@boardid"/>
<div class="itableborder">
<xsl:choose>
<xsl:when test="xml/news[@boardid=$boardid]">
<xsl:choose>
<xsl:when test="$marquee=1">
<div style="width:80%;">
<marquee scrolldelay="150" bgcolor="yellow" scrollamount="4" onmouseout="if (document.all!=null)this.start()" onmouseover="if (document.all!=null)this.stop()">
公告:<xsl:for-each select="xml/news[@boardid=$boardid][position() < ($maxposition+1)]"> <a href="javascript:openScript('announcements.asp?boardid={$boardid}',500,400)"><b><xsl:value-of select="@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(@addtime,'T',' ')" />) </xsl:for-each>
</marquee>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:if test="xml/news[@boardid=$boardid]/@bgs and xml/news[@boardid=$boardid]/@bgs !=''"><bgsound src="{xml/news[@boardid=$boardid]/@bgs}"/><img src="Skins/Default/filetype/mid.gif" border="0" alt="" /> </xsl:if><a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b><xsl:value-of select="xml/news[@boardid=$boardid]/@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(xml/news[@boardid=$boardid]/@addtime,'T',' ')" />)</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b>当前还未有公告</b></a>()
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
改为如下格式:
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
<!--
Copyright (C) 2004,2005 AspSky.Net. All rights reserved.
Written by dvbbs.net Lao Mi
Web: http://www.aspsky.net/,http://www.dvbbs.net/
Email: eway@aspsky.net
论坛公告模板
-->
<xsl:variable name="marquee" select="1"/><!--设置为1则移动公告-->
<xsl:variable name="maxposition" select="5"/><!--移动公告最多显示多少条-->
<xsl:variable name="show" select="1"/><!--方便不想显示公告的家伙,这里做了开关,设置为0则不显示公告-->
<xsl:template match="/">
<xsl:if test="$show=1">
<xsl:variable name="boardid" select="xml/@boardid"/>
<div class="itableborder">
<xsl:choose>
<xsl:when test="xml/news[@boardid=$boardid]">
<xsl:choose>
<xsl:when test="$marquee=1">
<div style="width:100%;">
<marquee scrolldelay="150" bgcolor="yellow" scrollamount="3" onmouseout="if (document.all!=null)this.start()" onmouseover="if (document.all!=null)this.stop()">
公告:<xsl:for-each select="xml/news[@boardid=$boardid][position() < ($maxposition+1)]"> <a href="javascript:openScript('announcements.asp?boardid={$boardid}',500,400)"><b><xsl:value-of select="@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(@addtime,'T',' ')" />) </xsl:for-each>
</marquee>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:if test="xml/news[@boardid=$boardid]/@bgs and xml/news[@boardid=$boardid]/@bgs !=''"><bgsound src="{xml/news[@boardid=$boardid]/@bgs}"/><img src="Skins/Default/filetype/mid.gif" border="0" alt="" /> </xsl:if><a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b><xsl:value-of select="xml/news[@boardid=$boardid]/@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(xml/news[@boardid=$boardid]/@addtime,'T',' ')" />)</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b>当前还未有公告</b></a>()
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
http://www.hscripts.com/tutorials/html/marquee1.php(关于使用Marquee很好的帖子)
进入后台----------风格界面模板总管理----------分页面模板(page_index)------template.html(3)
1、移动1条公告方法
a、查找代码:
<xsl:variable name="marquee" select="0"/> |
b、查找代码:
<xsl:variable name="maxposition" select="5"/> |
2、移动多条公告方法
a、查找代码:
<xsl:variable name="marquee" select="0"/> |
b、查找代码:
<xsl:variable name="maxposition" select="5"/> |
========================================
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
<!--
Copyright (C) 2003-2005 AspSky.Net. All rights reserved.
Written by Sinobankers.com CHEN Yong
Web: http://www.sinobankers.com/
Email: eway@aspsky.net
论坛公告模板
-->
<xsl:variable name="marquee" select="1"/><!--设置为1则移动公告-->
<xsl:variable name="maxposition" select="5"/><!--移动公告最多显示多少条-->
<xsl:variable name="show" select="1"/><!--方便不想显示公告的家伙,这里做了开关,设置为0则不显示公告-->
<xsl:template match="/">
<xsl:if test="$show=1">
<xsl:variable name="boardid" select="xml/@boardid"/>
<div class="itableborder">
<xsl:choose>
<xsl:when test="xml/news[@boardid=$boardid]">
<xsl:choose>
<xsl:when test="$marquee=1">
<div style="width:80%;">
<marquee scrolldelay="150" bgcolor="yellow" scrollamount="4" onmouseout="if (document.all!=null)this.start()" onmouseover="if (document.all!=null)this.stop()">
公告:<xsl:for-each select="xml/news[@boardid=$boardid][position() < ($maxposition+1)]"> <a href="javascript:openScript('announcements.asp?boardid={$boardid}',500,400)"><b><xsl:value-of select="@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(@addtime,'T',' ')" />) </xsl:for-each>
</marquee>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:if test="xml/news[@boardid=$boardid]/@bgs and xml/news[@boardid=$boardid]/@bgs !=''"><bgsound src="{xml/news[@boardid=$boardid]/@bgs}"/><img src="Skins/Default/filetype/mid.gif" border="0" alt="" /> </xsl:if><a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b><xsl:value-of select="xml/news[@boardid=$boardid]/@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(xml/news[@boardid=$boardid]/@addtime,'T',' ')" />)</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b>当前还未有公告</b></a>()
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
改为如下格式:
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
<!--
Copyright (C) 2004,2005 AspSky.Net. All rights reserved.
Written by dvbbs.net Lao Mi
Web: http://www.aspsky.net/,http://www.dvbbs.net/
Email: eway@aspsky.net
论坛公告模板
-->
<xsl:variable name="marquee" select="1"/><!--设置为1则移动公告-->
<xsl:variable name="maxposition" select="5"/><!--移动公告最多显示多少条-->
<xsl:variable name="show" select="1"/><!--方便不想显示公告的家伙,这里做了开关,设置为0则不显示公告-->
<xsl:template match="/">
<xsl:if test="$show=1">
<xsl:variable name="boardid" select="xml/@boardid"/>
<div class="itableborder">
<xsl:choose>
<xsl:when test="xml/news[@boardid=$boardid]">
<xsl:choose>
<xsl:when test="$marquee=1">
<div style="width:100%;">
<marquee scrolldelay="150" bgcolor="yellow" scrollamount="3" onmouseout="if (document.all!=null)this.start()" onmouseover="if (document.all!=null)this.stop()">
公告:<xsl:for-each select="xml/news[@boardid=$boardid][position() < ($maxposition+1)]"> <a href="javascript:openScript('announcements.asp?boardid={$boardid}',500,400)"><b><xsl:value-of select="@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(@addtime,'T',' ')" />) </xsl:for-each>
</marquee>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:if test="xml/news[@boardid=$boardid]/@bgs and xml/news[@boardid=$boardid]/@bgs !=''"><bgsound src="{xml/news[@boardid=$boardid]/@bgs}"/><img src="Skins/Default/filetype/mid.gif" border="0" alt="" /> </xsl:if><a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b><xsl:value-of select="xml/news[@boardid=$boardid]/@title" disable-output-escaping="yes"/></b></a>(<xsl:value-of select="translate(xml/news[@boardid=$boardid]/@addtime,'T',' ')" />)</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="javascript:openScript('announcements.asp?action=showone&boardid={$boardid}',500,400)"><b>当前还未有公告</b></a>()
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
相关文章推荐
- JQuery实现鼠标移动图片显示描述层的方法
- JQuery实现鼠标移动图片显示描述层的方法
- iOS 地图显示比例设置 (这里是当前的位置信息代理方法中实现)
- 如何设置Linux桌面环境 实现HiDPI显示支持的方法
- IOS中通过UICollectionView和UICollectionViewFlowLayout设置初始游标cursor来控制左右滑动来实现多条记录水平分页显示及控制音标读音
- C#实现鼠标移动到曲线图上显示值的方法
- Win7显示桌面图标移动到左侧(边)显示的实现方法
- Android Studio移动鼠标显示悬浮提示的设置方法
- Atom 在 linux 下安装有几率侧边栏默认显示在右侧,移动到左侧的设置方法
- [自用门户]需求:公告发售结束时间大于当前时间时候,则在类加on,显示new图标(主要看js实现方法)
- 在ASP.NET中实现鼠标移动悬停在DataGrid时高亮显示这一行的方法
- 一个流行且实用的JS表单验证提示,演示了怎么自定义错误信息的显示方式,同时通过写FormValid.showError类方法来实现错误显示方式自定义: errMsg 是一个错误消息的数组,这样方便自定
- [delphi]ComboBox实现显示文本与值不同的方法
- 有限长度空间内文本长度超出后通过css实现截取并显示省略号的方法
- Android APP安装后不在桌面显示图标的应用场景举例和实现方法
- DataGridView单元格显示多行的设置方法
- 编写一个程序,实现设置上月、本月电表读数,显示上月、本月电表读数,计算并显示本月用电数。 假设每度电的价格为1.2元,计算并显示本月电费
- python中plot实现即时数据动态显示方法
- 简单方法实现1.1.3版iPhone同步显示歌词
- cocos2d-x 主角向任意方向使其同速移动的实现方法