Hi,
I'm trying to write an extension that makes an alternative category page where the subcategories are split off from the articles. I'm hooking at CategoryPageView, and I thought that the simplest approach would be to extend the CategoryViewer class from CategoryPage.php. But when I try that, I get:
[Tue Feb 20 07:26:33 2007] [error] PHP Fatal error: Class 'Article' not found in /Library/WebServer/Documents/wiki/includes/ CategoryPage.php on line 15
This is after I require CategoryPage.php in the extension. Requiring Article.php in the extension doesn't seem to help, but it works if I hack in a
require_once("$IP/includes/Article.php");
in CategoryPage.php itself. Obviously, CategoryPage doesn't normally need this, and I'd prefer to not hack the base code. I know that I could get around this by just copying the CategoryViewer code into the extension, but if I can I'd like to do this by inheritance.
I don't understand why this happens. The hook is called from CategoryPage.php, so why does it have to be required again? Any explanations or suggestions? Thanks!!
Jim ===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054