风讯官方论坛

首页 » FoosunCMS交流区 » 插件讨论 » FS4.05文字友情链接自由换行调用
newstar - 2008-4-5 18:08:00
版本: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


 附件: 您所在的用户组无法下载或查看附件
fantizi - 2008-4-6 12:51:00
直接给出文件更好
四季逗 - 2008-4-6 17:07:00
不错``收````
1
查看完整版本: FS4.05文字友情链接自由换行调用