How can I add a verification code to the comment in SW?
In SiteWeaver, how do I add verification codes to comments?
Solution:
I,Modify the template.
1. Add in <Script language = javascript>
Function refreshimg (){
Document. all. checkcode. src = '../Inc/CheckCode. asp? 'Math. random ();
}
2. Add it to the comment content box
<Tr>
<Td align = right> Verification Code: </td>
<Td colSpan = 3> <input name = 'checkcode' size = '6' maxlength = '6' style = 'width: 50px; BORDER-RIGHT: # F7F7F7 0px solid; BORDER-TOP: # F7F7F7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: # F7F7F7 0px solid; BORDER-BOTTOM: # c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: # F7F7F7; ime-mode: disabled; 'onmouseover = ''this. style. background = '# ffff'; ''onmouseout = ''this. style. background = '# F7F7F7 ''' onFocus = 'this. select (); '>
& Nbsp; <a href = 'javascript: refreshimg () 'title = 'Invisible, change the image'> </a> </td>
</Tr>
II,Modify the PowerEasy. Comment. asp file in the Include directory and add it to Sub SaveComment ().
Dim CheckCode
CheckCode = LCase (Trim (Request ("CheckCode ")))
If Trim (Session ("CheckCode") = "" Then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> your logon time is too long, leading to invalid verification code. Return to the logon page again to log on. <Br> return to the previous page and click "Refresh Verification Code. </Li>"
End If
If CheckCode <> Session ("CheckCode") Then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> the verification code you entered is inconsistent with the one generated by the system. Please enter the verification code again. Return to the previous page and click the verification code to refresh. </Li>"
End If
If FoundErr = True Then
Call WriteErrMsg (ErrMsg, "ol ")
Response. end
End If
Note:
1. if you add comments to multiple channels, you need to modify multiple templates.
2. This modification is only valid for SW6