Tìm dòng code 'Const strPageEncoding = "utf-8" b.2.. Tìm dòng code Server.ScriptTimeout = 90 Session.Timeout = 20 a.2.. Tạo file ha_language_file_inc.asp trong thư mục language_files có
Trang 1Bài 1: Việt hóa
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Down code Wwf 8.03
Thông tin đăng nhập:
• Username: admin
• Password: admin
2 Mở file browser_page_encoding_inc.asp a.1 Tìm dòng code
Const strPageEncoding = "iso-8859-1" a.2 Thay thế bằng
'Const strPageEncoding = "iso-8859-1" b.1 Tìm dòng code
'Const strPageEncoding = "utf-8"
b.2 Thay thế bằng
Const strPageEncoding = "utf-8"
3 Mở file common.asp
a.1 Tìm dòng code
Server.ScriptTimeout = 90
Session.Timeout = 20
a.2 Thêm xuống dưới
Session.Codepage=65001
4 Mở file footer.asp
a.1 Tìm dòng code
</body>
</html>
a.2 Thêm lên trên
<div align=center>
<br />
<hr style="width: 50%;">
Trang 2<! #includes file=" /Viettyping/Viettyping.asp" >
<% Call VietTypeMod()%>
<%="<span class=""smText""><A target=_blank HREF=""http://www.hoaian.net"">" & strWebsiteName & "</A> - Website của những người
đam mê lập trình ASP<br /></span>"%>
<! #include file=" /clock.asp" >
<%="<span class=""smText"">Xem tốt nhất với IE 6.0,
độ phân giải màn hình 800x600 pixels<br />Developed by <A target=_blank HREF=""http://www.hoaian.net"">Hoai An
Net</A></span>"%>
<br />
</div>
5 Mở file admin_footer_inc.asp
a.1 Tìm dòng code
</td>
</tr>
a.2 Thêm lên trên
<! #includes file="footer.asp" >
6 Tạo file ha_language_file_inc.asp trong thư mục language_files có nội dung
<%
Const strTxtAuto = "Tự động"
Const strTxtTELEX = "TELEX"
Const strTxtVNI = "VNI"
Const strTxtVIQR = "VIQR"
Const strTxtOff = "Tắt"
Const strTxtRemember = "Ghi nhớ"
%>
7 Mở file language_file_inc.asp
a.1 Tìm dòng code
Const strTxtSecurityCodeDidNotMatch2 = "The Security Code entered did not match that displayed."
%>
a.2 Thêm xuống dưới
Trang 3<! #include file="ha_language_file_inc.asp" >
8 Copy thư mục Viettyping vào website của bạn (wwf)
9 Copy file clock vào website của bạn (wwf)
10 Down Unikey 3.63, sau khi install xong, chọn bảng mã là NCR Decimal
a.1 Hình vẽ
a.2 Mở file language_file_inc.asp
a.1.1 Tìm dòng code
Const strTxtWelcome = "Welcome"
a.1.2 Thay thế bằng
Const strTxtWelcome = "Chào mừng"
a.1.3 Việc thay thế ở đây chính là việc bạn nhập chữ “Chào mừng” thay cho chữ “Welcome” theo kiểu gõ bạn đang chọn bằng bảng mã NCR Decimal mà bạn đã chọn ở trên Nó tự động hiện ra chữ "Chào mừng"
a.1.4 Làm tương tự cho các dòng còn lại trong file này và các file khác trong thư mục language_files
Bài 2: Giới tính
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
Trang 41 Mở table wwForum.mdb
a.1 Mở tblAuthor, thêm trường: Sex, kiểu: Yes/No, giá trị default: True
a.2 Hình vẽ
2 Mở file register.asp
a.1 Tìm dòng code
a.2 Thêm xuống dưới
Dim blnSex 'Holds the member Sex
b.1 Tìm dòng code
blnConfirmPassOK = true
b.2 Thêm xuống dưới
blnSex = true
c.1 Tìm dòng code
blnShowEmail = CBool(Request.Form("emailShow"))
c.2 Thêm xuống dưới
blnSex = CBool(Request.Form("sex"))
d.1 Tìm dòng code
.Fields("Show_email") = blnShowEmail
d.2 Thêm xuống dưới
Trang 5.Fields("Sex") = blnSex
e.1 Tìm dòng code
blnShowEmail = CBool(rsCommon("Show_email"))
e.2 Thêm xuống dưới
blnSex = CBool(rsCommon("Sex"))
f.1 Tìm dòng code
<tr class="tableRow">
<td><% = strTxtEmail %><%
f.2 Thêm lên trên
<tr class="tableRow">
<td><% = strTxtSex %></td>
<td>
<img border="0" src="forum_images/mod/male.gif"> <% = strTxtMale %> <input type="radio" name="sex" value="True" <% If blnSex = True Then Response.Write "checked" %>checked>
<img border="0" src="forum_images/mod/female.gif"> <% = strTxtFemale %> <input type="radio" name="sex" value="False" <% If blnSex = False Then Response.Write "checked" %> />
</td>
</tr>
3 Mở file ha_language_file_inc.asp
a.1 Tìm dòng code
Const strTxtRemember = "Ghi nhớ"
a.2 Thêm xuống dưới
Const strTxtSex = "Giới tính"
Const strTxtMale = "Nam"
Const strTxtFemale = "Nữ"
4 Mở file member_profile.asp
a.1 Tìm dòng code
a.2 Thêm xuống dưới
Trang 6Dim strSex 'Hold the sex of member
b.1 Tìm dòng code
strEmail = rsCommon("Author_email")
b.2 Thêm xuống dưới
strSex = CBool(rsCommon("Sex"))
c.1 Tìm dòng code
<tr>
<td><% = strTxtInterests %>:</td>
<td><% If strInterests = "" OR IsNull(strInterests) Then Response.Write(strTxtNotGiven) Else Response.Write(strInterests) %></td>
</tr>
c.2 Thêm xuống dưới
<tr>
<td><% = strTxtSex %>:</td>
<td><% If strSex = True Then Response.Write("<img src='forum_images/mod/male.gif'>") Else Response.Write("<img src='forum_images/mod/female.gif'>") %></td>
</tr>
5 Mở file forum_posts.asp
a.1 Tìm dòng code
a.2 Thêm xuống dưới
Dim strSex 'Hold the sex of member
b.1 Tìm dòng code
& "Author.Avatar_title, "
b.2 Thêm xuống dưới
& strDbTable & "Author.Sex, "
c.1 Tìm dòng code
'16 = tblGroup.Name,
'17 = tblGroup.Stars,
'18 = tblGroup.Custom_stars
'19 = tblGuestName.Name
Trang 7c.2 Thay thế bằng
'16 = tblAuthor.Sex,
'17 = tblGroup.Name,
'18 = tblGroup.Stars,
'19 = tblGroup.Custom_stars
'20 = tblGuestName.Name
d.1 Tìm dòng code
'16 = tblGroup.Name,
'17 = tblGroup.Stars,
'18 = tblGroup.Custom_stars
'19 = tblGuestName.Name
d.2 Thay thế bằng
'16 = tblAuthor.Sex,
'17 = tblGroup.Name,
'18 = tblGroup.Stars,
'19 = tblGroup.Custom_stars
'20 = tblGuestName.Name
e.1 Tìm dòng code
strGroupName = sarryPosts(16,intCurrentRecord) intRankStars = CInt(sarryPosts(17,intCurrentRecord)) intRankStars = CInt(sarryPosts(17,intCurrentRecord))
strGuestUsername = sarryPosts(19,intCurrentRecord) e2 Thay thế bằng
strSex = sarryPosts(16,intCurrentRecord)
strGroupName = sarryPosts(17,intCurrentRecord) intRankStars = CInt(sarryPosts(18,intCurrentRecord)) strRankCustomStars = sarryPosts(19,intCurrentRecord) strGuestUsername = sarryPosts(20,intCurrentRecord) f.1 Tìm dòng code
Trang 8Response.Write(vbCrLf & " <br /><br />" & strTxtJoined & ": " & DateFormat(dtmAuthorRegistration))
f.2 Thêm xuống dưới
'Show the sex
Response.Write(vbCrLf & " <br />" & strTxtSex & ": ")
If strSex = True then
strSex = "<img src='forum_images/mod/male.gif'>"
Elseif strSex = False then
strSex = "<img src='forum_images/mod/female.gif'>"
End If
Response.Write(vbCrLf & strSex)
6 Copy thư mục sex vào thư mục forum_images