站长资讯 | 站长常用软件 | 站长工具 | 为奥运祝福!
文章投稿 当前位置:主页>新闻资讯>信息安全>文章:动易seo修改{$showpage}篇

动易seo修改{$showpage}篇

来源:CodePub 作者: 发布时间:2008-04-02 阅读次数:  

1:从搜索的角度来讲,我不知道bd或者gg是不是会抓取select表单中的链接,或者权重怎么样,所以我希望以链接的形式表示出来,但是事实上,动易的标签只有上下页和首页末页是直接通过a标签来展示的,更要命的是,首页的链接中包含index.xxx等内容,权重显然不如目录,所以,我要改。

2:从用户易用性角度来讲,目前动易是这个样子

共 36 篇文章首页 上一页 下一页 尾页 页次:1/3页15篇文章/页 转到:第X页

一共多少篇文章,这个信息是有用的,页次和xx篇/页,我觉得很不直观,其实并无太大作用,而用户找东西,一般是顺着一页一页翻的,转到第X页,我觉得是个使用率更少的东西,我参考了各大网站的分页,比较喜欢youku的方法,是这个样子的,

共228个视频当前显示1-20个视频首页 | 上一页 | 1 2 3 4 5 6 7 8 9 | 下一页 | 尾页

这个样子,显然是比较直观的,于是乎,挥动我勤劳的双手,用仅有的asp知识,对动易进行了修改。

二:怎么改?

修改起来还是比较轻易的,对于大家来说,将Function ShowPage_Html整个替换掉就可以了,打开PowerEasyCommon.Front.asp
找到Function ShowPage_Html(ByVal strPath, iClassID, FileExt, sfilename, totalnumber, MaxPerPage, CurrentPage, ShowTotal, ShowAllPages, strUnit)这一行,我的在第3244行,直到End Function,我的在第3438行。将这些内柔替换为我的附件里给的内容,重新生成你的栏目页。

演示地址:http://www.tipsky.net/diannao/xitong/

替换代码:

Function ShowPage_Html(ByVal strPath, iClassID, FileExt, sfilename, totalnumber, MaxPerPage, CurrentPage, ShowTotal, ShowAllPages, strUnit)
Dim NextPage, PrevPage, EndPage
Dim TotalPage, strTemp, strUrl, i
If totalnumber = 0 Or MaxPerPage = 0 Or IsNull(MaxPerPage) Then
ShowPage_Html = %26quot;%26quot;
Exit Function
End If
If totalnumber Mod MaxPerPage = 0 Then
TotalPage = totalnumber \ MaxPerPage
Else
TotalPage = totalnumber \ MaxPerPage + 1
End If

If CurrentPage %26gt; TotalPage Then CurrentPage = TotalPage

PrevPage = TotalPage - CurrentPage + 2
NextPage = TotalPage - CurrentPage

EndPage = 1

If sfilename %26lt;%26gt; %26quot;%26quot; Then
strUrl = JoinChar(sfilename)
Else
strUrl = %26quot;%26quot;
End If

If Right(strPath, 1) = %26quot;/%26quot; Then
strPath = Left(strPath, Len(strPath) - 1)
End If

strTemp = strTemp %26amp; %26quot;%26lt;div class=%26quot;%26quot;showpage%26quot;%26quot;%26gt;%26quot;
If ShowTotal = True Then
strTemp = strTemp %26amp; %26quot;共%26quot; %26amp; totalnumber %26amp; strUnit %26amp; %26quot; %26quot;
End If

If CurrentPage %26gt;= TotalPage Then
strTemp = strTemp %26amp; %26quot;当前显示%26quot; %26amp; (TotalPage-1)*MaxPerPage+1 %26amp; %26quot;-%26quot; %26amp; totalnumber %26amp; strUnit %26amp; %26quot; %26quot;
Elseif CurrentPage=1 Then
strTemp = strTemp %26amp; %26quot;当前显示1-%26quot; %26amp; 1*MaxPerPage %26amp; strUnit %26amp; %26quot; %26quot;
Else
strTemp = strTemp %26amp; %26quot;当前显示%26quot; %26amp; (CurrentPage-1)*MaxPerPage+1 %26amp; %26quot;-%26quot; %26amp; CurrentPage*MaxPerPage %26amp; strUnit %26amp; %26quot; %26quot;
End If

