风讯官方论坛FoosunCMS交流区插件讨论FS4.05文字友情链接自由换行调用

1  /  1  页   1 跳转 查看:717

标题: FS4.05文字友情链接自由换行调用

FS4.05文字友情链接自由换行调用

版本:FS4.0 sp5  

\Admin\Label\FL_C_label.asp 

211行左右
<tr>
      <td class="hback"><div align="right">输出格式</div></td>
      <td class="hback">
      <select name="out_char" id="out_char" >
          <option value="out_Table">普通格式</option>
          <option value="out_DIV">DIV+CSS格式</option>
          <option value="out_free">自由格式</option>
        </select></td>

\FS_InterFace\Other_Public.asp 144行左右

'文字友情连接
  Public Function WordFL(f_Lablechar,f_type)
  '{FS:FL=WordFL┆调用数量$12┆每行数量$1┆标题CSS$┆站点显示字数$20┆输出方式$out_Table┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆连接类别$┆打开窗口$0}
  dim table_array,div_tf,div_chars,div_class,i_link
  dim CodeNumber,TitleCSS,colsNumber,pizsize,rs,lefttitle,Select_class_word,ClassSql,openstyle,f_openstyle
  table_array=split(f_Lablechar,"┆")
  CodeNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
  colsNumber = split(split(f_Lablechar,"┆")(2),"$")(1)
  lefttitle = split(split(f_Lablechar,"┆")(4),"$")(1)
  Select_class_word=split(split(f_Lablechar,"┆")(12),"$")(1)
  openstyle=split(split(f_Lablechar,"┆")(13),"$")(1)
  If IsNull(lefttitle) Then lefttitle=""
  if instr(f_Lablechar,"out_DIV")>0 then
    div_tf=1
  else if instr(f_Lablechar,"out_free")>0 then
    div_tf=2
  else
    TitleCSS = split(split(f_Lablechar,"┆")(3),"$")(1)
    If TitleCSS="" then
    TitleCSS = ""
    else
    TitleCSS = " class="""&TitleCSS&""""
    end if
  end if
  end If
  '--------------2/7 by chen 友情连接打开窗口方式---------------
  if openstyle=0 then
    f_openstyle=" "
  else
    f_openstyle=" target=""_blank"""
  end if
  '-----------------------------------------------
    '判断友情连接的类别是否有选择
  if Select_class_word="" Or NOt Isnumeric(Select_class_word) then
  ClassSql=""
  Else
  Select_class_word = Cint(Select_class_word)
    ClassSql = " And ClassID = " & Select_class_word
  End If 
  If CodeNumber="" Then CodeNumber=0
  set rs = Conn.execute("select top "&CodeNumber&" ClassID,F_Name,F_Url From FS_FL_FrendList where F_Lock=0 and F_Type=1 "&ClassSql&" order by F_OrderID desc,ID desc")'显示指定类别的连接或显示没有类别时的所有连接
  WordFL = ""
  if rs.eof then
    WordFL = ""
    rs.close:set rs=nothing
  else
    i_link = 0
    do while not rs.eof
    if div_tf=1 or div_tf=2 Then
      If IsNumeric(lefttitle) then
      WordFL = WordFL &"<a href="""& rs("F_Url")&""" "&f_openstyle&">"&Left(rs("F_Name"),lefttitle)&"</a>"
      Else
      WordFL = WordFL &"<a href="""& rs("F_Url")&""" "&f_openstyle&">"&rs("F_Name")&"</a>"
      End if
    Else
      If IsNumeric(lefttitle) then
      WordFL = WordFL & "  <td width="""&cint(100/colsNumber)&"%"" align=""center"" valign=""meddle""><a href="""& rs("F_Url")&""""&TitleCSS&" "&f_openstyle&">"& Left(rs("F_Name"),lefttitle) &"</a></td>"&vbNewLine
      Else
      WordFL = WordFL & "  <td width="""&cint(100/colsNumber)&"%"" align=""center""><a href="""& rs("F_Url")&""""&TitleCSS&" "&f_openstyle&">"& rs("F_Name") &"</a></td>"&vbNewLine
      End if
    end if
    rs.movenext
    i_link = i_link + 1
    If div_tf = 1 or div_tf = 2 Then
      WordFL = WordFL & " "
    Else
    If i_link Mod colsNumber = 0 Then
      WordFL = WordFL & "</tr><tr>"
    End If
    End If
    Loop
    rs.close:Set rs=Nothing
  End If
  if div_tf = 1 then
    if split(split(f_Lablechar,"┆")(6),"$")(1)<>"" then
    div_chars = " id="""&split(split(f_Lablechar,"┆")(6),"$")(1)&""""
    else
    div_chars = ""
    end if
    if split(split(f_Lablechar,"┆")(7),"$")(1)<>"" then
    div_class = " class="""&split(split(f_Lablechar,"┆")(7),"$")(1)&""""
    else
    div_class = ""
    end if
    WordFL = "<div"&div_chars&div_class&">"&WordFL&"</div>"
  else if div_tf <> 1 and div_tf <> 2 then
    WordFL = "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""3"">"&vbNewLine&" <tr>"&vbNewLine&" "&WordFL&vbNewLine&" </tr>"&vbNewLine&"</table>"
  end if
end if

  WordFL = WordFL
  End Function


 附件: 您所在的用户组无法下载或查看附件
最后编辑newstar 最后编辑于 2008-04-07 09:14:36
欢迎走近 中国冬枣之乡——沾化   http://www.zhanhua.gov.cn
NewStar工作室 http://www.newzh.cn
QQ:228770305  风讯CMS asp版交流群:11980260
引用
 

回复:FS4.05文字友情链接自由换行调用

直接给出文件更好
引用
 

回复:FS4.05文字友情链接自由换行调用

不错``收````
新野视窗 专业网站设计服务!设计定做QQ:612189 群号:2693538
服务理念:做生意,要讲规矩;做服务,要讲热情;做人,要讲厚道!总之,两个字“信誉”!
引用
 
1  /  1  页   1 跳转

版权所有 Foosun.NET  NewsCMS.com  NewsIDC.COM  Sitemap

Powered by Discuz!NT 2.0.1115    Copyright © 2001-2008 Comsenz Inc.
Processed in 0 second(s) (Cached).
返顶部