Hướng dẫn thiết kế : Thiết kế Forum nhanh chóng và đơn giản
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>
<hr style="width: 50%;">
Simpo PDF Merge and Split Unregistered Version -
<!--#includes file="../Viettyping/Viettyping.asp"--> <% Call VietTypeMod()%> <%="<span class=""smText"">HREF="""">" & strWebsiteName & "</A> Website của những người đam mê lập trình ASP </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 Developed by target=_blank HREF="""">Hoai An Net</A></span>"%>
</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ó
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à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
Simpo PDF Merge and Split Unregistered Version -
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 about the user
" & strTxtJoined & ": " & DateFormat(dtmAuthorRegistration)) f.2. Thêm xuống dưới 'Show the sex Response.Write(vbCrLf & " " & 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
Simpo PDF Merge and Split Unregistered Version -
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ữ" a.2. Thêm xuống dưới 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 khi 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. " 2. Mở file default.asp a.1. Tìm dòng code vbCrLf & " </td>") End If
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ước khi 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 dưới
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 -
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>
2. Copy images đè lên các file trong thư mục forum_images 3. Copy default_style vào thư mục css_styles
Bài 8: Music
1. Mở file functions_format_post.asp a.1. Tìm dòng code 'Return the function searchHighlighter = strTempMessage
Simpo PDF Merge and Split Unregistered Version -
End Function a.2. Thêm xuống dưới Function formatWMAPL(ByVal strMessage)
'Declare variables Dim lngStartPos
'Holds search start postions
Dim lngEndPos
'Holds end start postions
Dim saryWMAAttributes 'Holds the features of the input WMA file Dim intAttrbuteLoop
'Holds the attribute loop counter
Dim strWMAWidth of the WMA file
'Holds the string value of the width
Dim intWMAWidth width of the WMA file
'Holds the interger value of the
Dim strWMAHeight height of the WMA file
'Holds the string value of the
Dim intWMAHeight height of the WMA file
'Holds the interger value of the
Dim strBuildWMALink 'Holds the converted BBcode for the WMA file Dim strTempWMAMsg 'Tempoary store for the BBcode Dim strWMALink 'Holds the link to the WMA file
'Loop through all the codes in the message and convert them to formated WMA links Do While InStr(1, strMessage, "[MUSIC", 1) > 0 AND InStr(1, strMessage, "[/MUSIC]", 1) > 0 'Initiliase variables intWMAWidth = 300
Simpo PDF Merge and Split Unregistered Version -
intWMAHeight = 300 strWMALink = "" strBuildWMALink = "" strTempWMAMsg = "" 'Get the WMA BBcode from the message lngStartPos = InStr(1, strMessage, "[MUSIC", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/MUSIC]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Get the original WMA BBcode from the message strTempWMAMsg = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
'Get the start and end in the message of the attributes of the WMA file lngStartPos = InStr(1, strTempWMAMsg, "[MUSIC", 1) + 6
lngEndPos = InStr(lngStartPos, strTempWMAMsg, "]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos
Simpo PDF Merge and Split Unregistered Version -
'If there is something returned get the details (eg. dimensions) of the WMA file If strTempWMAMsg <> "" Then 'Place any attributes for the WMA file in an array saryWMAAttributes = Split(Trim(Mid(strTempWMAMsg, lngStartPos, lngEndPoslngStartPos)), " ") 'Get the dimensions of the WMA file 'Loop through the array of atrributes that are for the falsh file to get the dimentions For intAttrbuteLoop = 0 To UBound(saryWMAAttributes) 'If this is the width attribute then read in the width dimention If InStr(1, saryWMAAttributes(intAttrbuteLoop), "WIDTH=", 1) Then 'Get the width dimention strWMAWidth = Replace(saryWMAAttributes(intAttrbuteLoop), "WIDTH=", "", 1, -1, 1) 'Make sure we are left with a
numeric number if so convert to an interger and place in an interger variable If isNumeric(strWMAWidth) Then intWMAWidth = CInt(strWMAWidth) End If 'If this is the height attribute then read in the height dimention