問題:在動易SiteWeaver版中,怎樣修改默認的用戶排行中名次及文章數(shù)下面的數(shù)值顏色?
解決方法:通過修改源代碼可以很好的處理這個問題。
修改Include目錄PowerEasy.Common.Front.asp文件中“函數(shù)名:GetTopUser”
For i = 1 To rsTopUser.RecordCount
strTopUser = strTopUser & "<tr>"
If ShowNum = True Then
strTopUser = strTopUser & "<td width='30' align='center'>" & CStr(i) & "</td>"
End If
strTopUser = strTopUser & "<td align='center'><a class='LinkTopUser' href='" & strInstallDir & "ShowUser.asp?ChannelID=" & ChannelID & "&UserID=" & rsTopUser("UserID") & "'>" & rsTopUser("UserName") & "</a></td>"
If ShowPassedItems = True Then
strTopUser = strTopUser & "<td align='center'>" & rsTopUser("PassedItems") & "</td>"
End If
If ShowPoint = True Then
strTopUser = strTopUser & "<td align='center'>" & rsTopUser("UserPoint") & "</td>"
End If
If ShowMoney = True Then
strTopUser = strTopUser & "<td align='center'>" & rsTopUser("Balance") & "</td>"
End If
strTopUser = strTopUser & "</tr>"
rsTopUser.MoveNext
Next
在上面紅色的單元格后加入字體顏色控制代碼即可,比如想改成綠色,可以加<font color='green'></font>。
具體如下:
strTopUser = strTopUser & "<td width='30' align='center'>" & CStr(i) & "</td>"
改為
strTopUser = strTopUser & "<td width='30' align='center'><font color='green'>" & CStr(i) & "</font></td>"
注意:
1、這個標簽說明請參考http://tech.powereasy.net/handbook/cms2006/label/634.html頁{$ShowTopUser()}
2、在這個函數(shù)中,有幾處這樣的代碼,根據(jù)標簽中你使用的排序方式,也就是標簽的第二個參數(shù)來定,修改相應代碼段,當然全改也行。
新聞熱點
疑難解答
圖片精選