首页 | 风讯安装 | 后台管理 | 升级转换 | 模板制作 | 标签说明 | 采集说明 | 常见问题 | 自由标签 | 样式管理 | 功能扩展 | 插件使用 |
常 见 问 题
新 手 入 门
中 级 进 阶
高 级 技 巧
 标题过长,在后面加上省略号 ★★★★★ 【字体:小 大】 
标题过长,在后面加上省略号
http://www.foosun.cn   作者:netfound   来源:  点击:  更新时间:06-06-16 11:19:19
 

直接修改根/inc/Function.asp中的:

Function GotTopic(Str,StrLen)
Dim l,t,c, i,LableStr,regEx,Match,Matches,tLen
if IsNull(Str) then
  GotTopic = ""
  Exit Function
end if
if Str = "" then
  GotTopic=""
  Exit Function
end if
Set regEx = New RegExp
regEx.Pattern = "\[[^\[\]]*\]"
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(Str)
For Each Match in Matches
  LableStr = LableStr & Match.Value
Next
Str = regEx.Replace(Str,"")
Str=Replace(Replace(Replace(Replace(Str,"&nbsp;"," "),"&quot;",Chr(34)),"&gt;",">"),"&lt;","<")
l=len(str)
t=0
tLen = Clng(StrLen) - 2
for i=1 to l
  c=Abs(Asc(Mid(str,i,1)))
  if c>255 then
   t=t+2
  else
   t=t+1
  end if
  if t>=tLen then
   GotTopic=left(str,i)&"...."
   exit for
  else
   GotTopic=str
  end if
next
GotTopic = Replace(Replace(Replace(Replace(GotTopic," ","&nbsp;"),Chr(34),"&quot;"),">","&gt;"),"<","&lt;") & LableStr
end function

文章录入:风讯科技  责任编辑:风讯科技  
·上一篇:3.0SP1不让对联广告浮动
·下一篇:防止被采集的代码
【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
 没有任何评论
2002-2006 Foosun Inc. 四川风讯科技发展有限公司.版权所有  蜀ICP备 05005237