From: Arno H. <aho...@in...> - 2000-06-07 08:25:08
|
Steve, I guess you are too fixed on the functions themselves. Themes are usually done by using templates, i.e. files which have placeholders for the dynamic content. In the current version of phpwiki following templates are needed: browsing, edittext, editlinks, thanks-for-editing, search-results Placeholders needed are: %SCRIPT% ... URL of phpwiki script %TOPIC% ... page title %ENCTOPIC% ... URL-encoded page title %TEXT% ... page content (HTML, wiki markup, search results, ...) %LASTMODIFIED% ... 7 June, 2000 (or whatever) %REFERENCEx% ... for editlinks a simple template for e.g. browsing could look like: ----- browsing.html ----- <html><head><title>phpwiki: %TOPIC%</title></head> <body><h1><A HREF="%SCRIPT%?full=%ENCTOPIC%">%TOPIC%</A></h1> %TEXT% <hr> <A HREF="%SCRIPT%?edit=%ENCTOPIC%">Edit this page</A> (last edited %LASTMODIFIED%) <A HREF="%SCRIPT%?FindPage">FindPage</A> by browsing or searching </body></html> ----- end of browsing.html ----- You then have one function (the one that prints the final HTML) that reads in the template and replaces everything. If you are fancy, you can even provide a hook that allows knowledgeable admins to add their own placeholders. (Actually that should be quite easy.) How about that? I could cook up something like that in the next days, as I have some time due to illness too :( > I don't feel like commiting this. That brings up a question I'd like to ask: is there a clean way to share "experimental" code through the CVS? The only way I can think of is creating branches, but I don't know if this is a good solution. On a side note: how about releasing a 1.1.5 version? (before the template stuff) 1.1.4 is just too buggy to keep around. /Arno |