問題:2.0.2.0升級到2.0.3.0后,如文章內(nèi)容等頁面中信息的評論列表以前是能正常顯示,現(xiàn)在為什么顯示“尚無評論! ”?
分析:
1、“評論列表.config”標(biāo)簽的查詢語句有問題。
2、模板里的評論js部分還是舊的,與ajax.aspx里的參數(shù)不一致(這部分js可以調(diào)用現(xiàn)在新版里的 評論js這個(gè)標(biāo)簽),js里是這里傳遞的參數(shù)與舊版不一樣。
解決:
1、查找“標(biāo)簽庫/評論類/評論列表.config”,在“評論列表.config”標(biāo)簽中查找:
<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>
改成:
<LabelSqlString>SELECT TOP @pagesize * FROM PE_Comment WHERE CommentID NOT IN (SELECT TOP @startrow CommentID FROM PE_Comment WHERE GeneralID = @itemId AND Status=1 ORDER BY UpdateTime DESC) AND (GeneralID = @itemId) AND Status=1 ORDER BY UpdateTime DESC</LabelSqlString>
即在“評論列表.config”標(biāo)簽中增加查詢語句“AND Status=1”。
2、在“標(biāo)簽庫/評論類”目錄中查看是否有“評論JS.config”(2.0.3.0新增的標(biāo)簽),若沒有請上傳至“評論類”目錄中。
3、修改“:/內(nèi)容頁模板/默認(rèn)文章內(nèi)容頁模板.html”,將模板中:
<!-- 統(tǒng)計(jì)點(diǎn)擊數(shù) -->
<!-- 評論變量區(qū) -->
<input id="username" type="hidden" value="游客" />
……
</script>
</body>
替換成:
<!-- 統(tǒng)計(jì)點(diǎn)擊數(shù) -->
{PE.Label id="評論JS" nodeId="{PE.Field id="cone" fieldname="NodeID" /}" /}
<script language="javascript" type="text/javascript">
//雙擊鼠標(biāo)滾動(dòng)屏幕的代碼
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0, currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
//更改字體大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
if(curfontsize>8){
document.getElementById('fontzoom').style.fontSize=(--curfontsize) 'pt';
document.getElementById('fontzoom').style.lineHeight=(--curlineheight) 'pt';
}
}
function fontZoomB(){
if(curfontsize<64){
document.getElementById('fontzoom').style.fontSize=( curfontsize) 'pt';
document.getElementById('fontzoom').style.lineHeight=( curlineheight) 'pt';
}
}
</script>
</body>
新聞熱點(diǎn)
疑難解答
圖片精選