📄 评论列表.config
字号:
<root>
<LabelType>评论类</LabelType>
<LabelImage>../../Admin/Images/LabelIco/GetArticleCustom.gif</LabelImage>
<LabelIntro>DIV格式的简单评论列表</LabelIntro>
<LabelDataType>sql_sysquery</LabelDataType>
<attributes>
<name>itemId</name>
<datatype>supersql</datatype>
<default>11</default>
<intro>内容ID{默认值:1,传入值:@RequestInt_Id}</intro>
</attributes>
<attributes>
<name>outputQty</name>
<datatype>supersql</datatype>
<default>10</default>
<intro>显示数量</intro>
</attributes>
<LabelSqlString>SELECT TOP @pagesize * FROM PE_Comment WHERE CommentID NOT IN (SELECT TOP @startrow CommentID FROM PE_Comment WHERE GeneralID = @itemId ORDER BY UpdateTime DESC) AND (GeneralID = @itemId) AND Status=1 ORDER BY UpdateTime DESC</LabelSqlString>
<LabelTemplate><![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">
<xsl:param name="currentPage" />
<xsl:param name="outputQty" />
<xsl:output method="html" />
<xsl:template match="/">
<xsl:variable name="loginedusername" select="pe:LoginedUserName()"/>
<xsl:variable name="isadminlogined" select="pe:IsAdminLogined()"/>
<xsl:if test="count(/NewDataSet/Table) = 0" >
<div class="c_spacing">
</div>
<div id="bbs_title">
尚无评论!
</div>
</xsl:if>
<div class="commentTitleList">网友评论列表
</div>
<xsl:for-each select="NewDataSet/Table">
<xsl:variable name="userimg" select="pe:GetUserFace(UserName)"/>
<dl>
<dt>
<ul class="list">
<li class="commnetTitle">
<span id="ctl00_CphContent_LblTitle">
<xsl:value-of select="pe:FiltText(CommentTitle)"/>
</span>
</li>
<li class="replyUserName">
<xsl:value-of select="ReplyUserName"/>
<xsl:if test="UserName = '游客'">[游客]</xsl:if>于<xsl:value-of select="pe:FormatDate(UpdateTime,'yy-mm-dd')"/>发表</li>
<!-- <li>分数:<xsl:value-of select="Score"/>
</li>-->
<div class="clearbox">
</div>
</ul>
</dt>
<dd>
<span id="LblContent">
<span id="commenttxt_{CommentID}">
<xsl:choose>
<xsl:when test="IsPrivate = 'false'">
<pre>
<xsl:value-of select="pe:FiltText(Content)"/>
</pre>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="(UserName=$loginedusername and $loginedusername!='') or $isadminlogined='true'">
<pre>
<xsl:value-of select="pe:FiltText(Content)"/>
</pre>
</xsl:when>
<xsl:otherwise>本评论只有评论人和管理员可见!</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</span>
<xsl:if test="ReplyAdmin != '' and Reply !=''" >
<xsl:choose>
<xsl:when test="ReplyIsPrivate='false'">
<div class="Reply" width="95%">
<dl>
<dt class="ReplyAdminTd" >
<span class="ReplyAdmin">管理员回复</span>:</dt>
<dd>
<xsl:value-of select="Reply"/>
</dd>
<dd class="ReplyTime">
<xsl:value-of select="pe:FormatDate(ReplyDatetime,'yy-mm-dd')"/>
</dd>
</dl>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:if test="UserName=$loginedusername and $loginedusername!=''">
<div class="Reply" width="95%">
<dl>
<dt class="ReplyAdminTd" >
<span class="ReplyAdmin">管理员回复</span>:</dt>
<dd>
<xsl:value-of select="Reply"/>
</dd>
<dd class="ReplyTime">
<xsl:value-of select="pe:FormatDate(ReplyDatetime,'yy-mm-dd')"/>
</dd>
</dl>
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</span>
</dd>
</dl>
</xsl:for-each>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<UsePage>True</UsePage>
<LabelSqlCount>SELECT COUNT(*) FROM PE_Comment WHERE GeneralID = @itemId AND Status=1</LabelSqlCount>
<OutType>sin</OutType>
<CacheTime>12</CacheTime>
<EnabelAjax>True</EnabelAjax>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<attributes>
<name>currentPage</name>
<datatype>supersql</datatype>
<default>1</default>
<intro>当前页数</intro>
</attributes>
</root>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -