升级FCKeditor 到v2.6 正式版再改分页标签

 

  在该页面底部添加如下代码:
  
程序代码 程序代码
<%
'*******************************************
'  UBB 日志分页
'  修改时间:2007年12月17日
'*******************************************
Sub UBBSplitxx(sUrl)
    dim arrContent,Page,PageList,Content,PageCounter,x,xx,uu
    Content=highlight(UnCheckStr(UBBCode(HtmlEncode(log_ViewArr(8,0)),mid(log_ViewArr(11,0),1,1),mid(log_ViewArr(11,0),2,1),mid(log_ViewArr(11,0),3,1),mid(log_ViewArr(11,0),4,1),mid(log_ViewArr(11,0),5,1))),keyword)
    If InStr(1,cstr(Content),"['pagebreak]",1)<>0 Then
        ArrContent=Split(Content,"['pagebreak]")
        PageCounter=UBound(ArrContent)
        If PageCounter > 0 Then
            Page=Request.QueryString("pages")
            Page=CInt(Page)
            If Page<1 Then Page=1
            If Page-2>PageCounter Then Page=PageCounter + 2

            For x=1 To PageCounter+1
                uu=sUrl & "&pages=" & x
                If Page=x Then
                                        xx=" [<font color='#FF0000'>" & x & "</font>]"
                                        PageList = PageList &  xx
                                Else
                                        xx= x
                                        PageList = PageList & " [<a href='" & uu & "'>" & xx & "</a>]"
                                End If
            Next
            uu = sUrl & "&pages=" & x
            If Page=PageCounter + 2 Then
                                xx = " [<font color='#FF0000'>全文阅读</font>]"
                                PageList = PageList & xx
                        Else
                                xx = "全文阅读"
                                PageList = PageList & " [<a href='" & uu & "'>" & xx & "</a>]"
                        End If
            If Page-1<=PageCounter Then
                Content=ArrContent(Page-1)
            End If
            x = PageCounter + 1
            Content=Content & "<hr><div align='right'>共 " & x & " 页:" & PageList & "</div>"
        End If
    content=replace(content,"['pagebreak]","")
    End If
    response.write (content)
End Sub%>

<%
'*******************************************
'  FCK 日志分页
'  修改时间:2007年12月17日
'*******************************************
Sub FCKSplitxx(sUrl)
    dim arrContent,Page,PageList,Content,PageCounter,x,xx,uu
    Content=highlight(UnCheckStr(log_ViewArr(8,0)),keyword)
    If InStr(1,cstr(Content),"<div style=""page-break-after: always""><span style=""display: none""> </span></div>",1)<>0 Then
        ArrContent=Split(content,"<div style=""page-break-after: always""><span style=""display: none""> </span></div>")
        PageCounter=UBound(ArrContent)
        If PageCounter > 0 Then
            Page=Request.QueryString("pages")
            Page=CInt(Page)
            If Page<1 Then Page=1
            If Page-2>PageCounter Then Page=PageCounter+2

            For x=1 To PageCounter+1
                uu=sUrl & "&pages=" & x
                If Page=x Then
                                        xx=" [<font color='#FF0000'>" & x & "</font>]"
                                        PageList = PageList &  xx
                                Else
                                        xx= x
                                        PageList = PageList & " [<a href='" & uu & "'>" & xx & "</a>]"
                                End If
            Next
            uu = sUrl & "&pages=" & x
            If Page=PageCounter + 2 Then
                                xx = " [<font color='#FF0000'>全文阅读</font>]"
                                PageList = PageList & xx
                        Else
                                xx = "全文阅读"
                                PageList = PageList & " [<a href='" & uu & "'>" & xx & "</a>]"
                        End If
            If Page-1<=PageCounter Then
                Content=ArrContent(Page-1)
                '下面三行是标签补全,我的回车默认标签改为 <div> 了,所以补的是 </div> 和 <div>
                '如果你的是 <p> 的话,补全的标签也要相应修改为 </p> 和 <p>
                '插入分页符的时候,用回车换行,单独起一行来放分页符 ['pagebreak]
                'If Page=1 Then Content=Content & "</div>"
                'If Page-1=PageCounter Then Content="<div>" & Content
                'If Page>1 And Page<=PageCounter Then Content="<div>" & Content & "</div>"
            End If
            x = PageCounter + 1
            Content=Content & "<hr><div align='right'>共 " & x & " 页:" & PageList & "</div>"
        End If
    End If
    response.write(Content)
End Sub%>

  修改完成,使用分页功能的时候切忌修改格式不要跨分页符修改格式,否则会出现页面变形的情况,简单的说就是设置内容格式的时候每页分别设置,不能全篇一起设置!FCK中插入分页符最好独占一行插入!
本日志共2页:[1][2][全文阅读]
点此快速转到评论处,留下您的宝贵见解吧^_^

本文如需转载,请详细注明出处,尊重版权,尊重别人的劳动成果,谢谢合作哦!

相关日志
详细信息
日志搜索
推荐收藏
反向链接
本站声明
评论: 3 | 引用: 0 | 查看次数: 23531 | 打印此页 | 关闭此页 | 返回顶部 | 直达底部
评论列表 ↓ 点击显示/隐藏3条博友们的评论
发表评论

① 若您已是本站注册用户,请填入名称和密码,发表留言后即默认登陆.
② 若您尚未在本站注册,为了保护您的发言权,建议您注册账号,进而保护您的名称在本站不被他人所占用.若未特别说明,本站原创或转载的文章,均遵循创作共用协议.^_^
③ 若您不想注册,可以只填写用户名进行发表.
④ 转载本站文章,请注明出处,或者填写文章的引用通告地址,谢谢!
⑤ 本站注册是免费,自由的,但发表 评论/留言 即默认您遵守本站用户协议.
你没有权限发表评论!响应党的号召,十七大期间关闭评论功能