所在位置:论坛首页 -> ┈┋BBSGood专区┋┈ -> 『BBSGood论坛交流』 -> 帖子内容中的连接打开后在新窗口中打开如何实现?
发表新的主题 发起新的投票 发起新的交易 发起新的任务 回复话题
 标题:帖子内容中的连接打开后在新窗口中打开如何实现?
 作者:sisic123 发表于 2007-8-21 8:53:49收藏 编辑 删除 楼主  | 上一篇 下一篇

发布心贴后,内容有连接,图片打开后世在新窗口中,可是文字在本窗口中打开,我需要文字连接在新窗口中打开,如何实现?

http://game.xinzhe.net.cn/2007-8/21/8240873022.html

顶部
 作者:518 发表于 2007-8-21 11:55:39编辑 删除 引用   第2楼 
这个是自动链接吧,我知道的是修改一下 char.asp的ubbcode函数
顶部
 作者:hai126net 发表于 2008-3-18 16:49:54编辑 删除 引用   第3楼 

FUN.ASP

修改  923行 到 1017行。

=============================================================================

Function createposturl(ftbq,titlecolor,boldface,titlename,upfiletype,boardpostnum,boardid,ishtml,posttime,filename,postuser,postid,TitleImage,post_blank)
    If titlecolor<>"" Then TitleName="<font color="&titlecolor&">"&titlename&"</font>" End If '处理标题颜色
    If boldface=true Then TitleName="<b>"&TitleName&"</b>" End IF '标题是否加粗
    if upfiletype<>"" then '帖子中上传文件的类型
        upfiletype="<img src=""images/files/"&upfiletype&".gif"" align=""middle"">&nbsp;"
    else
        upfiletype=""
    end if
    if ftbq<>"" then '发帖表情
        ftbq="<img src=""images/sys/ftbq/"&ftbq&""" align=""middle"">&nbsp;"
    else
        ftbq=""
    end if

    PostPageNum=boardpostnum/Application(BBSInfo&"sysinfo")(45,0)  '获取页数
    DisPostPageNum=""
    If PostPageNum>1 then
        PostPageNum=cstr(PostPageNum)
        if instr(1,PostPageNum,".")>0 then
            PostPageNum=Cint(left(PostPageNum,instr(1,PostPageNum,".")-1))+1
        else
            PostPageNum=Cint(PostPageNum)
        end if
    else
        PostPageNum=1
    end if
   
    call BoardInfo(boardid)
    if Application(BBSInfo&"sysinfo")(78,0)=true and (Application(bbsinfo&"Boardinfo"&boardid)(13,0)<>0 or ishtml=false) then   
        If PostPageNum>1 Then
            For i=1 to PostPageNum
                DisPostPageNum=DisPostPageNum+"<a href=""post_"&boardid&"_"&postid&"_"&cstr(i)&".html"" "&post_blank&"><font color=#990000><b>"+cstr(i)+"</b></font></a> "
                If i=3 and i<PostPageNum Then
                    DisPostPageNum=DisPostPageNum+"...<a href=""post_"&boardid&"_"&postid&"_"&cstr(PostPageNum)&".html"" "&post_blank&"><font color=#990000><b>"+cstr(PostPageNum)+"</b></font></a> "
                    exit for
                end if                   
            Next
            DisPostPageNum="[<img src=images/skin/list.gif>"+DisPostPageNum+"]"
        End If
        TitleName="<a href=""post_"&boardid&"_"&postid&"_1.html"" "&post_blank&" title=""作者:"&postuser&"&#xA;发表于:"&posttime&"&#xA;ID号:"&postid&"""  target=""_blank"">"&TitleName&"</a>&nbsp;"&DisPostPageNum&""
        TitleImage="<a href=""post_"&boardid&"_"&postid&"_1.html"" "&post_blank&" target=""_blank"">"+TitleImage+"</a>"
    else
        if Application(bbsinfo&"Boardinfo"&boardid)(13,0)=0 then
            If ishtml=true then
                PostTime=GetFolderPath(Application(BBSInfo&"sysinfo")(95,0),posttime) '取路径
                If PostPageNum>1 Then
                    i=1
                    PathFileName=""&PostTime&"/"&filename&""
                    ext=Split(PathFileName,".")
                     DisPostPageNum=DisPostPageNum+"<a href="""&PathFileName&""" "&post_blank&"><font color=#990000><b>"+cstr(i)+"</b></font></a> "
                    For i=2 to PostPageNum
                        PathFileName=""&PostTime&"/"&left(filename,instr(1,filename,".")-1)+cstr(i)&"."&ext(1)
                        DisPostPageNum=DisPostPageNum+"<a href="""&PathFileName&""" "&post_blank&"><font color=#990000><b>"+cstr(i)+"</b></font></a> "
                        If i=3 and i<PostPageNum Then
                            DisPostPageNum=DisPostPageNum+".."
                            PathFileName=""&PostTime&"/"&left(filename,instr(1,filename,".")-1)+cstr(PostPageNum)&"."&ext(1)
                            DisPostPageNum=DisPostPageNum+"<a href="""&PathFileName&""" "&post_blank&"><font color=#990000><b>"+cstr(PostPageNum)+"</b></font></a>"
                            exit for              
                        End IF
                    Next
                    DisPostPageNum="[<img src=images/skin/list.gif align=middle>"+DisPostPageNum+"]"
                End If
                TitleName="<a href="""&posttime&"/"&filename&""" "&post_blank&" title=""作者:"&postuser&"&#xA;发表于:"&posttime&"&#xA;ID号:"&postid&""" target=""_blank"">"&TitleName&"</a>&nbsp;"&DisPostPageNum&""
                TitleImage="<a href="""&PostTime&"/"&filename&""" target=""_blank"">"+TitleImage+"</a>"               
            else
                If PostPageNum>1 Then
                    For i=1 to PostPageNum
                         DisPostPageNum=DisPostPageNum+"<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&"&Page="&cstr(i)&""" "&post_blank&"><font color=#990000><b>"+cstr(i)+"</b></font></a> "                  
                         If i=3 and i<PostPageNum Then
                             DisPostPageNum=DisPostPageNum+"..<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&"&Page="&cstr(PostPageNum)&""" "&post_blank&"><font color=#990000><b>"+cstr(PostPageNum)+"</b></font></a>"
                             exit for              
                         End IF
                    Next
                    DisPostPageNum="[<img src=""images/skin/list.gif"" align=middle>"+DisPostPageNum+"]"
                End If
                TitleName="<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&""" "&post_blank&" title=""作者:"&postuser&"&#xA;发表于:"&posttime&"&#xA;ID号:"&postid&"""  target=""_blank"">"&TitleName&"</a>&nbsp;"&DisPostPageNum&""
                TitleImage="<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&""" target=""_blank"">"+TitleImage+"</a>"               
            End If
        else
            If PostPageNum>1 Then
                For i=1 to PostPageNum
                    DisPostPageNum=DisPostPageNum+"<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&"&Page="&cstr(i)&""" "&post_blank&"><font color=#990000><b>"+cstr(i)+"</b></font></a> "
                    If i=3 and i<PostPageNum Then
                        DisPostPageNum=DisPostPageNum+"..<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&"&Page="&cstr(PostPageNum)&""" "&post_blank&"><font color=#990000><b>"+cstr(PostPageNum)+"</b></font></a>"
                        exit for              
                    End IF                       
                Next
                DisPostPageNum="[<img src=""images/skin/list.gif"" align=middle>"+DisPostPageNum+"]"
            End If
            TitleName="<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&""" "&post_blank&" title=""作者:"&postuser&"&#xA;发表于:"&posttime&"&#xA;ID号:"&postid&"""  target=""_blank"">"&TitleName&"</a>&nbsp;"&DisPostPageNum&""
            TitleImage="<a href=""dispost.asp?BoardID="&boardid&"&PostID="&postid&""" target=""_blank"">"+TitleImage+"</a>"           
        end if
    end if
    createposturl=""&ftbq+upfiletype+TitleName&""
End Function

顶部
 快速回复
  • 支持UBB,HTML标签

  • 高级回复

  • 操作选项: 加精 解精 奖惩 设专题 设公告 解公告 固顶 总固顶 解固顶 结帖 解结帖 锁帖 解锁 移帖 删帖

    Copyright © 2004-2008  BBSGood.com Powered By: BBSGood.Speed Version 4.0

    首页 | 购买指南 | 商业版本 | 虚拟主机 | 特色介绍 | 下载中心 | 支付方式

    咨询电话:0575-85513832、0575-85513825(传真)、7*24小时咨询服务:13606552007
    业务QQ:38958768、客服QQ1:415896239、客服QQ2:343896043、MSN:jccsxx@hotmail.com
    不良信息举报中心 浙ICP备05029817号