From: Jeff D. <da...@da...> - 2001-09-05 16:58:59
|
Wups... I thought I sent this to phpwiki-talk, but apparently I sent it only to Pablo... Here it is: ====== On Sep 5, 2001, "Pablo Roca" said: > Hum curious, why is needed a new template engine? Well, in the process of munging my new database API into the rest of the code PhpWiki I had to modify the browse.html and editpage.html templates. It bothered my again (it has always bothered me) that template syntax was ugly and unnecessarily inflexible. So I rewrote the template engine. I wrote a real parser to deal with the if blocks, with the idea of eventually adding some kind of loop structure. Added a way to automatically LinkExistingWikiWord, so that "<a class="wikilink" href="###BROWSE###FindPage"><span class="wikiword">FindPage</span></a>" could be written more legibly. Then, I discovered that PHP4 has this set of ob_* commands which allow one to capture the "standard output" into a variable. This is great, I think, as it allows for templates to be regular php code. So I tossed my new template engine and replaced it with a new one which essentially just include()s the template, capturing it's output to a variable using the ob_* stuff. (All this refactoring explains why the current version is, at this point, pretty ugly itself. It's a mish-mash of the original GeneratePage code, code from my first template engine, and the current one. As I said, it still needs refactored.) > Let us know when this is available for seeing. I'll do it now, sorry. When it's up it'll be at http://phpwiki.sourceforge.net/jeffs-hacks/wiki/ > > A tar-ball can be found in: > > ftp://www.dairiki.org/phpwiki/ > > I can' connect to this server I get an error. ... :( Yes, my virtual host seems to be unreachable. Crap. Try: http://phpwiki.sf.net/jeffs-hacks/files/ Cheers, Jeff |