CMS1.0/1.2文章分页功能
作者:cmscn 日期:2005-04-11

修改步骤:
1.后台依次执行以下sql语句
alter table article add column PaginationType int
alter table article add column MaxCharPerPage int
update article set PaginationType=0
update article set MaxCharPerPage=5000
2. article_view.asp中
找到:
dim username,topic,word,tim,counter,comto,author,cod,tt,cname,sname,power,emoney
其后添加
,PaginationType,MaxCharPerPage
找到
counter=rs("counter")
下面增加:
PaginationType=rs("PaginationType")
MaxCharPerPage=rs("MaxCharPerPage")
找到:
response.write "<font id=""font_word"" class=htd style=""font-size:14px; font-family:宋体, Verdana, Arial, Helvetica, sans-serif;"">"&word&"</font>"
改为:
%>
<font id=""font_word"" class=htd style=""font-size:14px; font-family:宋体, Verdana, Arial, Helvetica, sans-serif;""><%call ArticleContent()%></font>
<%
3. admin_articel.asp 中
找到
dim topic,keyes,comto,author,power,emoney,username,tim,counter,istop,hidden,word (两处)
其后增加:
,PaginationType,MaxCharPerPage
找到
counter=trim(request.form("counter")) (两处)
其下增加
PaginationType=trim(request.form("PaginationType"))
MaxCharPerPage=trim(request.form("MaxCharPerPage"))
找到
rs("counter")=counter (两处)
其下增加:
rs("PaginationType")=PaginationType
rs("MaxCharPerPage")=MaxCharPerPage
找到:
<tr>
<td valign=top><%response.write tit_fir%>内容:</td>
<td><textarea name=word rows=15 cols=65><%response.write joekoe_cms.code_word(rs("word"))%></textarea></td>
</tr>
其下增加:
<tr>
<td valign=top><%response.write tit_fir%>内容分页方式:</td>
<td><select name="PaginationType" >
<option value="0" <%if rs("PaginationType")=0 then response.write "selected"%>>不分页</option>
<option value="1" <%if rs("PaginationType")=1 then response.write "selected"%>>自动分页</option>
<option value="2" <%if rs("PaginationType")=2 then response.write "selected"%>>手动分页</option>
</select> <strong><font color="#0000FF">注:</font></strong><font color="#0000FF">手动分页符标记为</font> <font color="#FF0000">[NextPage]</font> <font color="#0000FF">,注意大小写</font></td>
</tr>
<tr>
<td valign=top><%response.write tit_fir%>自动分页字符数:</td>
<td> <input name="MaxCharPerPage" type="text" value='<%response.write rs("MaxCharPerPage")%>' size="8" maxlength="8"> 自动分页时的每页大约字符数(包含HTML标记)</td>
</tr>
找到
<tr>
<td valign=top><%response.write tit_fir%>内容:</td>
<td><textarea name=word rows=15 cols=65></textarea></td>
</tr>
其下增加:
<tr>
<td valign=top><%response.write tit_fir%>内容分页方式:</td>
<td><select name="PaginationType" >
<option value="0">不分页</option>
<option value="1">自动分页</option>
<option value="2">手动分页</option>
</select> <strong><font color="#0000FF">注:</font></strong><font color="#0000FF">手动分页符标记为</font> <font color="#FF0000">[NextPage]</font> <font color="#0000FF">,注意大小写</font></td>
</tr>
<tr>
<td valign=top><%response.write tit_fir%>自动分页字符数:</td>
<td> <input name="MaxCharPerPage" type="text" value="5000" size="8" maxlength="8"> 自动分页时的每页大约字符数(包含HTML标记)</td>
</tr>
4. con_article.asp中增加核心分页代码,较长,故用下载方式。
http://www.joekoe.net/forum/view_42029.html
评论: 5 | 引用: 0 | 查看次数: 779
发表评论