If CurrentPage = 1 Then
strTemp = strTemp %26amp; %26quot;首页 | 上一页 |%26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;'%26gt;首页%26lt;/a%26gt; |%26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/%26quot; %26amp; %26quot;'%26gt;首页%26lt;/a%26gt; |%26quot;
End If
If CurrentPage = 2 Then
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot; %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;'%26gt;上一页%26lt;/a%26gt; |%26quot;
Else
strTemp = strTemp %26amp; %26quot; %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/%26quot; %26amp; %26quot;'%26gt;上一页%26lt;/a%26gt; |%26quot;
End If
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot; %26lt;a href='%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; (CurrentPage - 1) %26amp; %26quot;'%26gt;上一页%26lt;/a%26gt; |%26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot; %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; PrevPage %26amp; FileExt %26amp; %26quot;'%26gt;上一页%26lt;/a%26gt; |%26quot;
Else
strTemp = strTemp %26amp; %26quot; %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; PrevPage %26amp; FileExt %26amp; %26quot;'%26gt;上一页%26lt;/a%26gt; |%26quot;
End If
End If
End If
End If

strTemp = strTemp %26amp; %26quot; %26quot;

If ShowAllPages = True Then
Dim Jmaxpages
If (CurrentPage - 4) %26lt;= 0 or TotalPage %26lt; 10 Then
Jmaxpages = 1
Do While (Jmaxpages%26lt;10)
If Jmaxpages = CurrentPage Then
strTemp = strTemp %26amp; %26quot;%26lt;font color=%26quot;%26quot;FF0000%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/font%26gt; %26quot;
ElseIf Jmaxpages = 1 Then
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/%26quot; %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; Jmaxpages %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
End If
End If
If Jmaxpages = TotalPage Then Exit Do
Jmaxpages = Jmaxpages + 1
Loop
ElseIf (CurrentPage + 4) %26gt;= TotalPage Then
Jmaxpages = TotalPage-8
Do While (Jmaxpages %26lt;= TotalPage)
If Jmaxpages = CurrentPage Then
strTemp = strTemp %26amp; %26quot;%26lt;font color=%26quot;%26quot;FF0000%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/font%26gt; %26quot;
ElseIf Jmaxpages = 1 Then
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/%26quot; %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; Jmaxpages %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
End If
End If
Jmaxpages = Jmaxpages + 1
Loop
Else
Jmaxpages = CurrentPage - 4
Do While (Jmaxpages %26lt; CurrentPage + 5)
If Jmaxpages = CurrentPage Then
strTemp = strTemp %26amp; %26quot;%26lt;font color=%26quot;%26quot;FF0000%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/font%26gt; %26quot;
ElseIf Jmaxpages = 1 Then
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/%26quot; %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; Jmaxpages %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
Else
strTemp = strTemp %26amp; %26quot;%26lt;a href=%26quot;%26quot;%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; TotalPage - Jmaxpages + 1 %26amp; FileExt %26amp; %26quot;%26quot;%26quot;%26gt;%26quot; %26amp; Jmaxpages %26amp; %26quot;%26lt;/a%26gt; %26quot;
End If
End If
End If
Jmaxpages = Jmaxpages + 1
Loop
End If
End If

