Dvbbs V7.0.0 Sp2修改:在楼主的贴子中标明"[楼主]"字样

本次需修改的地方共有五处,前四处都是针对dispbbs.asp,第五处得登录后台修改模板。

1.在dispbbs.asp中增加一变量G_PostUserName
Dim G_PostUserName

2.修改dispbbs.asp的Chk_Topic_Err函数(红色新增)
Function Chk_Topic_Err
    AnnounceID=Request("ID")
    If AnnounceID="" or Not IsNumeric(AnnounceID) Then Dvbbs.AddErrCode(30)
    ReplyID=Request("ReplyID")
    If ReplyID="" or Not IsNumeric(ReplyID) Then ReplyID=AnnounceID
    Star=Request("Star")
    If Star="" or Not IsNumeric(Star) Then Star=1
    Star=Clng(Star)
    Skin=Request("Skin")
    If Skin="" or Not IsNumeric(Skin) Then Skin=Dvbbs.Board_setting(24)
    If Dvbbs.ErrCodes<>"" Then Exit Function
    Dim BrowserType
    Set BrowserType=New Cls_Browser
    If BrowserType.IsSearch Then Response.redirect "printpage.asp?BoardID="&Dvbbs.BoardID&"&ID="&AnnounceID
    Set BrowserType=Nothing
    Dim SQl,Rs
    Dim MyCanReply
    Set Rs=Server.CreateObject("Adodb.RecordSet")
    SQL="Select title,istop,isbest,PostUserName,PostUserid,hits,isvote,child,pollid,LockTopic,PostTable,BoardID,TopicMode from dv_topic where topicID="&Announceid
    If Not IsObject(Conn) Then ConnectionDatabase
    Rs.Open SQL,Conn,1,3
    Dvbbs.SqlQueryNum=Dvbbs.SqlQueryNum+1
    'Set Rs=Dvbbs.Execute(SQL)
    If Not(Rs.BOF and Rs.EOF) then
        If Rs(11)<>Dvbbs.BoardID Then Dvbbs.AddErrCode(29)
        Rs(5)=Rs(5)+1
        Rs.Update
        Topic=Rs(0)
        istop=rs(1)
        isVote=rs(6)
        TopicCount=rs(7)+1
        pollid=rs(8)
        Locktopic=rs(9)
        TotalUseTable=rs(10)
        TopicMode=rs(12)
        ViewNum=Rs(5)
        G_PostUserName=Rs(3)
        If rs(3)=Dvbbs.Membername then
            MyCanReply=Dvbbs.GroupSetting(4)
        Else
            MyCanReply=Dvbbs.GroupSetting(5)
            If Cint(Dvbbs.GroupSetting(2))=0 Then Dvbbs.AddErrcode(31)
        End If
        If Len(Topic) > Cint(Dvbbs.Board_Setting(25)) And Not TopicMode>0 Then
            Topic=Left(Topic,Dvbbs.Board_Setting(25))&"..."
        End If
        If TopicMode>0 Then
            If TopicMode=1 Then
                Topic = Replace(Topic,"<!--","<!--")        
            Else
                Topic = Replace(Topic,"<","<")
                Topic = Replace(Topic,">",">")    
                Topic=Dvbbs_TopicMode(Topic,TopicMode)
            End If
        Else
            Topic = Replace(Topic,"<","<")
            Topic = Replace(Topic,">",">")
        End If
        Topic=Dvbbs.ChkBadWords(Topic)
        Dvbbs.Stats=Topic
    Else
        Dvbbs.AddErrcode(32)
    End If
    Rs.Close
    Set Rs=Nothing
    CanReply=False
    If (Not Dvbbs.Board_Setting(0)="1" And Cint(mycanreply)=1 And Cint(locktopic)=0) or (Dvbbs.master or Dvbbs.superboardmaster or Dvbbs.boardmaster) Then
        CanReply=True
    End If
End Function

3.在dispbbs.asp中增加一个函数IsPostUser
Function IsPostUser(UserName)
    If G_PostUserName=UserName Then
        IsPostUser = "{_postusername_}"
    Else
        IsPostUser = ""
    End If
End Function

