How can I add a verification code to the comment in SW?

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.