From: Reini U. <ru...@x-...> - 2004-12-06 17:15:47
|
Rui Carmo schrieb: > I'm running a heavily customized version of PhpWiki at > http://the.taoofmac.com, and have come up with an interesting problem. This blog theme is exactly what I wanted to have also, but didn't had time yet. Very good work! > It might be from my tweaks (I forked my code from PhpWiki sometime > around 1.3.7, I think), but plugins in the node contents seem to be > invoked twice, i.e: > > * if I use PageTrails as part of browse.tmpl, it is only invoked once > * If I add <?plugin PageTrails ?> to my Sandbox, the plugin code (i.e., > run()) gets invoked twice, even though the output is only shown once. If you have a plugin in a template it is invoced from there also, but no normal template should be processed twice. > This is tolerable for simple stuff like PageTrails, but a _major_ > nuisance for TitleSearch and whatnot (which is what I'm trying to > optimize). > > I'm blaming it on template expansion (which I haven't modified myself > and might have a few lingering bugs not present in current CVS), but > instead of upgrading (which would mean refactoring all my current custom > plugins and subpage handling) what I would _really_ like are some > pointers as to how to go about debugging this, namely: I'll do the work and merge some of your stuff to our version as another theme, ok? Our WikiBlog template smells awful. Also an example how to add google ads to some sidebar is useful for some theme. Do you have a tarball of your changes and the Kubrick theme somewhere to download? I was also working today on more radio userland features, like RSS2 and cloud support (pagechange notification via xml-rpc). The atom format not yet, but you already have that. Trackback is missing but almost the same. > * In which conditions are plugins expanded On every invocation only once :) > * if dump_template() is useful for debugging that (the initial results > aren't satisfactory, but I might have missed something) > > I'm currently trying to wrap my neurons around printExpansion(), which > is what I see getting called more often. I would have used PHP's call > stack debugger if I could, but have to resort to browser output and file > logging, so it's tough going (some sort of call graph for page > generation would also be nice, since it is nigh on impossible to just > use error_log() with all the built-in error handling mechanisms). Don't you have a GUI php debugger? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |