Hướng dẫn thiết kế thiết kế forum nhanh chóng và đơn giản

53 254 0
Hướng dẫn thiết kế   thiết kế forum nhanh chóng và đơn giản

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

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Bài 1: Việt hóa Hướng dẫn thiết kế : Thiết kế Forum nhanh chóng đơn giản Down code Wwf 8.03 Thông tin đăng nhập:  Username: admin  Password: admin Mở file browser_page_encoding_inc.asp a.1 Tìm dòng code Const strPageEncoding = "iso-8859-1" a.2 Thay 'Const strPageEncoding = "iso-8859-1" b.1 Tìm dòng code 'Const strPageEncoding = "utf-8" b.2 Thay Const strPageEncoding = "utf-8" Mở file common.asp a.1 Tìm dòng code Server.ScriptTimeout = 90 Session.Timeout = 20 a.2 Thêm xuống Session.Codepage=65001 Mở file footer.asp a.1 Tìm dòng code a.2 Thêm lên Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com #include file=" /clock.asp" > Mở file admin_footer_inc.asp a.1 Tìm dòng code a.2 Thêm lên Tạo file ha_language_file_inc.asp thư mục language_files có nội dung Mở file language_file_inc.asp a.1 Tìm dòng code Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Const strTxtSecurityCodeDidNotMatch2 = "The Security Code entered did not match that displayed." %> a.2 Thêm xuống Copy thư mục Viettyping vào website bạn (wwf) Copy file clock vào website bạn (wwf) 10 Down Unikey 3.63, sau install xong, chọn bảng mã 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 Const strTxtWelcome = "Chào mừng" a.1.3 Việc thay việc bạn nhập chữ “Chào mừng” thay cho chữ “Welcome” theo kiểu gõ bạn chọn bảng mã NCR Decimal mà bạn chọn Nó tự động chữ "Chào mừng" a.1.4 Làm tương tự cho dòng lại file file khác thư mục language_files Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Bài 2: Giới tính 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ẽ Mở file register.asp a.1 Tìm dòng code Dim strAdminNotes about the user 'Holds admin/modertor info/notes a.2 Thêm xuống Dim blnSex 'Holds the member Sex b.1 Tìm dòng code blnConfirmPassOK = true b.2 Thêm xuống blnSex = true c.1 Tìm dòng code blnShowEmail = CBool(Request.Form("emailShow")) c.2 Thêm xuống Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com blnSex = CBool(Request.Form("sex")) d.1 Tìm dòng code Fields("Show_email") = blnShowEmail d.2 Thêm xuống Fields("Sex") = blnSex e.1 Tìm dòng code blnShowEmail = CBool(rsCommon("Show_email")) e.2 Thêm xuống blnSex = CBool(rsCommon("Sex")) f.1 Tìm dòng code Mở file forum_posts.asp a.1 Tìm dòng code Dim strForumPassword 'Holds the forum password Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com a.2 Thêm xuống Dim strSex 'Hold the sex of member b.1 Tìm dòng code & "Author.Avatar_title, " b.2 Thêm xuống & 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 '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 '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) Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com intRankStars = CInt(sarryPosts(17,intCurrentRecord)) intRankStars = CInt(sarryPosts(17,intCurrentRecord)) strGuestUsername = sarryPosts(19,intCurrentRecord) e2 Thay 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 & " " & strTxtJoined & ": " & DateFormat(dtmAuthorRegistration)) f.2 Thêm xuống 'Show the sex Response.Write(vbCrLf & " " & strTxtSex & ": ") If strSex = True then strSex = "" Elseif strSex = False then strSex = "" End If Response.Write(vbCrLf & strSex) Copy thư mục sex vào thư mục forum_images Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Bài 3: Chào mừng Mở file ha_language_file_inc.asp a.1 Tìm dòng code Const strTxtFemale = "Nữ" a.2 Thêm xuống Const strTxtWelcomeHA = "Chào mừng bạn đến với Cộng đồng ASP Việt Nam" Const strTxtWelcomeDetail1 = "Nếu là lần đầu tiên bạn duyệt Diễn đàn này, hãy click chuột vào" Const strTxtWelcomeDetail2 = "để hướng dẫn Bạn nên" xem Const strTxtWelcomeDetail3 = "trước gửi bài Để xem các bài viết, hãy chọn các Diễn đàn mà bạn muốn ở bên dưới " Mở file default.asp a.1 Tìm dòng code vbCrLf & " ") End If %> a.2 Thêm xuống cellpadding="3" + + class="tableBorder" Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Bài 4: Thành viên tích cực – thành viên – chủ đề – viết Mở file ha_language_file_inc.asp a.1 Tìm dòng code Const strTxtWelcomeDetail3 = "trước gửi bài Để xem các bài viết, hãy chọn các Diễn đàn mà bạn muốn ở bên dưới " a.2 Thêm xuống Const strTxtBestMember = "Thành viên tích cực" Const strTxtNewMember = "Thành viên mới" Const strTxtLastNewTopic mới" = "Chủ đề Const strTxtLastNewPost = "Bài viết mới" Const strTxtNoMember = "Không có Thành viên nào cả" Const strTxtNoTopic = "Không có Chủ đề nào cả" Const strTxtNoPost = "Không viết nào cả" có Bài Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com If blnAdmin OR blnModerator Then Response.Write("") a.2 Thêm xuống Response.Write(vbCrLf) %> > > Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Mở file forum_topics.asp a.1 Tìm dòng code %> > #include a.2 Thay %> #include file="includes/form_sort_inc.asp" > #include file="includes/page_link_inc.asp" > Mở file ha_language_file_inc.asp a.1 Tìm dòng code Const strTxtYouHaveNot = "Bạn không có gửi bài" a.2 Thêm xuống Const strTxtSortBy = "Sắp xếp theo" Const strTxtOrderBy = "chiều" Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Const strTxtASC = "Tăng dần" Const strTxtDESC = "Giảm dần" Const strTxtResult = "Kết quả" Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Bài 15: Tỷ lệ hoạt động Box Mở file ha_language_file_inc.asp a.1 Tìm dòng code Const strTxtResult = "Kết quả" a.2 Thêm xuống Const strTxtActivity = "Hoạt động" Mở file default.asp a.1 Tìm dòng code Dim strSubject a.2 Thêm xuống Dim rsNoofPostAll Dim lngTotalNumberOfPostsAll Dim lngNumberOfPostsAll Dim lngTmp Dim intNumOfForums b.1 Tìm dòng code lngLastEntryUserID = lngLastSubEntryUserID dtmLastEntryDateAllForums = dtmLastSubEntryDate End If b.2 Thêm xuống lngTmp = intNumOfForums = lngTmp = lngSubForumNumberOfPosts intNumOfForums = intNumOfForums + lngTmp strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Set rsNoofPostAll = Server.CreateObject("ADODB.Recordset") rsNoofPostAll.Open strSQL, adoCon lngTotalNumberOfPostsAll = lngNumberOfPostsAll = Do While NOT rsNoofPostAll.EOF lngNumberOfPostsAll = CLng(rsNoofPostAll("No_of_posts")) lngTotalNumberOfPostsAll = lngTotalNumberOfPostsAll + lngNumberOfPostsAll rsNoofPostAll.MoveNext Loop rsNoofPostAll.Close Set rsNoofPostAll = Nothing c.1 Tìm dòng code strSubForums = strSubForums & " " & strSubForumName & "" c.2 Thay strSubForums = strSubForums & " " & strSubForumName & "" & " (" & Round((intNumOfForums/lngTotalNumberOfPostsAll)*100,2) & "%)" d.1 Tìm dòng code Response.Write("" & strForumDiscription & strSubForums & "" & _ vbCrLf & " ") Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com d.2 Thay Response.Write("" & strForumDiscription & strSubForums) strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" Set rsNoofPostAll = Server.CreateObject("ADODB.Recordset") rsNoofPostAll.Open strSQL, adoCon lngTotalNumberOfPostsAll = lngNumberOfPostsAll = Do While NOT rsNoofPostAll.EOF lngNumberOfPostsAll = CLng(rsNoofPostAll("No_of_posts")) lngTotalNumberOfPostsAll = lngTotalNumberOfPostsAll + lngNumberOfPostsAll rsNoofPostAll.MoveNext Loop rsNoofPostAll.Close Set rsNoofPostAll = Nothing strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum.Sub_ID = " & intForumID & " ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" Dim rsNoofPostSubForum Set rsNoofPostSubForum = Server.CreateObject("ADODB.Recordset") Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com rsNoofPostSubForum.CursorType = 'Query the database rsNoofPostSubForum.Open strSQL, adoCon lngTmp = intNumOfForums = Do While NOT rsNoofPostSubForum.EOF lngTmp = CLng(rsNoofPostSubForum("No_of_posts")) intNumOfForums = intNumOfForums + lngTmp rsNoofPostSubForum.MoveNext Loop Response.Write(vbCrLf & "") Response.Write( strTxtActivity & ": " & "") If lngNumberOfPosts Then If intNumOfForums Then Dim dblPollVotePercentageSub dblPollVotePercentageSub = FormatPercent(((lngNumberOfPosts+intNumOfForums)/lngTotalN umberOfPostsAll), 2) %> [] Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com [] [] [0%] 1000){ d.1 Tìm dòng code  (max 200 characters) d.2 Thay  (max 1000 characters) Mở table wwForum.mdb a.1 Mở tblAuthor, sửa trường: Signature, kiểu: Text -> Memo Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com a.2 Hình vẽ Bài 17: Sắp xếp lại trang hiển thị phụ mục giống trang default.asp Mở file forum_topics.asp a.1 Tìm dòng code a.2 Thay Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com   b.1 Tìm dòng code vbCrLf & " " & lngNumberOfTopics & "" & _ vbCrLf & " " & lngNumberOfPosts & "" & _ vbCrLf & " ") If lngNumberOfPosts Then 'Don't disply last post details if there are none Response.Write(DateFormat(dtmLastEntryDate) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate) & "" & _ "" & strTxtBy & " " & strLastEntryUser & " ") End If Response.Write("" & _ vbCrLf & " ") b.2 Thay vbCrLf & " ") If lngNumberOfPosts Then 'Don't disply last post details if there are none Response.Write(DateFormat(dtmLastEntryDate) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate) & "" & _ Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com "" & strTxtBy & " " & strLastEntryUser & " ") End If Response.Write("" & _ vbCrLf & " " & lngNumberOfTopics & "" & _ vbCrLf & " " & lngNumberOfPosts & "") %> a.2 Thêm xuống Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com b.1 Tìm dòng code #include file="includes/show_forum_permissions_inc.asp" > b.2 Thêm xuống Copy file top-bottom vào thư mục forum_images/mod [...]... strSubForums "" Then strSubForums = strSubForums & ", " d.2 Thay thế bằng If strSubForums "" Then strSubForums = strSubForums e.1 Tìm dòng code Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com strSubForums = strSubForums & "" & strSubForumName & "" e.2 Thay thế bằng strSubForums = strSubForums... class="tableRow"> 3 Copy thư mục adv vào thư mục forum_ images Bài 6: Sắp xếp lại trang default.asp 1 Hình vẽ Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 2 Mở file default.asp a.1 Tìm dòng code ... & "Forum. * FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum. Sub_ID = " & intForumID & " ORDER BY " & strDbTable & "Forum. Forum_Order ASC;" Dim rsNoofPostSubForum Set rsNoofPostSubForum... http://www.simpopdf.com strSubForums = strSubForums & "" & strSubForumName & "" e.2 Thay strSubForums = strSubForums & "

Ngày đăng: 04/12/2015, 16:02