Posted on: 11/09/02 07:07am
By: rv8
I recently installed phplinks[*1] on my RV-8 aircraft construction site[*2] - everything went smoothly, except I was getting parse errors when I made the changes to make the phplinks links show up in the What's New block. I eventually tracked the problem down to my misinterpretation of the integration directions.
The parse errors looked like:
Parse error: parse error, unexpected $ in /Library/WebServer/Documents/lib-common.php on line 4147
Fatal error: Cannot instantiate non-existent class: template in /Library/WebServer/Documents/lib-common.php on line 607
Step 7 in the README directs you to make a number of changes to lib-common.php. A file is provided with a bunch of code to replace everything after the "// Get newest links" comment in the "COM_whatsNewBlock". Well, I did that, and I kept getting the parse errors. I finally figured out that you don't want to quite replace all the code. Specifically, you must not replace the following lines at the end of the COM_whatsNewBlock:
$retval .= COM_endBlock( COM_getBlockTemplate( 'whats_new_block', 'footer' ));
return $retval;
}
I think the source of the problem is that Squatty had inserted a new file management section in the "COM_whatsNewBlock" in his lib-common.php. His file management code went between the newest links code, and the the lines I mention, so he overlooked them when he wrote the directions.
Other than this small glitch, phplinks integrated into GL without any problems. Thanks Squatty!