CMS1.0/1.2文章分页功能





修改步骤:

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

[本日志由 cmscn 于 2008-12-13 08:17 PM 编辑]
文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 5 | 引用: 0 | 查看次数: 779
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