From: Jamie C. <jca...@we...> - 2001-06-11 02:23:51
|
Nick Jennings wrote: > > Hello everyone, > > I have been looking at the webmin code for several days trying to grok > it. There is no documentation on it that I can find, the comments in the > code are sparse (to say the least), and even the variable and function > names are not at all "self-documenting". > > In a short amount of time I need to change, significantly, some core > things in webmin. Even so much as changing the way the HTML is printed > is a task that requires extensive code manipulation, and all of the HTML > is embedded in the code, rather thoroughly, and there are several function > calls to other pieces of code, from other files,that make up certain > parts of the HTML. None of this is documented and I can't figure out > what these functions are doing, why they are needed etc. > > Has anyone else attempted something like this and ran into these problems? > It seems like it is extremely difficult to reuse any code. Even within > themes entire cgi's have to be rewritten to behave differently and print > HTML out differently. > > Are there any plans for an HTML Templating system? More flexible framework? > Is there any technical Documentation? Anyone have any words of wisdom? > > Any comments apprectiated. You're right, changing the format of the HTML output by webmin is quite difficult - basically, you have to change the CGI programs themselves. The themes support was mainly designed for changing images and colours, not so much for the replacement of the actual programs. The only solution to this would be to move all the HTML from the CGI programs into separate template HTML files, which could then be modified by themes. However, this would be a massive task as every single CGI would need to be modified .. unless someone can suggest a clever shortcut or automated way of doing it? - Jamie |