Files
ningbo/动易的标签库/标签库/博客类/博客图片列表.config
T
2026-08-31 16:22:00 +08:00

353 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<root>
<LabelType>博客类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<Version officialVersion="" modifiedVersions="2908" compatibleVersion="" />
<attributes>
<name>titleLength</name>
<datatype>int</datatype>
<default>10</default>
<intro>标题长度</intro>
</attributes>
<IsXsltSql>true</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<!--要使用上一步定义的自定义参数,要作为XSLT参数使用,务必要在这里声明。如:<xsl:param name="myPara" />.引用该参数:$myPara -->
<xsl:output method="xml" />
<xsl:param name="isElite" />
<xsl:param name="categoryId"/>
<xsl:param name="listOrderType"/>
<xsl:param name="isIndex"/>
<xsl:param name="isCategory"/>
<xsl:template match="/">
<!--请按提示编辑,保持该模板结构的正确性-->
<root>
<sql>
SELECT TOP @ouputQty PE_BG_log.* FROM PE_BG_log WHERE State=1 AND TitlePicUrl &lt;&gt;''
<xsl:if test="$isIndex='true'">
AND IndexState=2
</xsl:if>
<xsl:if test="$isCategory='true'">
AND ClassState=2
</xsl:if>
<xsl:choose>
<xsl:when test="$isElite='true'">
AND EliteLevel>0
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$categoryId!=''">
AND CategoryID=<xsl:value-of select="$categoryId"/>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$listOrderType!=''">
<!--推荐等级降序-->
<xsl:if test="$listOrderType=1">
ORDER BY EliteLevel DESC
</xsl:if>
<!--推荐等级升序-->
<xsl:if test="$listOrderType=2">
ORDER BY EliteLevel ASC
</xsl:if>
<!--博文ID降序-->
<xsl:if test="$listOrderType=3">
ORDER BY LogID DESC
</xsl:if>
<!--博文ID升序-->
<xsl:if test="$listOrderType=4">
ORDER BY LogID ASC
</xsl:if>
<!--更新时间降序-->
<xsl:if test="$listOrderType=5">
ORDER BY UpdateTime DESC
</xsl:if>
<!--更新时间升序-->
<xsl:if test="$listOrderType=6">
ORDER BY UpdateTime ASC
</xsl:if>
<!--点击数降序-->
<xsl:if test="$listOrderType=7">
ORDER BY Hits DESC
</xsl:if>
<!--点击数升序-->
<xsl:if test="$listOrderType=8">
ORDER BY Hits ASC
</xsl:if>
<!--月点击数降序-->
<xsl:if test="$listOrderType=9">
ORDER BY MonthHits DESC
</xsl:if>
<!--月点击数升序-->
<xsl:if test="$listOrderType=10">
ORDER BY MonthHits ASC
</xsl:if>
<!--周点击数降序-->
<xsl:if test="$listOrderType=11">
ORDER BY WeekHits DESC
</xsl:if>
<!--周点击数升序-->
<xsl:if test="$listOrderType=12">
ORDER BY WeekHits ASC
</xsl:if>
<!--日点击数降序-->
<xsl:if test="$listOrderType=13">
ORDER BY DayHits DESC
</xsl:if>
<!--日点击数升序-->
<xsl:if test="$listOrderType=14">
ORDER BY DayHits ASC
</xsl:if>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</sql>
<sqlpage>
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
</sqlpage>
<countsql>
<!--请在这里编写你的分页SQL语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
</countsql>
</root>
</xsl:template>
</xsl:transform>]]></LabelSqlString>
<LabelTemplate>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:param name="titleLength" />
<xsl:param name="contentLength" />
<xsl:param name="linkOpenType" />
<xsl:param name="listOrderType" />
<xsl:param name="ouputQty" />
<xsl:param name="imageLinkStyle" />
<xsl:param name="displayTitle" />
<xsl:param name="displayContent"/>
<xsl:param name="isLinkTitle"/>
<xsl:param name="isList"/>
<xsl:output method="html" />
<xsl:template match="/NewDataSet/Table">
<xsl:choose>
<xsl:when test="$isList='true'">
<li>
<a>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:if test="$imageLinkStyle!=''">
<xsl:attribute name="class">pic</xsl:attribute>
</xsl:if>
<img>
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="TitlePicUrl!= ''"><xsl:value-of select="pe:ConvertToAbsolutePath(TitlePicUrl)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="pe:SkinDir()"/>Blog/images/nopic.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Title"/>
</xsl:attribute>
</img>
</a>
<xsl:if test="$displayTitle='true'">
<h4>
<xsl:choose>
<xsl:when test="$isLinkTitle='true'">
<a>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</xsl:otherwise>
</xsl:choose>
</h4>
</xsl:if>
<xsl:if test="$displayContent='true'">
<p>
<xsl:value-of select=" pe:CutText(pe:RemoveHtml(Content),$contentLength,'...')"/>
<a class="readDetail">
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
[全文]</a>
</p>
</xsl:if>
</li>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:if test="$imageLinkStyle!=''">
<xsl:attribute name="class">pic</xsl:attribute>
</xsl:if>
<img>
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="TitlePicUrl!= ''"><xsl:value-of select="pe:ConvertToAbsolutePath(TitlePicUrl)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="pe:SkinDir()"/>Blog/images/nopic.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Title"/>
</xsl:attribute>
</img>
</a>
<xsl:if test="$displayTitle='true'">
<h4>
<xsl:choose>
<xsl:when test="$isLinkTitle='true'">
<a>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</xsl:otherwise>
</xsl:choose>
</h4>
</xsl:if>
<xsl:if test="$displayContent='true'">
<p>
<xsl:value-of select=" pe:CutText(pe:RemoveHtml(Content),$contentLength,'...')"/>
<a class="readDetail">
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
[全文]
</a>
</p>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>]]></LabelTemplate>
<attributes>
<name>contentLength</name>
<datatype>int</datatype>
<default>50</default>
<intro>内容长度</intro>
</attributes>
<attributes>
<name>linkOpenType</name>
<datatype>string</datatype>
<default>_blank</default>
<intro>链接打开方式</intro>
</attributes>
<attributes>
<name>listOrderType</name>
<datatype>int</datatype>
<default>1</default>
<intro>排序类型</intro>
</attributes>
<attributes>
<name>ouputQty</name>
<datatype>sql.int</datatype>
<default>10</default>
<intro>输出数量</intro>
</attributes>
<attributes>
<name>imageLinkStyle</name>
<datatype>string</datatype>
<default>pic</default>
<intro>图片链接样式</intro>
</attributes>
<attributes>
<name>displayTitle</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否显示标题</intro>
</attributes>
<attributes>
<name>displayContent</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否显示内容</intro>
</attributes>
<attributes>
<name>isList</name>
<datatype>bool</datatype>
<default>false</default>
<intro>是否列表形式</intro>
</attributes>
<attributes>
<name>isLinkTitle</name>
<datatype>bool</datatype>
<default>false</default>
<intro>开启标题链接</intro>
</attributes>
<attributes>
<name>categoryId</name>
<datatype>sql.int</datatype>
<default>
</default>
<intro>分类ID</intro>
</attributes>
<attributes>
<name>isIndex</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否只显示推荐首页博文</intro>
</attributes>
<attributes>
<name>isCategory</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否只显示推荐分类博文</intro>
</attributes>
</root>