iwms
作者:BJ 日期:2010-01-28
动网新闻使用手册 “网奇”动网新闻风格模板展示 动网新闻系统风格CSS布局
幻灯显示图片新闻 限定标题图片大小技巧 DvNews风格制作方法
无法统计新闻点击数的解决 采集规则生成工具(附录像) 采集规则制作方法
升级iwms后如果要保留原模板请替换模板中字符串 DvNews 为 IWMS
风格不需要修改
在分类栏里,如果以图片标题显示,那就会在首页里也显示最新更新的新闻里的图片,也就是图片新闻.而我不想每次更新有图片的新闻,就会更新首页里的图片新闻.
那就在首页ImgTopList指定分类<%=ImgTopList(分类id,3,3,"right",false,false,true,26)%>
函数例举:
GetLinks类:此函数显示指定分类友情链接
例一:<%=GetLinks(20,10,imgLink)%>
例二:<%=GetLinks(10,"h",imgLink)%>
例三:<%=GetLinks(10,imgLink)%>
例四:<%=GetLinks("h",imgLink)%>
20为指定链接分类
10为每行显示链接数
"h"为指定横向或竖向显示,"h"为横向,"v"为竖向
imgLink为显示图片链接还是文本连接.......(调用时必须用false或true替换)
TopList类 : 此函数按指定方式调用指定类型的新闻
3.2版本(4.0仍可使用)
例一: <%=TopList(sortID,"sort","new",10,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink)%>
例二: <%=TopList(sortID,"sort","new",10,20,showClass,showHits,showDate,showNew,showAuthor)%>
例三: <%=TopList(sortID,"new",10,20,showClass,showHits,showDate,showNew,showAuthor)%>
例四: <%=TopList("new",10,20,showClass,showHits,showDate,showNew,showAuthor)%>
sortID为要调用新闻的分类或专题或会员ID.(sortID代表的是所在分类的全部的分类新闻,也可以为数字.数字是分类的ID数字)
sort为要调用新闻类型,"sort"为分类新闻,"topic"为专题新闻,"member"为会员新闻
new为调用类型,"hot"为热门新闻,"new"为最新添加新闻,"weekhot"为本周热门新闻,"dayhot"为本日热门新闻
10为调用新闻数量
20为新闻标题长度限制
showClass 设置是否显示新闻所在分类的连接.......(调用时必须用false或true替换)
showHits 设置是否显示新闻点击数..............(调用时必须用false或true替换)
showDate 设置是否显示新闻日期...(调用时必须用false或true替换)
showNew 设置是否在新闻添加新闻后显示new图标...(调用时必须用false或true替换)
showAuthor 设置是否显示新闻作者...(调用时必须用false或true替换)
remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性)...(调用时必须用false或true替换)(false为否.true为是)
4.0版本(增强功能版本)
例一:<%=TopList(sortID,"sort","hot",8,20,showClass,showHits, showDate, showNew,showAuthor,remarkLink,alternat)%>
例二:<%=TopList(sortID,"sort","hot",8,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink)%>
例三:<%=TopList(sortID,"sort","hot",8,20,showClass,showHits,showDate,showNew,showAuthor)%>
例四:<%=TopList(sortID,"sort",8,20,showClass,showHits,showDate,showNew,showAuthor)%>
例五:<%=TopList("hot",8,20,showClass,showHits,showDate,showNew,showAuthor)%>
sortID为要调用新闻的分类或专题或会员ID.(sortID代表的是所在分类的全部的分类新闻,也可以为数字.数字是分类的ID数字)
sort为要调用新闻类型,"sort"为分类新闻,"topic"为专题新闻,"member"为会员新闻
hot为调用类型,"hot"为热门新闻,"new"为最新添加新闻,"weekhot"为本周热门新闻,"dayhot"为本日热门新闻
8为调用新闻数量
20为新闻标题长度限制
showClass 设置是否显示新闻所在分类的连接...(调用时必须用false或true替换)
showHits 设置是否显示新闻点击数...(调用时必须用false或true替换)
showDate 设置是否显示新闻日期 ...(调用时必须用false或true替换)
showNew 设置是否在新闻添加新闻后显示new图标...(调用时必须用false或true替换)
showAuthor 设置是否显示新闻作者 ...(调用时必须用false或true替换)
remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性)...(调用时必须用false或true替换)
alternat 设置是否用间隔颜色显示新闻标题...(调用时必须用false或true替换)(false为否.true为是)
TopList类:此函数按指定方式显示指定多个分类的最新添加新闻
3.2版本(4.0仍可使用)
例:<%=TopList("1,2,3",10,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink)%>
1,2,3为要调用新闻的分类ID,多个分类请用","分隔,如"1,2,3"
topNum 为调用新闻数量maxLength 为新闻标题长度限制
showClass 设置是否显示新闻所在分类的连接.......(调用时必须用false或true替换)
showHits 设置是否显示新闻点击数..............(调用时必须用false或true替换)
showDate 设置是否显示新闻日期...(调用时必须用false或true替换)
showNew 设置是否在新闻添加新闻后显示new图标...(调用时必须用false或true替换)
showAuthor 设置是否显示新闻作者...(调用时必须用false或true替换)
remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性)...(调用时必须用false或true替换)(false为否.true为是)
4.0版本(增强功能版本)
例一:<%=TopList("1,2,3",8,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink,alternat)%>
例二:<%=TopList("1,2,3",8,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink)%>
1,2,3为要调用新闻的分类ID,多个分类请用","分隔,如"1,2,3"
8为调用新闻数量
20为新闻标题长度限制
showClass 设置是否显示新闻所在分类的连接.......(调用时必须用false或true替换)
showHits 设置是否显示新闻点击数.......(调用时必须用false或true替换)
showDate 设置是否显示新闻日期.......(调用时必须用false或true替换)
showNew 设置是否在新闻添加新闻后显示new图标.......(调用时必须用false或true替换)
showAuthor 设置是否显示新闻作者.......(调用时必须用false或true替换)
remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性).......(调用时必须用false或true替换)
alternat 设置是否用间隔颜色显示新闻标题 .......(调用时必须用false或true替换)(false为否.true为是)
TopListSummary类:此函数按简介方式调用指定分类的新闻
例一: <%=TopListSummary(50,"sort","new",10,showHits)%>
例二: <%=TopListSummary(50,"hot",10,showHits)%>
50为要调用新闻的一级分类
sort为要调用新闻类型,"sort"为分类新闻,"topic"为专题新闻,"member"为会员新闻
new为调用类型,"hot"为热门新闻,"new"为最新添加新闻,"weekhot"为本周热门新闻,"dayhot"为本日热门新闻
10为调用新闻数量
showHits 设置是否显示新闻点击数 ...(调用时必须用false或true替换)(false为否.true为是)
TopListSummary类:此函数按简介方式显示指定分类多个分类的最新添加新闻
例: <%=TopListSummary("1,2,3",10,showHits)%>
1,2,3为要调用新闻分类ID,多个分类请用","分隔,如"1,2,3"
10为调用新闻数量
showHits 设置是否显示新闻点击数 ...(调用时必须用false或true替换)(false为否.true为是)
KeyNewsList类:此函数显示指定相关新闻的新闻
例一:<%=KeyNewsList("动网新闻",10,20,showClass,showHits,showDate,showNew,showAuthor,remarkLink)%>
例二:<%=KeyNewsList("动网新闻",10,,20,showClass,showHits,showDate,showNew,showAuthor)%>
例三:<%=KeyNewsList("动网新闻",10,20,showClass,showHits,showDate,showNew)%>
例四:<%=KeyNewsList("动网新闻",10,20,showClass,showHits,showDate)%>
例五:<%=KeyNewsList("动网新闻",10,20,showClass,showHits)%>
例六:<%=KeyNewsList("动网新闻",10,20,showClass)%>
例七:<%=KeyNewsList("动网新闻",10,20)%>
动网新闻: 为相关新闻的关键字
10为调用新闻数量
20为新闻标题长度限制
showClass 设置是否显示新闻所在分类的连接.......(调用时必须用false或true替换)
showHits 设置是否显示新闻点击数.......(调用时必须用false或true替换)
showDate 设置是否显示新闻日期.......(调用时必须用false或true替换)
showNew 设置是否在新闻添加新闻后显示new图标.......(调用时必须用false或true替换)
showAuthor 设置是否显示新闻作者.......(调用时必须用false或true替换)
remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性).......(调用时必须用false或true替换)(false为否.true为是)
ImgTopList类:此函数按指定方式显示指定分类的最新图片新闻
例一:<%=ImgTopList(sortID,10,2,"left",showSummary,showHits,showTitle,20)%>
例二:<%=ImgTopList(sortID,10,2,"left",showSummary,showHits,showTitle)%>
例三:<%=ImgTopList(sortID,10,2,"left",showSummary,showHits)%>
例四:<%=ImgTopList(sortID,10,2%>
例五:<%=ImgTopList(10,2)%>
例六:<%=ImgTopList(10)%>
sortID指定分类(sortID代表的是所在分类的全部的分类图片新闻,也可以为数字.数字是分类的ID数字)
10为调用数量
2为显示多少列(showSummary为false时有用)
left图片位置,"left"为左,"right"为右(showSummary为true时有用)
showSummary 是否显示图片简介.......(调用时必须用false或true替换)
showHits 是否显示新闻点击数.......(调用时必须用false或true替换)
showTitle 是否显示新闻标题.......(调用时必须用false或true替换)
20是标题限制到此长度
(false为否.true为是)
ImgTopList类:此函数按指定方式显示指定多个分类的最新图片新闻
<%=ImgTopList ("1,2,3",10,2,"left",showSummary,showHits,showTitle,20)%>
<%=ImgTopList ("1,2,3",10,2,"left",showSummary,showHits,showTitle)%>
<%=ImgTopList ("1,2,3",10,2,"left",showSummary,showHits)%>
<%=ImgTopList ("1,2,3",10,2)%>
"1,2,3 "为指定分类,多个分类请用","分隔,如"1,2,3 "
10为调用数量
2为显示多少列(showSummary为false时有用)
left图片位置,"left"为左,"right"为右(showSummary为true时有用)
showSummary 是否显示图片简介.......(调用时必须用false或true替换)
showHits 是否显示新闻点击数.......(调用时必须用false或true替换)
showTitle 是否显示新闻标题.......(调用时必须用false或true替换)
20是标题限制到此长度
(false为否.true为是)
Headline类:此函数显示头条文字新闻
3.2版本(4.0仍可使用)
例:<%=Headline(10,20,showSort)%>
10为调用新闻数量20为新闻标题长度限制showSort为是否显示分类链接.......(调用时必须用false或true替换)
(false为否.true为是)
4.0版本(增强功能版本)
例:<%=Headline(10,20,showSort,showDate,alternat,2)%>
10 为调用新闻数量
20 为新闻标题长度限制
showSort 为是否显示分类链接.......(调用时必须用false或true替换)
showDate 为是否显示日期.......(调用时必须用false或true替换)
alternat 设置是否用间隔颜色显示新闻标题.......(调用时必须用false或true替换)
2 为分几列显示新闻标题
(false为否.true为是)
HeadlineSummary类:此函数简介方式显示头条文字新闻
例:<%=HeadlineSummary(10)%>
10为调用新闻数量
ImgHeadline类: 此函数显示头条图片新闻
例一:<%=ImgHeadline(10,"horizon",100,showTitle,20)%>
例二:<%=ImgHeadline(10,"horizon",10,showTitle)%>
例三:<%=ImgHeadline(10,"horizon",10)%>
10为调用新闻数量
horizon为排列方式,"horizon"为横排,"verticle"为竖排,"summary_left"为在左边显示简介,"summary_right"为在右边显示简介
100为每个新闻占用宽度
showTitle为是否显示新闻标题.......(调用时必须用false或true替换)
20是标题限制长度
(false为否.true为是)
NavList类:此函数显示所有一二级分类导航
<%=NavList(10)%>
1为每行显示二级分类数
GetLinks类:此函数显示指定分类友情链接
例一:<%=GetLinks(20,10,imgLink)%>
例二:<%=GetLinks(10,"h",imgLink)%>
例三:<%=GetLinks(10,imgLink)%>
例四:<%=GetLinks("h",imgLink)%>
20为指定链接分类
10为每行显示链接数
"h"为指定横向或竖向显示,"h"为横向,"v"为竖向
imgLink为显示图片链接还是文本连接.......(调用时必须用false或true替换)
false是设置是否的意思(false为否.true为是)
RelateNews类:此函数在新闻显示页取相关新闻,在show.aspx文件内
例一:<%RelateNews(100,20,showDate);%>
例二:<%RelateNews(100,20);%>
100为显示相关新闻数
20为新闻标题长度限制
showDate 为是否显示添加日期 .......(调用时必须用false或true替换)
(false为否.true为是)
4.0版本(增强功能版本)
例 <%RelateNews(100,20,showDate,2);%>
100 为显示相关新闻数
20 为新闻标题长度限制
showDate 为是否显示添加日期 .......(调用时必须用false或true替换)
2为 分几列显示
(false为否.true为是)
Remarks类:此函数在新闻显示页取评论,在show.aspx文件内
例:<%Remarks(20,200);%>
20为显示评论数
200为评论长度限制
GetSortName类:此函数返回指定id的分类名
<%=GetSortName(sortId)%>
sortId为指定分类id数字 (数字是分类的ID数字)
GetSortChild类:此函数返回指定分类下级分类链接
<%=GetSortChild(88,10,"20")%>
88为指定分类id
10为显示子类个数
20为子类间分隔字符
4.0版本(增强功能版本)
<%=BindLeftNav(20,hideNonChild)%>
此函数在分类页绑定左侧分类导航
20为指定分类id
hideNonChild 为是否隐藏当前分类的同级分类 .......(调用时必须用false或true替换)
(false为否.true为是)
例一: <%=BindRemarks(20)%>
例二 <%=BindRemarks()%>
此函数在新闻页绑定评论显示
20为显示评论数
摘抄自用户手册的函数解读
函数参考
下边列出你在修改系统时可能要用到的函数:
(注:长度限制以英文为标准,一个中文字符长度为2,一个英文字符长度为1)
| string TopList (Int32 id,string type, string toptype,Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor, bool remarkLink, bool alternat) string TopList (Int32 id,string type, string toptype,Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor, bool remarkLink) string TopList(Int32 id, string type, string toptype,Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor) string TopList(Int32 id, string toptype, Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor) string TopList (string toptype,Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor) |
| 此函数按指定方式调用指定类型的新闻 id 为要调用新闻的分类或专题或会员ID type 为要调用新闻类型,"sort"为分类新闻,"topic"为专题新闻,"member"为会员新闻 toptype 为调用类型,"hot"为热门新闻,"new"为最新添加新闻,"weekhot"为本周热门新闻,"dayhot"为本日热门新闻 topNum 为调用新闻数量 maxLength 为新闻标题长度限制 showClass 设置是否显示新闻所在分类的连接 showHits 设置是否显示新闻点击数 showDate 设置是否显示新闻日期 showNew 设置是否在新闻添加新闻后显示new图标 showAuthor 设置是否显示新闻作者 remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性) alternat 设置是否用间隔颜色显示新闻标题 |
| string TopList (string cids, Int32 topNum, Int32 maxLength, bool showClass, bool showHits, bool showDate, bool showNew, bool showAuthor, bool remarkLink, bool alternat) string TopList (string cids, Int32 topNum, Int32 maxLength, bool showClass, bool showHits, bool showDate, bool showNew, bool showAuthor, bool remarkLink) |
| 此函数按指定方式显示指定多个分类的最新添加新闻 cids 为要调用新闻的分类ID,多个分类请用","分隔,如"1,2,3 " topNum 为调用新闻数量 maxLength 为新闻标题长度限制 showClass 设置是否显示新闻所在分类的连接 showHits 设置是否显示新闻点击数 showDate 设置是否显示新闻日期 showNew 设置是否在新闻添加新闻后显示new图标 showAuthor 设置是否显示新闻作者 remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性) alternat 设置是否用间隔颜色显示新闻标题 |
|
string TopListSummary (Int32 id, string type, string toptype, Int32 topNum, bool showHits) |
| 此函数按简介方式调用指定分类的新闻 id 为要调用新闻的一级分类ID type 为要调用新闻类型,"sort"为分类新闻,"topic"为专题新闻,"member"为会员新闻 toptype 为调用类型,"hot"为热门新闻,"new"为最新添加新闻,"weekhot"为本周热门新闻,"dayhot"为本日热门新闻 topNum 为调用新闻数量 showHits 设置是否显示新闻点击数 |
|
string TopListSummary (Int32 cids, Int32 topNum, bool showHits) |
| 此函数按简介方式显示指定分类多个分类的最新添加新闻 cids 为要调用新闻分类ID,多个分类请用","分隔,如"1,2,3 " topNum 为调用新闻数量 showHits 设置是否显示新闻点击数 |
|
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor, bool remarkLink) |
| 此函数显示指定相关新闻的新闻 key 为相关新闻的关键字 topNum 为调用新闻数量 maxLength 为新闻标题长度限制 showClass 设置是否显示新闻所在分类的连接 showHits 设置是否显示新闻点击数 showDate 设置是否显示新闻日期 showNew 设置是否在新闻添加新闻后显示new图标 showAuthor 设置是否显示新闻作者 remarkLink 设置是否显示新闻评论链接(还取决于新闻的属性) |
| string ImgTopList (Int32 classID,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits, bool showTitle, int titleLength) string ImgTopList (Int32 classID,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits, bool showTitle) string ImgTopList (Int32 classID,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits) string ImgTopList (Int32 classID,Int32 topNum,Int32 cols) string ImgTopList (Int32 topNum,Int32 cols) string ImgTopList (Int32 topNum) |
| 此函数按指定方式显示指定分类的最新图片新闻 classID 指定分类 topNum 调用数量 cols 显示多少列 imgAlign 图片位置,"left"为左,"right"为右(showSummary为true时有用) showSummary 是否显示图片简介 showHits 是否显示新闻点击数 showTitle 是否显示新闻标题 titleLength 是标题限制到此长度 |
| string ImgTopList (string cIDs,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits, bool showTitle, int titleLength) string ImgTopList (string cIDs,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits, bool showTitle) string ImgTopList (Int32 cIDs,Int32 topNum,Int32 cols,string imgAlign,bool showSummary, bool showHits) string ImgTopList (Int32 cIDs,Int32 topNum,Int32 cols) |
| 此函数按指定方式显示指定多个分类的最新图片新闻 cIDs 指定分类,多个分类请用","分隔,如"1,2,3 " topNum 调用数量 cols 显示多少列(showSummary为false时有用) imgAlign 图片位置,"left"为左,"right"为右(showSummary为true时有用) showSummary 是否显示图片简介 showHits 是否显示新闻点击数 showTitle 是否显示新闻标题 titleLength 是标题限制到此长度 |
| string Headline(int topNum,int maxLength,bool showSort,bool showDate, bool alternat, int cols, bool firstSummary) |
| 此函数显示头条文字新闻 topNom 为调用新闻数量 maxLength 为新闻标题长度限制 showSort 为是否显示分类链接 showDate 为是否显示日期 alternat 设置是否用间隔颜色显示新闻标题 cols 分几列显示新闻标题 firstSummary 第一个头条新闻是否显示简介 |
| string HeadlineSummary (int topNum) |
| 此函数简介方式显示头条文字新闻 topNom 为调用新闻数量 |
| string ImgHeadline(int topNum,string type,int width,bool showTitle,int titleLength) string ImgHeadline(int topNum,string type,int width,bool showTitle) string ImgHeadline (int topNum,string type,int width) |
| 此函数显示头条图片新闻 topNum 为调用新闻数量 type 为排列方式,"horizon"为横排,"verticle"为竖排,"summary_left"为在左边显示简介,"summary_right"为在右边显示简介 width 为每个新闻占用宽度 showTitle 是否显示新闻标题 titleLength 是标题限制长度 |
| string GetBulletin (string direction,bool bContent) string GetBulletin (string direction) |
| 此函数为首页显示公告函数 direction 为列表方向,"h"为横向显示,"v"为竖向显示 bContent 为是否显示公告内容 |
| string GetLinks(string sIds, int cols, bool imgLink) string GetLinks (int sId, int cols, bool imgLink) string GetLinks(int cols, bool imgLink) string GetLinks(string direction, bool imgLink) |
| 此函数显示指定分类友情链接 sIds 为指定多个分类id,","分隔 sId 为指定链接分类 cols 为每行显示链接数 direction 为指定横向或竖向显示,"h"为横向,"v"为竖向 imgLink 为显示图片链接还是文本连接 |
| void RelateNews(int num, int maxLength, bool showDate, int cols) void RelateNews(int num, int maxLength, bool showDate) void RelateNews(int num, int maxLength) |
| 此函数在新闻显示页取相关新闻,在show.aspx文件内 num 为显示相关新闻数 maxLength 为新闻标题长度限制 showDate 为是否显示添加日期 cols 分几列显示 |
| void Remarks(int num, int maxLength) |
| 此函数在新闻显示页取评论,在show.aspx文件内 num 为显示评论数 maxLength 为评论长度限制 |
| string GetSortName (int sortId) |
| 此函数返回指定id的分类名 sortId 为指定分类id |
| string GetSortChild(int sortId, int num, string separator) |
| 此函数返回指定分类下级分类链接 sortId 为指定分类id num 为显示子类个数 separator 为子类间分隔字符 |
| void BindLeftNav (int classid, bool hideNonChild) |
| 此函数在分类页绑定左侧分类导航 class 为指定分类id hideNonChild 为是否隐藏当前分类的同级分类 |
| void BindRemarks (int num) void BindRemarks () |
| 此函数在新闻页绑定评论显示 num 为显示评论数 |
上一篇
下一篇

文章来自:
Tags:
相关日志:












