1. Trang chủ
  2. » Công Nghệ Thông Tin

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

8 298 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 8
Dung lượng 87,56 KB

Nội dung

Bài 3: Chào mừng 1. Mở file ha_language_file_inc.asp a.1. Tìm dòng code Const strTxtFemale = "N&#7919;" a.2. Thêm xuống dưới Const strTxtWelcomeHA = "Ch&#224;o m&#7915;ng b&#7841;n &#273;&#7871;n v&#7899;i C&#7897;ng &#273;&#7891;ng ASP Vi&#7879;t Nam" Const strTxtWelcomeDetail1 = "N&#7871;u l&#224; l&#7847;n &#273;&#7847;u ti&#234;n b&#7841;n duy&#7879;t Di&#7877;n &#273;&#224;n n&#224;y, h&#227;y click chu&#7897;t v&#224;o" Const strTxtWelcomeDetail2 = "&#273;&#7875; xem h&#432;&#7899;ng d&#7851;n. B&#7841;n n&#234;n" Const strTxtWelcomeDetail3 = "tr&#432;&#7899;c khi g&#7917;i b&#224;i. &#272;&#7875; xem c&#225;c b&#224;i vi&#7871;t, h&#227;y ch&#7885;n c&#225;c Di&#7877;n &#273;&#224;n m&#224; b&#7841;n mu&#7889;n &#7903; b&#234;n d&#432;&#7899;i. " 2. Mở file default.asp a.1. Tìm dòng code vbCrLf & " </td>") End If %> </table> a.2. Thêm xuống dưới <table cellspacing="1" cellpadding="3" class="tableBorder" align="center"> <tr class="tableLedger"> <td> + <% = strTxtWelcomeHA %> + </td> </tr> <tr> <td colspan="5" class="tableRow"><% = strTxtWelcomeDetail1 %> <a href="help.asp"><% = strTxtHelp %></a> <% = strTxtWelcomeDetail2 %> <a href="registration_rules.asp?FID=0"><% = strTxtRegister %></a> <% = strTxtWelcomeDetail3 %></td> </tr> </table><br /> Bài 4: Thành viên tích cực – thành viên mới – chủ đề mới – bài viết mới 1. Mở file ha_language_file_inc.asp a.1. Tìm dòng code Const strTxtWelcomeDetail3 = "tr&#432;&#7899;c khi g&#7917;i b&#224;i. &#272;&#7875; xem c&#225;c b&#224;i vi&#7871;t, h&#227;y ch&#7885;n c&#225;c Di&#7877;n &#273;&#224;n m&#224; b&#7841;n mu&#7889;n &#7903; b&#234;n d&#432;&#7899;i. " a.2. Thêm xuống dưới Const strTxtBestMember = "Th&#224;nh vi&#234;n t&#237;ch c&#7921;c" Const strTxtNewMember = "Th&#224;nh vi&#234;n m&#7899;i" Const strTxtLastNewTopic = "Ch&#7911; &#273;&#7873; m&#7899;i" Const strTxtLastNewPost = "B&#224;i vi&#7871;t m&#7899;i" Const strTxtNoMember = "Kh&#244;ng c&#243; Th&#224;nh vi&#234;n n&#224;o c&#7843;" Const strTxtNoTopic = "Kh&#244;ng c&#243; Ch&#7911; &#273;&#7873; n&#224;o c&#7843;" Const strTxtNoPost = "Kh&#244;ng c&#243; B&#224;i vi&#7871;t n&#224;o c&#7843;" 2. Mở file default.asp a.1. Tìm dòng code 'Clean up Call closeDatabase() a.2. Thay thế bằng 'Clean up 'Call closeDatabase() b.1. Tìm dòng code %> </table> <br /> <table class="basicTable" border="0" cellspacing="0" cellpadding="2" align="center" style="width:550px;"> <tr class="smText"> b.2. Thêm lên trên 'Clean up Set rsCommon = Nothing Call closeDatabase() c.1. Tìm dòng code <td colspan="5" class="tableRow"><% = strTxtWelcomeDetail1 %> <a href="help.asp"><% = strTxtHelp %></a> <% = strTxtWelcomeDetail2 %> <a href="registration_rules.asp?FID=0"><% = strTxtRegister %></a> <% = strTxtWelcomeDetail3 %></td> </tr> </table><br /> c.2. Thêm xuống dưới <%Dim intLoop%> <table cellspacing="1" cellpadding="3" class="tableBorder" align="center"> <tr class="tableLedger"> <td width="25%" align="center"> + <% = strTxtBestMember %> + </td> <td width="25%" align="center"> + <% = strTxtNewMember %> + </td> <td width="25%" align="center"> + <% = strTxtLastNewTopic %> + </td> <td width="25%" align="center"> + <% = strTxtLastNewPost %> + </td> </tr> <tr class="tableRow"> <td valign=top align="left"> <% strSQL = "SELECT TOP 10 " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID , " & strDbTable & "Author.No_of_posts " & _ "FROM " & strDbTable & "Author" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Author.No_of_posts > 0 " & _ "ORDER BY " & strDbTable & "Author.No_of_posts DESC;" 'Query the database rsCommon.Open strSQL, adoCon, 3, 3 if rsCommon.RecordCount > 0 then For intLoop = 1 To rsCommon.RecordCount if rsCommon.EOF then exit For if Len(intLoop) < 2 then intLoop = 0 & intLoop Response.Write intLoop & ". <A HREF=""member_profile.asp?PF=" & rsCommon("Author_ID") & " & rsCommon("Username") & "</A> [" & strTxtPosts & ": " & rsCommon("No_of_posts") & "]<BR>" rsCommon.MoveNext Next else Response.Write(vbCrLf & "<img src=" & strImagePath & "moved_icon.gif border=0> " & strTxtNoMember) end if 'Clean up rsCommon.close %> </td> <td valign=top align="left"> <% strSQL = "SELECT TOP 10 " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID , " & strDbTable & "Author.No_of_posts " & _ "FROM " & strDbTable & "Author" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Author.Author_ID > 2 " & _ "ORDER BY " & strDbTable & "Author.Author_ID DESC;" 'Query the database rsCommon.Open strSQL, adoCon, 3, 3 if rsCommon.RecordCount > 0 then For intLoop = 1 To rsCommon.RecordCount if rsCommon.EOF then exit For if Len(intLoop) < 2 then intLoop = 0 & intLoop Response.Write intLoop & ". <A HREF=""member_profile.asp?PF=" & rsCommon("Author_ID") & """>" & rsCommon("Username") & "</A> [" & strTxtPosts & ": " & rsCommon("No_of_posts") & "]<BR>" rsCommon.MoveNext Next else Response.Write(vbCrLf & "<img src=" & strImagePath & "moved_icon.gif border=0> " & strTxtNoMember) end if 'Clean up rsCommon.close %> </td> <td valign=top align="left"> <% strSQL = "SELECT TOP 10 " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_replies " & _ "FROM " & strDbTable & "Topic" & strDBNoLock & " " & _ "ORDER BY " & strDbTable & "Topic.Topic_ID DESC;" 'Query the database rsCommon.Open strSQL, adoCon, 3, 3 if rsCommon.RecordCount > 0 then For intLoop = 1 To rsCommon.RecordCount if rsCommon.EOF then exit For if Len(intLoop) < 2 then intLoop = 0 & intLoop Response.Write intLoop & ". <A HREF=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & """>" & Left(rsCommon("Subject"), 20) & "</A> [" & strTxtReplies & ": " & rsCommon("No_of_replies") & "]<BR>" rsCommon.MoveNext Next else Response.Write(vbCrLf & "<img src=" & strImagePath & "moved_icon.gif border=0> " & strTxtNoTopic) end if 'Clean up rsCommon.close %> </td> <td valign=top align="left"> <% strSQL = "SELECT TOP 10 " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_replies, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Thread_ID " & _ "FROM " & strDbTable & "Topic" & strDBNoLock & "," & strDbTable & "Thread" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Topic.Last_Thread_ID = " & strDbTable & "Thread.Thread_ID " & _ "ORDER BY " & strDbTable & "Topic.Last_Thread_ID DESC;" 'Query the database rsCommon.Open strSQL, adoCon, 3, 3 if rsCommon.RecordCount > 0 then For intLoop = 1 To rsCommon.RecordCount if rsCommon.EOF then exit For if Len(intLoop) < 2 then intLoop = 0 & intLoop Response.Write intLoop & ". <A TITLE=""" & removeHTML(rsCommon("Message"), 150, true) & """ HREF=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & "&get=last#" & rsCommon("Thread_ID") & """>" & Left(rsCommon("Subject"), 20) & "</A> [" & strTxtReplies & ": " & rsCommon("No_of_replies") & "]<BR>" rsCommon.MoveNext Next else Response.Write(vbCrLf & "<img src=" & strImagePath & "moved_icon.gif border=0> " & strTxtNoTopic) end if 'Clean up rsCommon.close %> </td> </tr> </tr> </table><br /> . g&#7917;i b& #22 4;i. & #27 2;&#7875; xem c& #22 5;c b& #22 4;i vi&#7871;t, h& #22 7;y ch&#7885;n c& #22 5;c Di&#7877;n & #27 3;& #22 4;n m& #22 4; b&#7841;n. xem c& #22 5;c b& #22 4;i vi&#7871;t, h& #22 7;y ch&#7885;n c& #22 5;c Di&#7877;n & #27 3;& #22 4;n m& #22 4; b&#7841;n mu&#7889;n &#7903; b& #23 4;n d&#4 32; &#7899;i ti& #23 4;n b&#7841;n duy&#7879;t Di&#7877;n & #27 3;& #22 4;n n& #22 4;y, h& #22 7;y click chu&#7897;t v& #22 4;o" Const strTxtWelcomeDetail2 = "& #27 3;&#7875;

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

w