主题:  如何修改?

透明男孩

职务:普通成员
等级:2
金币:0.0
发贴:373
#12002/9/3 21:32:55
这是CVB论坛显不最新帖子的代码.

哪位高手能做一下修改.

把它改成只显示帖子主题的前10个字附.

    
    
    
    
    
    <br><!--ubbcodetab-->    <!--/ubbcodetab--><%=Forumname%><br><!--ubbcodetab-->    <!--/ubbcodetab-->
        
    
    <%            
    dim sql
    dim rs
    dim flag
    dim ostr
        
    recordnum=request.querystring("recordnum")
    if recordnum="" then
        recordnum=10
    end if    
    
    browsetype=request.querystring("browsetype")
    if browsetype="" then
        browsetype=1'说明开新窗口浏览
    end if                
    
    timeview=request.querystring("timeview")
    if timeview="" then
        timeview=1
    end if        
    
    if browsetype=1 then
        flag="target='_blank'"
    elseif browsetype=0 then
        flag="target='_top'"
    end if        
    
    ntypeid=request.querystring("ntypeid")
    if ntypeid="" then
        ntypeid=0
    end if
    
    if ntypeid=0 then
        sql="select top " & recordnum & " * from article order by lastposttime desc"
    else
        sql="select top " & recordnum & " * from article where ntypeid=" & ntypeid & " order by lastposttime desc"
    end if                
    %>



"
    else
        do while not rs.eof
            if timeview=1 then
                response.write ""
            elseif timeview=0 then
                response.write ""
            end if
        rs.movenext
        loop
    end if
    rs.close            
    set conn=nothing
    %> 

<%
    set rs=conn.execute(sql)
    if rs.eof and rs.bof then
        response.write "
该讨论区还暂时没有文章
>> " & rs("title") & "  " & rs("lastposttime") & "
>> " & rs("title") & "


    



5D荣誉版主

职务:普通成员
等级:2
金币:10.0
发贴:658
#22002/9/4 9:09:52
aa=cstr(rs("title"))
if aa.length>10 then
aa=left(aa,10)
end if



agefworld

职务:普通成员
等级:1
金币:0.0
发贴:36
#32002/9/4 15:25:50
这里的班住怎么这么快,刚看到一个会的酒杯解决了