Tìm dòng code 'Const strPageEncoding = "utf-8" b.2.. Tạo file ha_language_file_inc.asp trong thư mục language_files có nội dung 7.. Tìm dòng code Const strTxtWelcome = "Welcome" a.1.2.
Trang 1Bài 1: Việt hóa
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%;">
Hướng dẫn thiết kế : Thiết kế Forum nhanh chóng và đơn giản
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
Trang 3Const strTxtSecurityCodeDidNotMatch2 = "The Security Code entered did not match that displayed."
%>
a.2 Thêm xuống dưới
<! #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
Trang 4Bài 2: Giới tính
1 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
Dim strAdminNotes 'Holds admin/modertor info/notes about the user
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
Trang 5blnSex = CBool(Request.Form("sex"))
d.1 Tìm dòng code
.Fields("Show_email") = blnShowEmail
d.2 Thêm xuống dưới
.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>
src="forum_images/mod/male.gif"> <% = strTxtMale %> <input type="radio" name="sex" value="True" <% If blnSex = True Then Response.Write
"checked" %> checked>
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ớ"
Trang 6a.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
Dim blnAccSuspended 'Holds if the user account is suspended
a.2 Thêm xuống dưới
Dim 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
Dim strForumPassword 'Holds the forum password
Trang 7a.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
c.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)
Trang 8intRankStars = 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
Response.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