资源描述
注:长度限制以英文为标准,一个中文字符长度为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)
string TopListSummary (Int32 id, 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)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew, bool showAuthor)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate, bool showNew)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass,bool showHits, bool showDate)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass,bool showHits)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength,bool showClass)
string KeyNewsList(string key, Int32 topNum,Int32 maxLength)
此函数显示指定相关新闻的新闻
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 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 为显示评论数
iwms网奇cms函数例举及参数
新闻标题间隔添加虚线效果
以index1.aspx为例:
<!-- 所有分类的最新新闻 -->
找到:
<asp:Repeater id="rpClass"
runat="server" >
<ItemTemplate>
<tr><td height="20" align="left" style="border-bottom:1px dashed #f00" >
<%#NewsTitle((System.Data.DataRowView)Container.DataItem, 33)%>
</td><td width="35" align="center">
<span class="<%#(DateTime)DataBinder.Eval(Container.DataItem,"dateandtime")<DateTime.Now.Date ? "gray" : "time"%>"><%#String.Format ("{0:MM-dd}",DataBinder.Eval(Container.DataItem,"dateandtime"))%></span>
</td></tr>
</ItemTemplate>
</asp:Repeater>
红色是添加部分(也可以添加样式表)
函数例举:
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或tru
展开阅读全文