风讯官方论坛

首页 » FoosunCMS交流区 » 插件讨论 » FS4.0sp5图片头条修改
newstar - 2008-1-29 10:24:00

 附件: 您所在的用户组无法下载或查看附件

第一步:\Admin\Label\News_C_Label.asp 
<%sub TodayPic()%>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1"
class="table">
  <tr>
  <td class="hback">
    <div align="right">选择栏目</div>
  </td>
  <td class="hback">
    <input  name="ClassName" type="text" id="ClassName"
size="12" readonly>
    <input name="ClassID" type="hidden" id="ClassID">
    <input name="button222" type="button"  value="选择栏目">
    <span class="tx"></span></td>
  </tr>
<!--修改开始-->
  <tr>
  <td class="hback">
    <div align="right">图片尺寸(宽度,高度)</div> 

</td>
  <td class="hback">
    <input  name="p_size" type="text" id="p_size"

value="300,30" size="12">
    格式120,100。请正确使用格式</td>
  </tr>
<!--修改结束-->
  <tr>
  <td class="hback">
    <div align="right"></div>
  </td>
  <td class="hback">
    <input name="button2" type="button"  value="确定创建此标签">
    <input name="button2" type="button"
value=" 取 消 ">
  </td>
  </tr>
</table>
<script language="JavaScript" type="text/JavaScript">
function ok(obj)
{
  var retV = '{FS:NS=TodayPic┆';
  retV+='栏目$' + obj.ClassID.value + '';
//修改开始
retV+='┆';
  retV+='图片尺寸$' + obj.p_size.value + '';
//修改结束
  retV+='}';
  window.parent.returnValue = retV;
  window.close();
}
</script>
<%end sub%>

第二步:\FS_InterFace\NS_Public.asp 页面
82行处
case "todaypic"
'<>1修改为<>2
if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TodayPic(f_Lablechar,"todaypic",f_Id):end if
1666行左右
'得到图片头条________________________________________________________________
  Public Function TodayPic(f_Lablechar,f_type,f_id)
  dim ClassId,InSql_search,rs,MF_Domain,TodayPicstr
'定义变量
dim PicW,PicH
  ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
'赋值
  PicW = split(split(split(f_Lablechar,"┆")(2),"$")(1),",")(0)
  PicH = split(split(split(f_Lablechar,"┆")(2),"$")(1),",")(1)
  MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  if trim(ClassId)="" then
    if trim(f_id)<>"" then
    InSql_search = " And FS_NS_TodayPic.ClassId = '"&f_id&"'"
    else
    InSql_search = ""
    end if
  else
    if trim(ClassId)<>"" then
    InSql_search = " And FS_NS_TodayPic.ClassId = '"&ClassId&"'"
    else
    InSql_search = ""
    end if
  end if
  Rem 修正图片头条标签调用
  Dim ToDay_PicNewsSQL,ToDay_PicNewsObj
  ToDay_PicNewsSQL = "Select Top 1 FS_NS_News.NewsID As ToDayNewsID,FS_NS_TodayPic.TodayPic_SavePath As ToDayPicSavePath From FS_NS_News,FS_NS_TodayPic Where FS_NS_News.isRecyle = 0 And FS_NS_News.isLock = 0 And FS_NS_News.isdraft = 0 And FS_NS_News.TodayNewsPic = 1 And FS_NS_News.NewsID = FS_NS_TodayPic.NewsID" & InSql_search & " Order By FS_NS_TodayPic.ID Desc,FS_NS_TodayPic.AddTime Desc"
  Set ToDay_PicNewsObj = Server.CreateObject(G_FS_RS)
  ToDay_PicNewsObj.Open ToDay_PicNewsSQL,Conn,1,1
  if ToDay_PicNewsObj.eof then
    TodayPicstr = ""
    ToDay_PicNewsObj.close:set ToDay_PicNewsObj=nothing
  else
'修改<img width="""&Picw&""" height="""&PicH&"""   
TodayPicstr = "<a href="""& get_NewsLink(ToDay_PicNewsObj("ToDayNewsID"))&"""><img width="""&Picw&""" height="""&PicH&""" src=""http://"&MF_Domain&"/"&G_UP_FILES_DIR&"/TodayPicFiles/"&ToDay_PicNewsObj("ToDayPicSavePath")&".jpg"" border=""0""></a>"
    ToDay_PicNewsObj.close:set ToDay_PicNewsObj=nothing
  end if
  TodayPic = TodayPicstr
  End Function
修改完毕!
应用过程中 如有问题 请及时联系QQ:228770305
newstar - 2008-1-29 10:30:00
FS4.0sp5图片头条修改文本

 附件: 您所在的用户组无法下载或查看附件
camlin - 2008-1-29 12:43:00
留个脚印:default6:
ttao - 2008-1-29 13:26:00
:default5: 辛苦了.
snqi - 2008-2-9 09:59:00
:default6: 楼主辛苦了
huxianfangyuan - 2008-8-23 21:10:00
太强了,为什么我把我原来有图片的文字头条改成图片头条后保存后再看还好是文字头条啊
1
查看完整版本: FS4.0sp5图片头条修改