4.修改dispbbs.asp的Show_Topic_Body函数(红色新增)
Function Show_Topic_Body()
    If UBound(Dvbbs.Forum_ads)>13 Then
        Dvbbs.Forum_ads(14)=Split(Dvbbs.Forum_ads(14),vbNewLine)
    End If
    Dim SQL,Rs,i
    Dim TopicPageList,Pcount
    Dim layer
    TopicPageList=Dvbbs.Board_Setting(27)
    With Response
    .Write "<Script Language=JavaScript>"
    .Write  template.html(4)
    .Write  "var TempStr='"&Replace(Replace(Replace(Replace(Replace(template.html(2),"{$boardtype}",Server.Htmlencode(Dvbbs.Board_Data(1,0))),"\","\\"),"'","\'"),VbCrLf,"\n"),chr(13),"")&"';"
    .Write  "var sTempStr='"&Replace(Replace(Replace(Replace(template.html(3),"\","\\"),"'","\'"),VbCrLf,"\n"),chr(13),"")&"';"
    .Write  "sTempStr=sTempStr.split(""||"");"
    .Write  "var alertcolor='"&Dvbbs.mainsetting(1)&"';"
    .Write  "var Board_Setting27='"&TopicPageList&"';"
    .Write  "var fontsize='"&Dvbbs.Board_Setting(28)&"';"
    .Write  "var lineheight='"&Dvbbs.Board_Setting(29)&"';"
    .Write  "var Forum_Setting42='"&Dvbbs.Forum_Setting(42)&"';"
    .Write  "var facesetting='"&Dvbbs.Forum_Setting(53)&"';"
    .Write  "var votemoney='"&Dvbbs.GroupSetting(47)&"';"
    .Write  "var Forum_ChanSetting0='"&Dvbbs.Forum_ChanSetting(0)&"';"
    .Write  "var Forum_ChanSetting5='"&Dvbbs.Forum_ChanSetting(5)&"';"
    .Write  "var Forum_ChanSetting6='"&Dvbbs.Forum_ChanSetting(6)&"';"
    .Write  "var Forum_ChanSetting7='"&Dvbbs.Forum_ChanSetting(7)&"';"
    .Write  "var topfloor='"&template.Strings(3)&"';"
    .Write  "var floor='"&template.Strings(4)&"';"
    .Write  "var lockuserinfo1='"&template.Strings(5)&"';"
    .Write  "var lockuserinfo2='"&template.Strings(7)&"';"
    .Write  "var noviewbest='"&template.Strings(6)&"';"
    .Write  "var actioninfo1='"&template.Strings(8)&"';"
    .Write  "var actioninfo2='"&template.Strings(9)&"';"
    .Write  "var GroupSetting41='"&Dvbbs.GroupSetting(41)&"';"
    .Write  "var TopicMode='"&TopicMode&"';"
    .Write  "var mainsetting='"&Dvbbs.mainhtml(0)&"';"
    .Write  "var mainsetting=mainsetting.split(""||"");"
    .Write  "var TopicNum='"&TopicCount&"';"
    .Write  "</Script>"
    SQL="B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.UserIM,U.UserMobile,U.Usersign,U.userclass,U.Usertitle,U.Userwidth,U.Userheight,U.UserPost,U.Userface,U.JoinDate,U.userWealth,U.userEP,U.userCP,U.Userbirthday,U.Usersex,u.UserGroup,u.LockUser,u.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser,U.UserHidden,U.IsChallenge,B.Ubblist,B.LockTopic"
    If cint(skin)=1 and Clng(replyid)=Clng(Announceid) Then
        SQL="Select top 1 "&SQL&" From "&TotalUseTable&" B Inner Join [dv_user] U On U.UserID=B.PostUserID Where B.BoardID="&Dvbbs.BoardID&" And B.RootID="&AnnounceID&"  order By B.AnnounceID, B.DateAndTime"
    ElseIf cint(skin)=1 Then
        SQL="Select "&SQL&" From "&TotalUseTable&" B Inner Join [dv_user] U On U.UserID=B.PostUserID Where B.BoardID="&Dvbbs.BoardID&" And B.AnnounceID="&replyID
    Else
        Dim AnnounceIDlists
        AnnounceIDlists=AnnounceIDlist()
        SQL="Select "&SQL&" From "&TotalUseTable&" B Inner Join [dv_user] U On U.UserID=B.PostUserID Where B.RootID="&Announceid&" And B.BoardID="&Dvbbs.BoardID&" And  B.AnnounceID in ("&AnnounceIDlists&") order BY B.AnnounceID, B.DateAndTime"
    End If
    Set Rs =Dvbbs.Execute(SQL)
    If Rs.EOF And Rs.BOF Then
        Dvbbs.AddErrCode(33)
        Exit Function
    End If

    If Not(Rs.EOF And Rs.BOF) Then
        followup = Rs("AnnounceID")
        If TopicCount mod Cint(TopicPageList)=0 then
            Pcount= TopicCount \ Cint(TopicPageList)
        Else
            Pcount= TopicCount \ Cint(TopicPageList)+1
        End If
        'Rs.MoveFirst
        If star > Pcount Then star = Pcount
        If star < 1 Then star = 1                
        'If Cint(skin) <> 1 Then Rs.Move (star-1) * TopicPageList
        .Write "<Script Language=JavaScript>"
        .Write  "var star='"&star&"';"
        .Write  "</Script>"
        'AnnounceID=0,BoardID=1,UserName=2,Topic=3,dateandtime=4,body=5,
        'Expression=6,ip=7,RootID=8,signflag=9,isbest=10,PostUserid=11,
        'layer=12,isagree=13,useremail=14,UserIM=15,UserMobile=16,sign=17,
        'userclass=18,title=19,width=20,height=21,article=22,face=23,JoinDate=24,
        'userWealth=25,userEP=26,userCP=27,birthday=28,sex=29,UserGroup=30,LockUser=31,
        'userPower=32,titlepic=33,UserGroupID=34,LastLogin=35,PostBuyUser=36,Ubblists=39,LockTopic=40
        Dim k,rndnum,TopicAddata,Topic_Ads,UserSign,TopicBody
        K=0
        Dim MyTempStr,ReplaceStr
        SQL=Rs.GetRows(TopicPageList)
        Set Rs=Nothing
        For i=0 To Ubound(SQL,2)
            .Write "<a name="&SQL(0,i)&"></a>"
            .Write "<Script Language=JavaScript>"
            UserName=Dvbbs.HtmlEncode(SQL(2,i))
            If SQL(40,i)=2 Then
                .Write "var actioninfo3='"&template.Strings(16)&"';"
            Else
                .Write "var actioninfo3='"&template.Strings(15)&"';"
            End If
            If bgcolor="tablebody1" Then
                bgcolor="tablebody2"
                abgcolor="tablebody1"
            Else
                bgcolor="tablebody1"
                abgcolor="tablebody2"
            End If
            ReplyID=SQL(0,i)
            PostBuyUser=SQL(36,i)
            Topic_Ads=""
            If Dvbbs.Forum_ChanSetting(5)="1" Then
                If Dvbbs.Forum_AdLoop3<>"" Then
                    Randomize
                    rndnum=Cint((i3-1)*rnd+1)
                    If rndnum=0 Then rndnum=1
                    TopicAddata=Ad_3(rndnum-1)
                    TopicAddata=Replace(Replace(TopicAddata,"\","\\"),"'","\'")
                    Topic_Ads=TopicAddata
                    TopicAddata=""
                Else
                    Topic_Ads=""
                End If
            Else
                If UBound(Dvbbs.Forum_ads)>13 Then
                    If Topic_Ads="" And UBound(Dvbbs.Forum_ads(14)) > -1 Then
                        Randomize
                        Topic_Ads=Dvbbs.Forum_ads(14)(CInt(UBound(Dvbbs.Forum_ads(14))*Rnd))
                        Topic_Ads= Replace(Replace(Topic_Ads,"\","\\"),"'","\'")
                    End If
                Else
                    Topic_Ads=""
                End If
            End If    
            UserSign=""
            If Not Isnull(SQL(17,i)) or Not SQL(17,i)="" Then
                If SQL(9,i)=1 and SQL(31,i)=0 and Cint(Dvbbs.forum_setting(42))=1 Then
                    UserSign = dv_ubb.Dv_SignUbbCode(SQL(17,i),SQL(34,i))
                    UserSign=Replace(Replace(UserSign,"\","\\"),"'","\'")
                    'UserSign = Replace(UserSign, vbNewLine,"\n")
                End If
            End If
            Ubblists=SQL(39,i)
            If Not (SQL(31,i)=2 or (SQL(10,i)=1 And CInt(Dvbbs.GroupSetting(41))=0) or SQL(31,i)=1) Then
                If InStr(Ubblists,",39,") > 0  Then
                    TopicBody = dv_ubb.Dv_UbbCode(SQL(5,i),SQL(34,i),1,0)
                Else
                    TopicBody = dv_ubb.Dv_UbbCode(SQL(5,i),SQL(34,i),1,1)
                End If            
            End If
            TopicBody = Replace(Replace(TopicBody ,"\","\\"),"'","\'")
            'TopicBody = Replace(TopicBody, vbNewLine,"\n")
            SQL(13,i)=Replace(Lcase(SQL(13,i))&"","[isubb]","")
            .Write "document.write (dvbbs_show_topic('"
            .Write SQL(0,i)
            .Write "','"
            .Write Dvbbs.BoardID
            .Write "',"
            MyTempStr    = "'"&SQL(2,i)&IsPostUser(SQL(2,i))&"','"
            ReplaceStr    = SQL(3,i)&""
            If Not (i=0 And Star=1 And TopicMode=1 ) Then
                ReplaceStr = Replace(ReplaceStr&"","<","<")
                ReplaceStr = Replace(ReplaceStr,">",">")
            End If
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            MyTempStr    =    MyTempStr & ReplaceStr
            ReplaceStr    =    SQL(14,i)&""
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            SQL(14,i)    =    ReplaceStr
            ReplaceStr    =    SQL(15,i)&""
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            SQL(15,i)    =    ReplaceStr
            ReplaceStr    =    SQL(16,i)&""
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            SQL(16,i)    =    ReplaceStr
            ReplaceStr    =    SQL(23,i)&""
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            ReplaceStr    =    Replace(ReplaceStr&"","<","<")
            ReplaceStr    =    Replace(ReplaceStr,">",">")
            SQL(23,i)    =    ReplaceStr
            ReplaceStr    =    SQL(19,i)&""
            ReplaceStr    =    Replace(Replace(ReplaceStr ,"\","\\"),"'","\'")
            SQL(19,i)    =    ReplaceStr
            MyTempStr    =    MyTempStr & "','"&SQL(13,i)&"','"&SQL(14,i)&"','"&SQL(15,i)&"','"&SQL(16,i)&"','"& SQL(23,i) &"','"&Topic_Ads&"','"&SQL(19,i)&"','"&UserSign&"','"&SQL(30,i)&"','"&TopicBody&"'"
            MyTempStr    = Dvbbs.ChkBadWords(MyTempStr)
            MyTempStr    = Replace(Replace(Replace(MyTempStr,chr(13),""),chr(10),""),"$","$")
            .Write MyTempStr
            .Write ",'"
            .Write SQL(4,i)
            .Write "','"
            .Write SQL(6,i)
            .Write "','"
            If Dvbbs.GroupSetting(30)="0" Then
                .Write "*.*.*.*"
            Else
                .Write SQL(7,i)
            End If
            .Write  "','"
            .Write AnnounceID
            .Write "',"
            .Write SQL(9,i)
            .Write ","
            .Write SQL(10,i)
            .Write ","
            .Write SQL(11,i)
            .Write ","
            .Write SQL(12,i)
            .Write ",'"
            .Write SQL(18,i)
            .Write "','"
            .Write SQL(20,i)
            .Write "','"
            .Write SQL(21,i)
            .Write "','"
            .Write SQL(22,i)
            .Write "','"
            REM 修正因用户注册时间为空值时出错 2004-5-22 Dv.Yz
            If Not Isdate(SQL(24,i)) Then
                .Write FormatDateTime(Now(),2)
            Else
                .Write FormatDateTime(SQL(24,i),2)
            End If
            .Write "','"
            .Write SQL(25,i)
            .Write "','"
            .Write SQL(26,i)
            .Write "','"
            .Write SQL(27,i)
            .Write "','"
            .Write SQL(28,i)
            .Write "','"
            .Write SQL(29,i)
            .Write "',"
            .Write SQL(31,i)
            .Write ",'"
            .Write SQL(32,i)
            .Write "','"
            .Write SQL(33,i)
            .Write "',"
            .Write SQL(34,i)
            .Write ",'"
            .Write SQL(35,i)
            .Write "','"
            .Write SQL(38,i)
            .Write "',"
            .Write i
            .Write ",'"
            .Write bgcolor
            .Write "','"
            If SQL(37,i)=1 or DateDiff("s",SQL(35,i),Now())>Cint(dvbbs.Forum_Setting(8))*60 Then
                .Write  "0"
            Else
                .Write  "1"
            End If
            .Write "','"
            .Write SQL(40,i)
            .Write  "'));"
            UbbLists=""
            .Write  "</Script>"
        Next
        SQL=Null
        .Write "<Script Language=JavaScript>"
        MyTempStr = template.html(5)
        MyTempStr = Replace(MyTempStr,"{$width}",Dvbbs.mainsetting(0))
        MyTempStr = Replace(MyTempStr,"{$boardid}",Dvbbs.BoardID)
        MyTempStr = Replace(MyTempStr,"{$replyid}",ReplyID)
        MyTempStr = Replace(MyTempStr,"{$announceid}",AnnounceID)
        MyTempStr = Replace(MyTempStr,"{$skin}",Skin)
        MyTempStr = Replace(MyTempStr,"{$page}",Page)
        MyTempStr = Replace(MyTempStr,"{$topicnum}",TopicCount)
        MyTempStr = Replace(MyTempStr,"{$boardjump}",Dvbbs.BoardJumpList)
        .Write MyTempStr
        .Write  "</Script>"
    End If
    End With
End Function

5.登录后台打开"page_dispbbs界面风格→template.html(4)",修改dvbbs_show_topic函数(红色新增):
function dvbbs_show_topic(AnnounceID,BoardID,UserName,Topic,isagree,useremail,userim,UserMobile,face,Topic_Ads,title,sign,UserGroup,body,dateandtime,Expression,ip,RootID,signflag,isbest,PostUserid,layer,userclass,width,height,article,addDate,userWealth,userEP,userCP,birthday,sex,LockUser,userPower,titlepic,UserGroupID,LastLogin,IsChallenge,i,tablebody,isOnline,LockPage){
    var str=TempStr;
    var sstr=sTempStr;
    var UserIM=dvhtmlencode(userim).split("\|\|\|");
    var homepage=UserIM[0];
    var oicq=UserIM[1];
    var uc=UserIM[6];
    //首先运行判断部分替换
    if (facesetting=='1' && face!=''){
        var facestr=sstr[0];
        facestr = facestr.replace(/{\$faceurl}/gi,dvhtmlencode(FilterJS(face)));
        facestr = facestr.replace(/{\$facewidth}/gi,width);
        facestr = facestr.replace(/{\$faceheight}/gi,height);
        str = str.replace(/{\$userface}/gi,facestr);
    }
    str = str.replace(/{\$userface}/gi,"");
    if (IsChallenge=='1'){
        str = str.replace(/{\{$raytitle}/gi,sstr[1]);
    }
    str = str.replace(/{\$raytitle}/gi,"");
    if (title!=''){
        str = str.replace(/{\$usertitle}/gi,sstr[2]);
        str = str.replace(/{\$title}/gi,dvhtmlencode(title));
    }
    str = str.replace(/{\$usertitle}/gi,"");
    if (userPower!='' && userPower!='0'){
        str = str.replace(/{\$userpower}/gi,sstr[3]);
        str = str.replace(/{\$power}/gi,userPower);
    }
    str = str.replace(/{\$userpower}/gi,"");
    if (UserGroup!='' && UserGroup!='无门无派'){
        str = str.replace(/{\$usergroup}/gi,sstr[4]);
        str = str.replace(/{\$groups}/gi,dvhtmlencode(UserGroup));
    }
    str = str.replace(/{\$usergroup}/gi,"");
    if (LockUser=='2' || LockPage=='2'){
        str = str.replace(/{\$topicinfo}/gi,lockuserinfo1);
    }
    if (LockUser=='1'){
        str = str.replace(/{\$topicinfo}/gi,lockuserinfo2);
    }
    if (isbest=='1' && GroupSetting41=='0'){
        str = str.replace(/{\$topicinfo}/gi,noviewbest);
    }
    var topicinfo='';
    var manageinfo='';
    manageinfo=sstr[14];
    topicinfo = sstr[11];
    if (i=='0' && star=='1'){
        if (isagree==''){isagree="0|0";}
        isagree=isagree.split("|");
        str = str.replace(/{\$topicvote}/gi,sstr[5]);
        str = str.replace(/{\$fnum}/gi,isagree[0]);
        str = str.replace(/{\$dnum}/gi,isagree[1]);
        str = str.replace(/{\$floor}/gi,topfloor);
    topicinfo = topicinfo.replace(/{\$topic}/gi,dvbbs_topicmode(Topic,TopicMode));
    }else{manageinfo+= sstr[15];}
    topicinfo = topicinfo.replace(/{\$topic}/gi,dvhtmlencode(Topic));
    topicinfo = topicinfo.replace(/{\$body}/gi,body);
    topicinfo = topicinfo.replace(/{\$e­xpression}/gi,"{$PicUrl}topicface/"+Expression);
    if (signflag=='1' && Forum_Setting42=='1' && sign!='' && LockUser=='0'){
        topicinfo+= sstr[12];
        topicinfo = topicinfo.replace(/{\$usersign}/gi,sign);
    }
    
    manageinfo+= sstr[16];
    var actioninfo=''
    if (isbest=='1'){
        actioninfo=actioninfo1;
    }else{actioninfo=actioninfo2;}
    manageinfo+= sstr[17];
    manageinfo = manageinfo.replace(/{\$actioninfo}/gi,actioninfo);
    manageinfo+= sstr[18].replace(/{\$actioninfo3}/gi,actioninfo3);

    str = str.replace(/{\$manageinfo}/gi,manageinfo);
    str = str.replace(/{\$floor}/gi,floor.replace(/{\$floornum}/gi,((Board_Setting27*(star-1))+(i+1))));
    str = str.replace(/{\$usemoney}/gi,votemoney);
    str = str.replace(/{\$topicvote}/gi,"");
    if (Forum_ChanSetting0=='1' && Forum_ChanSetting7=='1')
    {
        str = str.replace(/{\$raytopic}/gi,sstr[6]);
    }
    str = str.replace(/{\$raytopic}/gi,"");
    if (Forum_ChanSetting0=='1' && Forum_ChanSetting6=='1')
    {
        str = str.replace(/{\$raysms}/gi,sstr[7]);
        str = str.replace(/{\$raytopicsms}/gi,sstr[13]);
    }
    str = str.replace(/{\$raysms}/gi,"");
    str = str.replace(/{\$raytopicsms}/gi,"");
    str = str.replace(/{\$raysmsad}/gi,unhtml(Topic_Ads));
    
    if (useremail!=''){
        str = str.replace(/{\$email}/gi,sstr[8]);
        str = str.replace(/{\$useremail}/gi,dvhtmlencode(useremail));
    }
    str = str.replace(/{\$email}/gi,"");
    //UserIM
    if (oicq!=''){
        str = str.replace(/{\$useroicq}/gi,sstr[9]);
        str = str.replace(/{\$oicq}/gi,oicq);
    }
    str = str.replace(/{\$useroicq}/gi,"");
    if (homepage!=''){
        str = str.replace(/{\$homepage}/gi,sstr[10]);
        str = str.replace(/{\$hpage}/gi,homepage);
    }
    str = str.replace(/{\$homepage}/gi,"");
    if (uc!=''){
        str = str.replace(/{\$UserUC}/gi,sstr[19]);
        str = str.replace(/{\$uc}/gi,uc);
    }
    str = str.replace(/{\$UserUC}/gi,"");

    str = str.replace(/{\$boardid}/gi,BoardID);
    str = str.replace(/{\$announceid}/gi,AnnounceID);
    str = str.replace(/{\$topicid}/gi,RootID);
    str = str.replace(/{\$username}/gi,dvhtmlencode(UserName));
    str = str.replace(/{_postusername_}/gi,"<font color=red>[楼主]</font>");
    str = str.replace(/{\$userid}/gi,PostUserid);
    str = str.replace(/{\$alertcolor}/gi,alertcolor);
    str = str.replace(/{\$star}/gi,star);
    str = str.replace(/{\$titlepic}/gi,"{$PicUrl}star/"+titlepic);
    str = str.replace(/{\$userclass}/gi,userclass);
    str = str.replace(/{\$article}/gi,article);
    str = str.replace(/{\$userep}/gi,userEP);
    str = str.replace(/{\$regdate}/gi,addDate);
    str = str.replace(/{\$dateandtime}/gi,dateandtime);
    str = str.replace(/{\$ip}/gi,ip);
    str = str.replace(/{\$fontsize}/gi,fontsize);
    str = str.replace(/{\$lineheight}/gi,lineheight);
    str = str.replace(/{\$tablebody}/gi,tablebody);
    str = str.replace(/{\$birthday}/gi,astro(birthday));
    str = str.replace(/{\$onlinepic}/gi,OnlinePic(isOnline,sex));
    str = str.replace(/{\$tableline}/gi,mainsetting[12]);
    str = str.replace(/{\$namestyle}/gi,namestyle(UserGroupID));
    str = str.replace(/{\$usercolor}/gi,usercolor(UserGroupID));
    str = str.replace(/{\$topicinfo}/gi,topicinfo);
    return(str);
}


上一篇: 字符串连接性能测试
下一篇: 创建Wap服务器
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
最新日志:
评论: 0 | 引用: 0 | 查看次数: 6502
发表评论
登录后再发表评论!