If CurrentPage %26gt;= TotalPage Then
strTemp = strTemp %26amp; %26quot;| 下一页 | 尾页%26quot;
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; (CurrentPage + 1) %26amp; %26quot;'%26gt;下一页%26lt;/a%26gt; %26quot;
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strUrl %26amp; %26quot;page=%26quot; %26amp; TotalPage %26amp; %26quot;'%26gt;尾页%26lt;/a%26gt;%26quot;
Else
If iClassID %26gt; 0 Then
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; NextPage %26amp; FileExt %26amp; %26quot;'%26gt;下一页%26lt;/a%26gt; %26quot;
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_%26quot; %26amp; EndPage %26amp; FileExt %26amp; %26quot;'%26gt;尾页%26lt;/a%26gt;%26quot;
Else
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; NextPage %26amp; FileExt %26amp; %26quot;'%26gt;下一页%26lt;/a%26gt; %26quot;
strTemp = strTemp %26amp; %26quot;| %26lt;a href='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; EndPage %26amp; FileExt %26amp; %26quot;'%26gt;尾页%26lt;/a%26gt;%26quot;
End If
End If
End If

strTemp = strTemp %26amp; %26quot;%26lt;/div%26gt;%26quot; %26amp; vbCrLf

If ShowAllPages = True And TotalPage %26gt; 20 Then
strTemp = strTemp %26amp; %26quot;%26lt;script language='javascript'%26gt;%26quot; %26amp; vbCrLf
strTemp = strTemp %26amp; %26quot;function gopage(page,totalpage){%26quot; %26amp; vbCrLf
strTemp = strTemp %26amp; %26quot;if (event.keyCode==13){%26quot; %26amp; vbCrLf
strTemp = strTemp %26amp; %26quot; if(Math.abs(page)%26gt;totalpage) page=totalpage;%26quot; %26amp; vbCrLf
If iClassID %26gt; 0 Then
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot; if(Math.abs(page)%26gt;1) window.location='%26quot; %26amp; strUrl %26amp; %26quot;page='%26quot; %26amp; %26quot;+Math.abs(page);%26quot; %26amp; vbCrLf
Else
strTemp = strTemp %26amp; %26quot; if(Math.abs(page)%26gt;1) window.location='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; %26quot;_'%26quot; %26amp; %26quot;+(totalpage-Math.abs(page)+1)+'%26quot; %26amp; FileExt %26amp; %26quot;';%26quot; %26amp; vbCrLf
End If
strTemp = strTemp %26amp; %26quot; elsewindow.location='%26quot; %26amp; strPath %26amp; %26quot;/List_%26quot; %26amp; iClassID %26amp; FileExt %26amp; %26quot;';%26quot; %26amp; vbCrLf
Else
If strUrl %26lt;%26gt; %26quot;%26quot; Then
strTemp = strTemp %26amp; %26quot; if(Math.abs(page)%26gt;1) window.location='%26quot; %26amp; strUrl %26amp; %26quot;page='%26quot; %26amp; %26quot;+Math.abs(page);%26quot; %26amp; vbCrLf
Else
strTemp = strTemp %26amp; %26quot; if(Math.abs(page)%26gt;1) window.location='%26quot; %26amp; strPath %26amp; %26quot;/List_'+(totalpage-Math.abs(page)+1)+'%26quot; %26amp; FileExt %26amp; %26quot;';%26quot; %26amp; vbCrLf
End If
strTemp = strTemp %26amp; %26quot; elsewindow.location='%26quot; %26amp; strPath %26amp; %26quot;/Index%26quot; %26amp; FileExt %26amp; %26quot;';%26quot; %26amp; vbCrLf
End If
strTemp = strTemp %26amp; %26quot;}%26quot; %26amp; vbCrLf
strTemp = strTemp %26amp; %26quot;}%26quot; %26amp; vbCrLf
strTemp = strTemp %26amp; %26quot;%26lt;/script%26gt;%26quot; %26amp; vbCrLf
End If
ShowPage_Html = strTemp
End Function


文章地址:http://www.xinasp.com/html/yejiexinwen/xinxianquan/20080502/25846.shtml
tag:seo 修改 showpage
    评论加载中…
关于站点 - 广告服务 - 联系我们 - 版权隐私 - 免责声明 - 成员列表
© CopyRight 2002-2008, XINASP.COM, Inc. All Rights Reserved 客服QQ:762264 MAIL:QESY#163.COM
浙ICP备06014044号