Tìm dòng code a.2.. Tìm dòng code 'Trim signature down to a 255 max characters to prevent database errors strSignature = MidstrSignature, 1, 255 b.2.. Thay thế bằng 'Trim signature down
Trang 1Bài 16: Độ dài chữ ký 1000 ký tự
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Mở file register.asp
a.1 Tìm dòng code
a.2 Thay thế bằng
b.1 Tìm dòng code
'Trim signature down to a 255 max characters to prevent database errors
strSignature = Mid(strSignature, 1, 255)
b.2 Thay thế bằng
'Trim signature down to a 1200 max characters to prevent database errors strSignature = Mid(strSignature, 1, 1200)
c.1 Tìm dòng code
//Check that the signature is not above 200 chracters
if (formArea.signature.value.length > 200){
c.2 Thay thế bằng
//Check that the signature is not above 1000 chracters
if (formArea.signature.value.length > 1000){
d.1 Tìm dòng code
<td valign="top"><% = strTxtSignature %><br /><span class="smText"><% = strTxtSignatureLong %> (max 200 characters)
d.2 Thay thế bằng
<td valign="top"><% = strTxtSignature %><br /><span class="smText"><% = strTxtSignatureLong %> (max 1000 characters)
2 Mở table wwForum.mdb
a.1 Mở tblAuthor, sửa trường: Signature, kiểu: Text -> Memo
a.2 Hình vẽ
Trang 2Bài 17: Sắp xếp lại trang hiển thị phụ mục giống trang default.asp
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Mở file forum_topics.asp
a.1 Tìm dòng code
<td width="56%"><% = strTxtSub & " " & strTxtForums %></td>
<td width="7%"><% = strTxtTopics %></td>
<td width="7%"><% = strTxtPosts %></td>
<td width="29%"><% = strTxtLastPost %></td>
a.2 Thay thế bằng
<td width="52%"><% = strTxtSub & " " & strTxtForums %></td>
Trang 3<td width="25%" align="center"><% = strTxtLastPost %></td>
<td width="8%" align="center"><% = strTxtTopics %></td>
<td width="8%" align="center"><% = strTxtPosts %></td>
<td width="3%" align="center"> </td>
b.1 Tìm dòng code
vbCrLf & " <td align=""center"">" & lngNumberOfTopics & "</td>" & _
vbCrLf & " <td align=""center"">" & lngNumberOfPosts & "</td>" & _
vbCrLf & " <td class=""smText"" align=""right"" nowrap>")
" " & TimeFormat(dtmLastEntryDate) & "" & _
"<br />" & strTxtBy & " <a href=""member_profile.asp?PF=" &
lngLastEntryUserID & strQsSID2 & """ class=""smLink"">" & strLastEntryUser &
"</a> <a href=""get_last_post.asp?FID=" & intSubForumID & strQsSID2 & """><img src=""" & strImagePath & "right_arrow.gif"" align=""absmiddle"" border=""0"" alt="""
& strTxtViewLastPost & """></a>")
End If
Response.Write("</td>" & _
vbCrLf & " </tr>")
b.2 Thay thế bằng
vbCrLf & " <td class=""smText"" align=""right"" nowrap>")
" " & TimeFormat(dtmLastEntryDate) & "" & _
"<br />" & strTxtBy & " <a href=""member_profile.asp?PF=" &
lngLastEntryUserID & strQsSID2 & """ class=""smLink"">" & strLastEntryUser &
"</a> <a href=""get_last_post.asp?FID=" & intSubForumID & strQsSID2 & """><img src=""" & strImagePath & "right_arrow.gif"" align=""absmiddle"" border=""0"" alt="""
& strTxtViewLastPost & """></a>")
End If
Response.Write("</td>" & _
vbCrLf & " <td align=""center"">" & lngNumberOfTopics & "</td>" & _
vbCrLf & " <td align=""center"">" & lngNumberOfPosts & "</td><td>")
%>
Trang 4<a href="new_topic_form.asp?FID=<% = intSubForumID %>" target="_self"><img
src="<% = strImagePath %>mod/icon_post.gif" border="0" align="absmiddle" alt="<%
= strTxtNewTopic %>"></a>
<a href="search_form.asp?FID=<% = intSubForumID %>" target="_self"><img
src="<% = strImagePath %>mod/icon_search.gif" border="0" align="absmiddle" alt="<% = strTxtSearch %>"></a>
<%
Response.Write(vbCrLf & " </td></tr>")
Bài 18: Nút top – down trong forum_posts.asp
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Mở file forum_posts.asp
a.1 Tìm dòng code
<tr class="<% = strPostTableRowClass %>">
<td nowrap>
<span style="float:right">
a.2 Thêm xuống dưới
<% Response.Write(" <a href=""#top""><img src=""" & strImagePath &
"mod/jump_up.gif"" align=""absmiddle"" border=""0""/></a> <a
href=""#bottom""><img src=""" & strImagePath & "mod/jump_down.gif""
align=""absmiddle"" border=""0""/></a>")%>
b.1 Tìm dòng code
<td align="right" class="smText" nowrap><! #include
file="includes/show_forum_permissions_inc.asp" ></td>
</tr>
</table>
b.2 Thêm xuống dưới
<a name="bottom"></a>
2 Copy file top-bottom vào thư mục forum_images/mod
Trang 5Bài 19: Sửa RTE phần trả lời nhanh
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Hình vẽ
2 Copy file RTE_quick vào website của bạn (wwf)
Bài 20: Biểu tượng động
Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
1 Hình vẽ
Trang 62 Mở file message_form_inc.asp
a.1 Tìm dòng code
'If emoticons are enabled show them next to the post window
If blnEmoticons Then
a.2 Thêm xuống dưới
Randomize Timer
b.1 Tìm dòng code
b.2 Thêm lên trên
intIndexPosition = int(RND() * UBound(saryEmoticons)) + 1