Menu

#2 some bugs and solutions

v1.0_(example)
open
nobody
5
2004-03-05
2004-03-05
thomas
No

changeMessage.java:

my Browser caused an error while editing a message.
the line:
message += "<!-- begin --!><BR><BR><I>Edited by " +
sessionUsername + " - " + date_time + " (" +
changeDifference + "%)</I><!-- end --!>";

should be:

message += "<!-- begin --><BR><BR><I>Edited by " +
sessionUsername + " - " + date_time + " (" +
changeDifference + "%)</I><!-- end -->";

maybe the problem doesnt exist in other Browsers.
-----------------------------------------------------

Filter.java

in Method filterURL(String string) the line:

source.replace(i,5,"<a href=");

should be:

source.replace(i,i+5,"<a href=");

otherwise there will be an NullPointerException if you
add a URL to a Message with less than 5 chars.
-------------------------------------------------------

forum.sql

there must be a column "type" in the forum_users table!

Discussion

  • thomas

    thomas - 2004-03-16

    Logged In: YES
    user_id=991165

    and another one:

    if you enable URL support in textstyle.jsp you should make
    some changes in BilterBack.java. In Method filterURL () the
    lines:
    if(source.substring(i+1,i+8).equals("a href="))
    {
    source.replace(i,i+8,"[URL=");
    source.replace(j-9,j-2,"]");
    //source.append("|ok");

    }else if(source.substring(i+1,j).equals("/a"))
    {
    source.replace(i,j+1,"[/URL]");

    }else{
    source.append("|12345678");
    //source.append("|" + source.substring(i+1,i+2));
    }

    should be:

    if(source.substring(i+1,j).equals("/a"))
    { source.replace(i,j+1,"[/URL]");
    }

    else
    if(source.substring(i+1,i+8).equals("a href="))
    {
    source.replace(i,i+8,"[URL=");
    source.replace(j-14,j-2,"]");

    }else{

    //source.append("|12345678");
    //source.append("|" + source.substring(i+1,i+2));
    }

    otherwise you will get an ArrayIndexOutOfBonds Exception if
    the Message you want to edit ends with an URL.

     
  • Nobody/Anonymous

    Logged In: NO

    Tried to install but got this on trying to run in Tomcat 5...

    HTTP Status 404 - /servlet/forum.AddUser

    --------------------------------------------------------------------------------

    type Status report

    message /servlet/forum.AddUser

    description The requested resource (/servlet/forum.AddUser)
    is not available.

    --------------------------------------------------------------------------------

    Apache Tomcat/5.0.28

     

Log in to post a comment.