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

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

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

Thông tin tài liệu

Bài 9: Số bài viết trung bình mỗi ngày 1. Mở file forum_posts.asp a.1. Tìm dòng code Response.Write(vbCrLf & " <br />" & strTxtPosts & ": " & lngAuthorNumOfPosts) a.2. Thay thế bằng Response.Write("<br />" & strTxtPosts & ": ") %> <% = lngAuthorNumOfPosts %> <% If lngAuthorNumOfPosts > 0 AND DateDiff("d", dtmAuthorRegistration, Now()) > 0 Then Response.Write(" [" & FormatNumber(lngAuthorNumOfPosts / DateDiff("d", dtmAuthorRegistration, Now()), 2) & " " & strTxtPostsPerDay) & "]" %> <% Bài 10: Kinh nghiệm 1. Mở file forum_posts.asp a.1. Tìm dòng code Dim strSex 'Hold the sex of member a.2. Thêm xuống dưới Dim lngExp, lngAuthorNumOfPostsExp, rsPostExp lngAuthorNumOfPostsExp = 0 Set rsPostExp = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT " & strDbTable & "Author.No_of_posts " strSQL = strSQL & "FROM " & strDbTable & "Author; " 'Set the cursor type property of the record set to dynamic so we can naviagate through the record set rsPostExp.CursorType = 1 'Query the database rsPostExp.Open strSQL, adoCon Do While NOT rsPostExp.EOF lngAuthorNumOfPostsExp = lngAuthorNumOfPostsExp + CLng(rsPostExp("No_of_posts")) rsPostExp.MoveNext Loop rsPostExp.Close() Set rsPostExp = Nothing b.1. Tìm dòng code Response.Write("<br />" & strTxtPosts & ": ") %> <% = lngAuthorNumOfPosts %> <% If lngAuthorNumOfPosts > 0 AND DateDiff("d", dtmAuthorRegistration, Now()) > 0 Then Response.Write(" [" & FormatNumber(lngAuthorNumOfPosts / DateDiff("d", dtmAuthorRegistration, Now()), 2) & " " & strTxtPostsPerDay) & "]" %> <% b.2. Thêm xuống dưới Response.Write("<br />" & strTxtExp & ": ") lngExp = FormatPercent(lngAuthorNumOfPosts/lngAuthorNumOfPostsExp, 2) %> <img src="<% = strImagePath %>bar_graph_image.gif" width="<% = CInt(Replace(CStr(lngExp), "%", "", 1, -1, 1)) * 2 %>" height="11" align="middle"> [<% = lngExp %>] <% Bài 11: Nút Music – Flash 1. Tạo file RTE_function.asp trong thư mục RTE_configuration có nội dung //Add by flash, music,real, math by congmanh1981@yahoo.com function paste_embed(type){ var url = prompt("Enter url:", "http://"); if (url !="" && url !="http://" && url != null){ var emwidth = prompt("Width:", "300"); var emheight = prompt("height:", "300"); if (type == "flash") { url = "[FLASH WIDTH=" + emwidth + " HEIGHT=" + emheight + "]" + url + "[/FLASH]"; } if (type == "media") { url = "[MUSIC WIDTH=" + emwidth + " HEIGHT=" + emheight + "]" + url + "[/MUSIC]"; } FormatText("paste", url); } } 2. Mở file RTE_javascript.asp a.1. Tìm dòng code <! #include file="RTE_configuration/RTE_setup.asp" > a.2. Thêm xuống dưới <! #include file="RTE_configuration/RTE_function.asp" > 3. Mở file RTE_quick_reply_toolbar_inc.asp a.1. Tìm dòng code Response.Write("');") End If a.2. Thêm xuống dưới Response.Write(vbCrLf & " document.writeln('<img src=""" & strImagePath & "toolbar_separator.gif"" align=""absmiddle"">") Response.Write("<img src=""" & strImagePath & " mod/post_button_flash.gif"" align=""absmiddle"" border=""0"" onClick=""paste_embed(\'flash\')"" title=""" & strTxtAddFlash & """ class=""WebWizRTEbutton"" onmouseover=""overIcon(this)"" onmouseout=""outIcon(this)"">") Response.Write("<img src=""" & strImagePath & " mod/post_button_media.gif"" align=""absmiddle"" border=""0"" onClick=""paste_embed(\'media\')"" title=""" & strTxtAddMedia & """ class=""WebWizRTEbutton"" onmouseover=""overIcon(this)"" onmouseout=""outIcon(this)"">") Response.Write("');") 4. Mở file RTE_toolbar_inc.asp a.1. Tìm dòng code If blnOrderList OR blnUnOrderList OR blnOutdent OR blnIndent Or blnHorizontalRule Then Response.Write("');") a.2. Thêm xuống dưới Response.Write(vbCrLf & " document.writeln('<img src=""" & strImagePath & "toolbar_separator.gif"" align=""absmiddle"">") Response.Write("<img src=""" & strImagePath & " mod/post_button_flash.gif"" align=""absmiddle"" border=""0"" onClick=""paste_embed(\'flash\')"" title=""" & strTxtAddFlash & """ class=""WebWizRTEbutton"" onmouseover=""overIcon(this)"" onmouseout=""outIcon(this)"">") Response.Write("<img src=""" & strImagePath & "mod/post_button_media.gif"" align=""absmiddle"" border=""0"" onClick=""paste_embed(\'media\')"" title=""" & strTxtAddMedia & """ class=""WebWizRTEbutton"" onmouseover=""overIcon(this)"" onmouseout=""outIcon(this)"">") Response.Write("');") 5. Mở file ha_language_file_inc.asp a.1. Tìm dòng code Const strTxtExp = "Kinh nghi&#7879;m" a.2. Thêm xuống dưới Const strTxtAddFlash = "Ho&#7841;t h&#236;nh Flash" Const strTxtAddMedia = "Nh&#7841;c Media" 6. Copy file music vào thư mục forum_images/mod . prompt("Enter url:", "http://"); if (url !="" && url !="http://" && url != null){ var emwidth = prompt("Width:", "300");. Bài 9: Số bài viết trung bình mỗi ngày 1. Mở file forum_ posts.asp a.1. Tìm dòng code Response.Write(vbCrLf & " <br />" & strTxtPosts & " ;: " &. " " & strTxtPostsPerDay) & "]" %> <% Bài 1 0: Kinh nghiệm 1. Mở file forum_ posts.asp a.1. Tìm dòng code Dim strSex 'Hold the sex of member a.2.

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

Từ khóa liên quan

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

Tài liệu liên quan