Hướng dẫn thiết kế : Thiết kế Forum nhanh chóng và đơn giản phần 1 ppsx

8 322 0
Hướng dẫn thiết kế : Thiết kế Forum nhanh chóng và đơn giản phần 1 ppsx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Bà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 <! #includes file=" /Viettyping/Viettyping.asp" > <% Call VietTypeMod()%> <%="<span class=""smText""><A target=_blank HREF=""http://www.hoaian.net"">" & strWebsiteName & "</A> - Website c&#7911;a nh&#7919;ng ng&#432;&#7901;i &#273;am m&#234; l&#7853;p tr&#236;nh ASP<br /></span>"%> <! #include file=" /clock.asp" > <%="<span class=""smText"">Xem t&#7889;t nh&#7845;t v&#7899;i IE 6.0, &#273;&#7897; ph&#226;n gi&#7843;i m&#224;n h&#236;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&#7921; &#273;&#7897;ng" Const strTxtTELEX = "TELEX" Const strTxtVNI = "VNI" Const strTxtVIQR = "VIQR" Const strTxtOff = "T&#7855;t" Const strTxtRemember = "Ghi nh&#7899;" %> 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 <! #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&#224;o m&#7915;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&#224;o m&#7915;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 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 blnSex = 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>&nbsp;&nbsp; <img border="0" src="forum_images/mod/male.gif">&nbsp;&nbsp;<% = strTxtMale %>&nbsp;&nbsp;<input type="radio" name="sex" value="True" <% If blnSex = True Then Response.Write "checked" %> checked> &nbsp;&nbsp;&nbsp;&nbsp; <img border="0" src="forum_images/mod/female.gif">&nbsp;&nbsp;<% = strTxtFemale %>&nbsp;&nbsp;<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&#7899;" a.2. Thêm xuống dưới Const strTxtSex = "Gi&#7899;i t&#237;nh" Const strTxtMale = "Nam" Const strTxtFemale = "N&#7919;" 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 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 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) 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 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 . <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 <! #includes file=" /Viettyping/Viettyping.asp". Bà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. "Ch&#224;o m&#7 915 ;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 1. Mở table wwForum.mdb a .1. Mở tblAuthor,

Ngày đăng: 30/07/2014, 12:21

Tài liệu cùng người dùng

Tài liệu liên quan