制作步骤如下:
1.打开KS.RCLS.ASP文件,找到GetTags函数;
2.在这个函数前面添加上MyRnd函数,如下:
Function MyRnd(NumMin,NumMax)
Randomize
MyRnd = Int(Rnd * (NumMax - NumMin + 1)) + NumMin
End Function
3.修改GetTags函数,如下:
Function GetTags(TagType,Num,isRnd)
if not isnumeric(num) then exit function
dim sqlstr,sql,i,n,str,srnd,col(6)
col(0)="BLACK"
col(1)="RED"
col(2)="BLUE"
col(3)="GREEN"
select case cint(tagtype)
case 1:sqlstr="select top 500 keytext,channelid,hits from ks_keywords order by hits desc"
case 2:sqlstr="select top 500 keytext,channelid,hits from ks_keywords order by lastusetime desc,id desc"
case 3:sqlstr="select top 500 keytext,channelid,hits from ks_keywords order by Adddate desc,id desc"
case else
GetTags="":exit function
end select
dim rs:set rs=conn.execute(sqlstr)
if rs.eof then rs.close:set rs=nothing:exit function
sql=rs.getrows(-1)
rs.close:set rs=nothing
for i=0 to ubound(sql,2)
if isRnd=1 then
srnd = "size="&MyRnd(2,5)&""
elseif isRnd=2 then
srnd = "color="&col(MyRnd(0,3))&""
end if
if KS.FoundInArr(str,sql(0,i),",")=false then
n=n+1
str=str & "," & sql(0,i)
gettags=gettags & "<a href=""" & domainstr & "plus/search.asp?searchtype=5&channelid=" & sql(1,i) & "&tags=" & sql(0,i)& """ target=""_blank"" title=""TAG:" & sql(0,i) & " 被使用了" & SQL(2,I) &"次""><font "&srnd&">" & sql(0,i) & "</font></a> "
end if
if n>=cint(num) then exit for
next
End Function
4.找到F_C = Replace(F_C, HtmlLabelArr(I), GetTags(Param(0),Param(1)行,修改成F_C = Replace(F_C, HtmlLabelArr(I), GetTags(Param(0),Param(1),Param(2)
5.在你想用TAGS的地方调用GetTags函数,其中第三个参数控制字体的变化,当=0时,就是没有个性之前的样子,当=1时,字体大小不一,当=2时,字体颜色不一