I'm working on modifying my node a bit. The code I'm
working on is the rel-0-5-0 branch.

Basicly I want to stop the bookmarks from being hard
coded in node/http/infolets/DefaultInfolet.java to
existing in the config file with defaults to remain
compatible with the current behavior of actualy
showing bookmarks when they are not defined =)

I am thinking the best way to pull this off is with a
syntax something like

mainport.bookMarks.0=<A HREF="/SSK@abc/TFE//">The
Freedom Engine</A> - freenet portal published
anonymously
mainport.bookMarks.1=<A HREF="/SSK@abc/FF//">Freenet
Forever</A> - freenetw eblog published anonymously by
author of above

or something similiar. It might also make sense to use
a syntax more like
mainport.bookMarks.0=The Freedom
Engine,SSK@abc/TFE//,Freenet portal published
anonymously

but that seems to lock everyone into a format with out
a real reason. The code to support this in mainport is
easy enough, around line 110 get rid of all the lines
that staticly add stuff into the StringWriter object
instance and replace it with something like: 
(forgive the horible syntax and obvious brokeness, i'm
not a seasoned java dev)

sw.println("<ul>");
i = 0;
while(i++) {
  String bookmark = getParams("bookmark." + i);
  if (bookmark == "")
    break;
  
  sw.println(bookmark);
}
sw.println("</ul>");

I'm having a hard time figuring out which object I
should be using to import the config items however. I
have tried reading the code but the only place that I
can find that is reading and using the config
variables is in Node.java and I don't want to modify
that if I don't have to. Is there an object I can use
to pull off what I want to do?

You might ask why do this? Basicly I want to be able
to change the bookmarks and while I am smart enough to
find the places in the code and change the hard coded
values I would much rather just edit the config file.
It would also be cool for our windows friends to be
able to edit their bookmarks using the config editor.

I'll be more then happy to supply the patches once I
am done and I appreciate your help.

Tyler

=====
AIM:rllybites    Y! Messenger:triddle_1999

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

_______________________________________________
Tech mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/tech

Reply via email to